/* Three People Meet - Warm & Friendly Mobile-First Design */

:root {
    /* Warm color palette */
    --primary: #E07A5F;        /* Soft coral */
    --primary-dark: #C4604A;   /* Darker coral */
    --primary-light: #F4A393;  /* Light coral */
    --accent: #81B29A;         /* Sage green */
    --accent-dark: #6A9681;    /* Dark sage */
    --warning: #F2CC8F;        /* Warm yellow */
    --danger: #E07A5F;         /* Coral (same as primary) */

    /* Neutrals */
    --bg-cream: #FDF8F4;       /* Cream background */
    --bg-white: #FFFFFF;
    --text-dark: #3D405B;      /* Dark blue-gray */
    --text-medium: #6B6E8A;    /* Medium gray */
    --text-light: #9A9CB8;     /* Light gray */
    --border: #E8E4DF;         /* Warm border */

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(61, 64, 91, 0.08);
    --shadow-md: 0 4px 16px rgba(61, 64, 91, 0.12);
    --shadow-lg: 0 8px 32px rgba(61, 64, 91, 0.16);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Typography */
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background: transparent;
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ========================================
   ANIME NATURE SCENE
   ======================================== */

.nature-scene {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(
        180deg,
        #87CEEB 0%,
        #B0E0E6 15%,
        #E0F4FF 35%,
        #FFF8F0 60%,
        #FFEFD5 80%,
        #E8F5E8 100%
    );
}

/* ========================================
   CLOUDS WITH SHADOWS
   ======================================== */

.clouds-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    pointer-events: none;
}

.cloud {
    position: absolute;
    animation: driftCloud linear infinite;
}

.cloud-body {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(240, 248, 255, 0.7) 100%
    );
    border-radius: 50%;
    position: relative;
    box-shadow:
        inset -10px -10px 20px rgba(200, 220, 240, 0.3),
        0 5px 15px rgba(255, 255, 255, 0.5);
}

.cloud-body::before,
.cloud-body::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud-shadow {
    position: absolute;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(10px);
    animation: shadowMove 4s ease-in-out infinite alternate;
}

@keyframes shadowMove {
    0% { transform: translateX(-5px) scale(1); opacity: 0.5; }
    100% { transform: translateX(5px) scale(1.05); opacity: 0.3; }
}

/* Cloud 1 - Large front cloud */
.cloud-1 {
    top: 8%;
    animation-duration: 90s;
}
.cloud-1 .cloud-body {
    width: 180px;
    height: 70px;
}
.cloud-1 .cloud-body::before {
    width: 80px;
    height: 80px;
    top: -40px;
    left: 25px;
}
.cloud-1 .cloud-body::after {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 80px;
}
.cloud-1 .cloud-shadow {
    width: 200px;
    height: 40px;
    top: 400px;
    left: -10px;
}

/* Cloud 2 - Medium cloud */
.cloud-2 {
    top: 18%;
    animation-duration: 120s;
    animation-delay: -40s;
}
.cloud-2 .cloud-body {
    width: 140px;
    height: 55px;
    opacity: 0.85;
}
.cloud-2 .cloud-body::before {
    width: 65px;
    height: 65px;
    top: -35px;
    left: 20px;
}
.cloud-2 .cloud-body::after {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 65px;
}
.cloud-2 .cloud-shadow {
    width: 160px;
    height: 35px;
    top: 350px;
    left: -10px;
}

/* Cloud 3 - Small distant cloud */
.cloud-3 {
    top: 5%;
    animation-duration: 150s;
    animation-delay: -80s;
}
.cloud-3 .cloud-body {
    width: 100px;
    height: 40px;
    opacity: 0.6;
}
.cloud-3 .cloud-body::before {
    width: 45px;
    height: 45px;
    top: -25px;
    left: 15px;
}
.cloud-3 .cloud-body::after {
    width: 35px;
    height: 35px;
    top: -18px;
    left: 45px;
}
.cloud-3 .cloud-shadow {
    width: 120px;
    height: 25px;
    top: 300px;
    left: -10px;
    opacity: 0.3;
}

@keyframes driftCloud {
    0% { left: -250px; }
    100% { left: 110%; }
}

/* ========================================
   CHERRY BLOSSOM TREES
   ======================================== */

.trees-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
}

.tree {
    position: absolute;
    bottom: 60px;
    transform-origin: bottom center;
    animation: treeSway 6s ease-in-out infinite;
}

.tree-1 {
    left: -30px;
    transform: scale(0.9);
    animation-delay: 0s;
}

.tree-2 {
    right: -50px;
    transform: scale(0.7);
    animation-delay: -2s;
}

@keyframes treeSway {
    0%, 100% { transform: rotate(-1deg) scale(var(--tree-scale, 1)); }
    50% { transform: rotate(1.5deg) scale(var(--tree-scale, 1)); }
}

.tree-1 { --tree-scale: 0.9; }
.tree-2 { --tree-scale: 0.7; }

.trunk {
    width: 30px;
    height: 180px;
    background: linear-gradient(
        90deg,
        #4a3728 0%,
        #6b4c3a 30%,
        #5d4132 70%,
        #3d2b1f 100%
    );
    border-radius: 5px 5px 10px 10px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: inset -5px 0 10px rgba(0,0,0,0.2);
}

.trunk::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 60px;
    background: linear-gradient(
        90deg,
        #5d4132 0%,
        #6b4c3a 50%,
        #4a3728 100%
    );
    border-radius: 10px;
    top: 40px;
    left: -15px;
    transform: rotate(-30deg);
}

.foliage {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
}

.leaf-cluster {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        #FFB7C5 0%,
        #FF91A4 30%,
        #FF69B4 60%,
        #FF91A4 80%,
        transparent 100%
    );
    animation: clusterSway 4s ease-in-out infinite;
    box-shadow:
        inset 10px 10px 30px rgba(255, 255, 255, 0.3),
        0 5px 20px rgba(255, 105, 180, 0.2);
}

.cluster-1 {
    width: 100px;
    height: 90px;
    top: 20px;
    left: 50px;
    animation-delay: 0s;
}

.cluster-2 {
    width: 80px;
    height: 75px;
    top: 0;
    left: 90px;
    animation-delay: -1s;
}

.cluster-3 {
    width: 90px;
    height: 80px;
    top: 50px;
    left: 10px;
    animation-delay: -2s;
}

.cluster-4 {
    width: 70px;
    height: 65px;
    top: 60px;
    left: 110px;
    animation-delay: -0.5s;
}

.cluster-5 {
    width: 60px;
    height: 55px;
    top: 90px;
    left: 70px;
    animation-delay: -1.5s;
}

@keyframes clusterSway {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(3px, -2px) rotate(1deg); }
    50% { transform: translate(-2px, 2px) rotate(-1deg); }
    75% { transform: translate(2px, 1px) rotate(0.5deg); }
}

/* ========================================
   GRASS LAYERS
   ======================================== */

.grass-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    pointer-events: none;
}

.grass-layer {
    position: absolute;
    bottom: 0;
    left: -10%;
    right: -10%;
    background-repeat: repeat-x;
    background-position: bottom;
}

.grass-back {
    height: 140px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        #7CB342 20%,
        #689F38 60%,
        #558B2F 100%
    );
    opacity: 0.6;
    animation: grassWave 8s ease-in-out infinite;
    clip-path: polygon(
        0% 100%, 0% 50%,
        2% 42%, 4% 50%, 6% 38%, 8% 48%, 10% 40%,
        12% 52%, 14% 44%, 16% 55%, 18% 42%, 20% 48%,
        22% 36%, 24% 46%, 26% 34%, 28% 45%, 30% 40%,
        32% 52%, 34% 42%, 36% 48%, 38% 36%, 40% 46%,
        42% 40%, 44% 52%, 46% 44%, 48% 48%, 50% 38%,
        52% 48%, 54% 42%, 56% 52%, 58% 40%, 60% 46%,
        62% 36%, 64% 48%, 66% 42%, 68% 52%, 70% 44%,
        72% 48%, 74% 38%, 76% 46%, 78% 36%, 80% 48%,
        82% 44%, 84% 52%, 86% 42%, 88% 48%, 90% 38%,
        92% 46%, 94% 36%, 96% 48%, 98% 44%, 100% 50%,
        100% 100%
    );
}

.grass-mid {
    height: 100px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        #8BC34A 30%,
        #7CB342 70%,
        #689F38 100%
    );
    opacity: 0.8;
    animation: grassWave 6s ease-in-out infinite reverse;
    animation-delay: -1s;
    clip-path: polygon(
        0% 100%, 0% 40%,
        3% 32%, 6% 42%, 9% 28%, 12% 40%, 15% 32%,
        18% 48%, 21% 36%, 24% 42%, 27% 30%, 30% 40%,
        33% 34%, 36% 46%, 39% 36%, 42% 42%, 45% 30%,
        48% 40%, 51% 34%, 54% 48%, 57% 36%, 60% 42%,
        63% 28%, 66% 40%, 69% 34%, 72% 46%, 75% 36%,
        78% 42%, 81% 30%, 84% 40%, 87% 34%, 90% 48%,
        93% 36%, 96% 42%, 100% 38%, 100% 100%
    );
}

.grass-front {
    height: 70px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        #9CCC65 40%,
        #8BC34A 80%,
        #7CB342 100%
    );
    animation: grassWave 4s ease-in-out infinite;
    animation-delay: -2s;
    clip-path: polygon(
        0% 100%, 0% 30%,
        4% 22%, 8% 32%, 12% 18%, 16% 30%, 20% 22%,
        24% 38%, 28% 26%, 32% 32%, 36% 20%, 40% 30%,
        44% 24%, 48% 36%, 52% 26%, 56% 32%, 60% 20%,
        64% 30%, 68% 24%, 72% 38%, 76% 26%, 80% 32%,
        84% 18%, 88% 30%, 92% 24%, 96% 36%, 100% 28%,
        100% 100%
    );
}

@keyframes grassWave {
    0%, 100% {
        transform: translateX(0) scaleY(1);
    }
    50% {
        transform: translateX(10px) scaleY(1.02);
    }
}

/* ========================================
   FALLING CHERRY BLOSSOM PETALS
   ======================================== */

.petals-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.sakura-petal {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(
        ellipse at 30% 30%,
        #FFF0F5 0%,
        #FFB7C5 50%,
        #FF91A4 100%
    );
    border-radius: 50% 0 50% 50%;
    opacity: 0;
    animation: petalFall linear forwards;
    box-shadow: 0 2px 4px rgba(255, 105, 180, 0.2);
}

@keyframes petalFall {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0) rotate(0deg) scale(0.5);
    }
    10% {
        opacity: 0.8;
        transform: scale(1);
    }
    25% {
        transform: translateY(15vh) translateX(calc(var(--drift, 100px) * 0.3)) rotate(calc(var(--rotation, 720deg) * 0.2));
    }
    50% {
        transform: translateY(40vh) translateX(calc(var(--drift, 100px) * 0.6)) rotate(calc(var(--rotation, 720deg) * 0.5));
    }
    75% {
        transform: translateY(70vh) translateX(calc(var(--drift, 100px) * 0.85)) rotate(calc(var(--rotation, 720deg) * 0.75));
    }
    90% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) translateX(var(--drift, 100px)) rotate(var(--rotation, 720deg)) scale(0.8);
    }
}

/* Ensure content is above background */
.screen {
    position: relative;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
    padding: var(--spacing-md);
    padding-bottom: calc(var(--spacing-xxl) + 60px);
}

.screen.active {
    display: block;
}

/* Loading Screen */
#loading-screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-cream) 0%, #FFF5EE 100%);
}

.loading-content {
    text-align: center;
}

.logo-large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-lg);
    -webkit-text-stroke: 2px white;
    paint-order: stroke fill;
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.8),
        0 2px 10px rgba(224, 122, 95, 0.3);
}

.logo-large.auth-logo {
    font-size: 4rem;
    color: var(--primary);
    -webkit-text-stroke: 2px white;
    paint-order: stroke fill;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

@keyframes shimmer {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Auth Screen */
#auth-screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.auth-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-container h1 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.tagline {
    color: var(--text-medium);
    margin-bottom: var(--spacing-xl);
}

.auth-form {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: left;
}

.auth-switch {
    text-align: center;
    margin-top: var(--spacing-md);
    color: var(--text-medium);
    font-size: 0.9rem;
}

.forgot-password {
    text-align: center;
    margin-top: var(--spacing-md);
    font-size: 0.85rem;
}

.forgot-password a {
    color: var(--text-medium);
    text-decoration: none;
}

.forgot-password a:hover {
    color: var(--primary);
}

.form-description {
    color: var(--text-medium);
    margin-bottom: var(--spacing-lg);
    font-size: 0.9rem;
}

.btn-google {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn-google:hover {
    border-color: var(--text-light);
    background: var(--bg-cream);
}

.btn-google:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.google-icon {
    flex-shrink: 0;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(224, 122, 95, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #b5503d 100%);
    box-shadow: 0 6px 20px rgba(224, 122, 95, 0.4);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(129, 178, 154, 0.3);
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, #5a8570 100%);
    box-shadow: 0 6px 20px rgba(129, 178, 154, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 2px solid var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-back {
    background: transparent;
    color: var(--primary);
    padding: var(--spacing-sm) 0;
    font-weight: 600;
}

.btn-back:hover {
    color: var(--primary-dark);
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    background: var(--bg-white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.icon-profile {
    font-size: 1.5rem;
}

/* Header */
.screen-header {
    margin-bottom: var(--spacing-lg);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    -webkit-text-stroke: 1.5px white;
    paint-order: stroke fill;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.screen-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.screen-header p {
    color: var(--text-medium);
    margin-top: var(--spacing-xs);
}

/* Interests Screen */
.interests-container {
    padding-bottom: var(--spacing-xl);
}

/* Setup sections */
.setup-section {
    margin-bottom: var(--spacing-xl);
}

.setup-section h3 {
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

.section-subtitle {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

/* Avatar Grid with Pagination */
.avatar-grid {
    margin-bottom: var(--spacing-md);
}

.avatar-pagination {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.avatar-nav-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    line-height: 1;
    padding-bottom: 2px;
}

.avatar-nav-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.avatar-nav-btn:disabled {
    background: var(--border);
    color: var(--text-light);
    cursor: not-allowed;
}

.avatar-grid-inner {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-xs);
    flex: 1;
}

.avatar-page-indicator {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-medium);
    margin-top: var(--spacing-xs);
}

.avatar-option {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-option:hover {
    border-color: var(--primary-light);
    transform: scale(1.1);
}

.avatar-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.interests-count {
    text-align: center;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.interest-chip {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.interest-chip:hover {
    border-color: var(--primary-light);
}

.interest-chip.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.interest-tag {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--primary-light);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Groups List */
.groups-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.group-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,252,250,0.9) 100%);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow:
        var(--shadow-sm),
        0 0 20px rgba(255, 182, 193, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.group-card:hover {
    box-shadow:
        var(--shadow-md),
        0 0 30px rgba(255, 182, 193, 0.2);
    transform: translateY(-3px);
}

.group-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.group-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.group-card-info {
    flex: 1;
    min-width: 0;
}

.group-card h3 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
}

.group-card .member-count {
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* Group Icon Grid */
.group-icon-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--spacing-xs);
}

.group-icon-option {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--bg-cream);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.group-icon-option:hover {
    background: var(--bg-white);
    border-color: var(--primary-light);
}

.group-icon-option.selected {
    border-color: var(--primary);
    background: var(--bg-white);
}

/* Group Color Grid */
.group-color-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--spacing-xs);
}

.group-color-option {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.group-color-option:hover {
    transform: scale(1.1);
}

.group-color-option.selected {
    border-color: var(--text-dark);
    box-shadow: var(--shadow-md);
}

/* Group Settings */
.group-settings {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border);
}

.group-settings h4 {
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

.group-code-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.group-code-label {
    font-size: 0.85rem;
    color: var(--text-medium);
    font-weight: 600;
}

.group-code-value {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 3px;
}

.btn-small {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.8rem;
}

/* Bottom Actions */
.bottom-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-white);
    box-shadow: 0 -4px 16px rgba(61, 64, 91, 0.08);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.bottom-actions .btn {
    flex: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-xxl) var(--spacing-lg);
    color: var(--text-medium);
}

.empty-state p {
    margin-bottom: var(--spacing-sm);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(61, 64, 91, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(253,248,244,0.95) 100%);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow:
        0 20px 60px rgba(61, 64, 91, 0.2),
        0 0 40px rgba(255, 182, 193, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.modal-large {
    max-width: 600px;
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-cream);
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-medium);
}

.modal-content h3 {
    margin-bottom: var(--spacing-lg);
    padding-right: var(--spacing-xl);
}

/* Sections */
.section {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,252,250,0.9) 100%);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow:
        var(--shadow-sm),
        0 0 20px rgba(144, 238, 144, 0.08);
    margin-bottom: var(--spacing-md);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.section h3, .section h4 {
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

/* Members List */
.members-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.member-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
}

.member-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.4rem;
    color: white;
}

.member-name {
    flex: 1;
}

.member-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: var(--warning);
    color: var(--text-dark);
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* Current Pairings List */
.current-pairings-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.priority-message {
    color: var(--accent);
    font-weight: 600;
    text-align: center;
    padding: var(--spacing-md);
    background: var(--accent-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

/* Pairing Card */
.pairing-card {
    background: var(--bg-cream);
    color: var(--text-dark);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 2px solid transparent;
    position: relative;
}

.pairing-card.users-trio {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(224, 122, 95, 0.3);
}

.your-trio-label {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pairing-card.no-pairing-card {
    background: var(--bg-cream);
    color: var(--text-medium);
}

.no-pairing {
    color: var(--text-medium);
    padding: var(--spacing-md);
    text-align: center;
}

.pairing-members {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: var(--spacing-md);
    width: 100%;
}

.pairing-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 100px;
}

.pairing-member .member-avatar {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xs);
    flex-shrink: 0;
}

.users-trio .pairing-member .member-avatar {
    background: rgba(255, 255, 255, 0.3) !important;
}

.pairing-member .member-name {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
}

.shared-interests {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.users-trio .shared-interests {
    border-top-color: rgba(255, 255, 255, 0.3);
}

.shared-interests h4 {
    font-size: 0.85rem;
    margin-bottom: var(--spacing-sm);
    opacity: 0.9;
}

.shared-interests-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-xs);
}

.shared-tag {
    padding: 2px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
}

.users-trio .shared-tag {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Creator Actions */
.creator-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* Pairings List (All Pairings Modal) */
.pairings-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.pairing-item {
    background: var(--bg-cream);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.pairing-item .pairing-members {
    margin-bottom: var(--spacing-sm);
}

.pairing-item .member-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
}

/* History List */
.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.history-item {
    background: var(--bg-cream);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.history-item .round-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

.history-item .history-members {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.history-item .history-activity {
    font-size: 0.9rem;
    color: var(--text-medium);
}

.no-history {
    color: var(--text-light);
    text-align: center;
    padding: var(--spacing-md);
}

/* Profile Screen */
.profile-content {
    text-align: center;
}

.profile-info {
    margin-bottom: var(--spacing-lg);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto var(--spacing-md);
    box-shadow:
        0 4px 20px rgba(244, 163, 147, 0.3),
        0 0 30px rgba(255, 182, 193, 0.2);
}

#profile-name {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

#profile-email {
    color: var(--text-medium);
}

#edit-interests-btn {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
    min-height: auto;
}

.name-edit-row {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.name-edit-row .input-field {
    flex: 1;
}

.input-field {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
}

/* Reveal Screen */
#reveal-screen.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.reveal-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.reveal-countdown {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(61, 64, 91, 0.9);
    z-index: 200;
    transition: opacity 0.8s ease-out;
}

.reveal-countdown.fade-out {
    opacity: 0;
}

#countdown-number {
    font-size: 8rem;
    font-weight: 700;
    color: white;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.reveal-content h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
}

.reveal-card {
    perspective: 1000px;
    height: 350px;
    margin-bottom: var(--spacing-lg);
}

.reveal-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.reveal-card.flipped .reveal-card-inner {
    transform: rotateY(180deg);
}

.reveal-card-front,
.reveal-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.reveal-card-front {
    background: var(--bg-white);
}

.card-mystery {
    font-size: 6rem;
    color: var(--primary-light);
}

.reveal-card-back {
    background: var(--bg-white);
    transform: rotateY(180deg);
}

.reveal-members {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: var(--spacing-md);
    width: 100%;
}

.reveal-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 100px;
    perspective: 600px;
}

.reveal-member .member-avatar {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xs);
    flex-shrink: 0;
    transform-style: preserve-3d;
    transition: transform 0.8s ease-out, box-shadow 0.3s ease;
}

.reveal-member .member-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
}

.reveal-interests {
    margin-bottom: var(--spacing-md);
}

.reveal-interests h4 {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

/* Reveal animations */
.reveal-hidden {
    opacity: 0;
}

.reveal-member.reveal-hidden {
    perspective: 600px;
}

.reveal-member.reveal-hidden .member-avatar {
    transform: rotateY(180deg);
    opacity: 0;
}

.reveal-member.reveal-hidden .member-name {
    opacity: 0;
    transform: translateY(10px);
}

/* Card flip animation for avatars */
.reveal-member.reveal-animate .member-avatar {
    animation: avatarFlip 0.8s ease-out forwards;
}

.reveal-member.reveal-animate .member-name {
    animation: nameReveal 0.5s ease-out 0.6s forwards;
    opacity: 0;
}

@keyframes avatarFlip {
    0% {
        transform: rotateY(180deg) scale(0.5);
        opacity: 0;
        filter: brightness(2) blur(10px);
    }
    50% {
        transform: rotateY(90deg) scale(1.2);
        opacity: 0.5;
        filter: brightness(1.5) blur(5px);
    }
    75% {
        filter: brightness(1.3) blur(2px);
    }
    100% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
        filter: brightness(1) blur(0);
    }
}

@keyframes nameReveal {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sparkle container for members */
.reveal-member {
    position: relative;
}

.reveal-member.reveal-animate::before,
.reveal-member.reveal-animate::after {
    content: '✨';
    position: absolute;
    font-size: 1.2rem;
    animation: sparkle 1.5s ease-out forwards;
    pointer-events: none;
}

.reveal-member.reveal-animate::before {
    top: -10px;
    left: 50%;
    animation-delay: 0.2s;
}

.reveal-member.reveal-animate::after {
    top: 20px;
    right: -5px;
    animation-delay: 0.5s;
}

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(360deg) translateY(-20px);
    }
}

/* Glowing effect for revealed avatars */
.reveal-member.reveal-animate .member-avatar {
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.4),
        0 0 40px rgba(255, 215, 0, 0.2),
        0 0 60px rgba(255, 255, 255, 0.1);
    animation: avatarFlip 0.8s ease-out forwards, glowPulse 2s ease-in-out 0.8s infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(255, 215, 0, 0.3),
            0 0 40px rgba(255, 215, 0, 0.15);
    }
    50% {
        box-shadow:
            0 0 30px rgba(255, 215, 0, 0.5),
            0 0 60px rgba(255, 215, 0, 0.25),
            0 0 80px rgba(255, 255, 255, 0.15);
    }
}

/* Interest tags animation */
.shared-tag.reveal-hidden {
    opacity: 0;
    transform: scale(0.5);
}

.shared-tag.reveal-animate {
    animation: tagReveal 0.6s ease-out forwards;
}

@keyframes tagReveal {
    0% {
        opacity: 0;
        transform: scale(0.5);
        filter: brightness(2);
    }
    60% {
        transform: scale(1.15);
        filter: brightness(1.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }
}

/* Header reveal */
#reveal-interests h4.reveal-hidden {
    opacity: 0;
    transform: translateY(-10px);
}

#reveal-interests h4.reveal-animate {
    animation: headerReveal 0.5s ease-out forwards;
}

@keyframes headerReveal {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Angelic background glow on reveal screen */
#reveal-screen.active .reveal-card-back {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 250, 240, 1) 50%,
        rgba(255, 245, 230, 1) 100%
    );
    box-shadow:
        0 0 40px rgba(255, 215, 0, 0.2),
        0 0 80px rgba(255, 200, 150, 0.1),
        inset 0 0 60px rgba(255, 255, 255, 0.5);
}

/* Floating sparkle particles */
.floating-sparkle {
    opacity: 0;
}

@keyframes floatSparkle {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: scale(1.2) rotate(45deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) rotate(180deg) translateY(-60px);
    }
}

/* Make the reveal container position relative for sparkles */
.reveal-container {
    position: relative;
    overflow: visible;
}

/* Enhanced countdown with glow */
#countdown-number {
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(255, 215, 0, 0.5),
        0 0 60px rgba(255, 215, 0, 0.3);
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow:
            0 0 20px rgba(255, 255, 255, 0.8),
            0 0 40px rgba(255, 215, 0, 0.5);
    }
    50% {
        transform: scale(1.1);
        text-shadow:
            0 0 30px rgba(255, 255, 255, 1),
            0 0 60px rgba(255, 215, 0, 0.7),
            0 0 80px rgba(255, 200, 100, 0.4);
    }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-dark);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
    z-index: 300;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.active {
    opacity: 1;
}

.toast.error {
    background: var(--danger);
}

.toast.success {
    background: var(--accent);
}

/* Music Toggle Button */
.music-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-white);
    border: none;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.music-toggle:hover {
    transform: scale(1.1);
}

.music-toggle:active {
    transform: scale(0.95);
}

.music-icon {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
}

.music-icon .bar {
    width: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: height 0.2s;
}

.music-icon .bar:nth-child(1) { height: 6px; }
.music-icon .bar:nth-child(2) { height: 12px; }
.music-icon .bar:nth-child(3) { height: 8px; }

/* Music off - bars are short and muted */
.music-icon.music-off .bar {
    height: 4px;
    opacity: 0.4;
}

/* Music on - animated bars */
.music-icon.music-on .bar {
    animation: soundBars 0.8s ease-in-out infinite;
}

.music-icon.music-on .bar:nth-child(1) { animation-delay: 0s; }
.music-icon.music-on .bar:nth-child(2) { animation-delay: 0.2s; }
.music-icon.music-on .bar:nth-child(3) { animation-delay: 0.4s; }

@keyframes soundBars {
    0%, 100% { height: 6px; }
    50% { height: 14px; }
}

/* Error Message */
.error-message {
    background: #FEE;
    color: var(--danger);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive */
@media (min-width: 768px) {
    .screen {
        max-width: 600px;
        margin: 0 auto;
    }

    .bottom-actions {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
    }

    .modal-content {
        padding: var(--spacing-xl);
    }
}
