/* Prevent layout shift when scrollbar appears */
html {
    scrollbar-gutter: stable;
}

* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --ocean-deep: #0a4d68;
            --ocean-light: #088395;
            --sand: #f4e4c1;
            --palm: #2d7a3e;
            --sky: #87ceeb;
            --red: #ff4757;
            --yellow: #ffd93d;
            --orange: #ff8c42;
            --green: #6bcf7f;
            --blue: #4a90e2;
            --purple: #9b59b6;
            --shadow: rgba(0, 0, 0, 0.15);
        }

        body {
            font-family: 'Quicksand', sans-serif;
            background: linear-gradient(180deg, #87ceeb 0%, #b8e6f0 50%, #e8f4f8 100%);
            min-height: 100vh;
            overflow-x: hidden;
            transition: background 0.8s ease-in-out;
        }

        /* Auth Screen Styles */
        .auth-screen {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 20px;
            opacity: 1;
            transition: opacity 0.5s ease-out;
        }
        
        .auth-screen.fade-out {
            opacity: 0;
            pointer-events: none;
        }

        /* Main App transition */
        #mainApp {
            transition: opacity 0.6s ease-in;
        }
        
        /* World background transition */
        .world-background {
            transition: opacity 0.8s ease-in-out;
        }
        
        /* Loading overlay for smooth transition */
        .transition-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(180deg, #87ceeb 0%, #b8e6f0 50%, #e8f4f8 100%);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 15px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease-in-out;
        }
        
        .transition-overlay.active {
            opacity: 1;
            pointer-events: all;
        }
        
        .transition-overlay .loading-icon {
            font-size: 3rem;
            animation: bounce 0.8s ease-in-out infinite;
        }
        
        .transition-overlay .loading-text {
            font-family: 'Fredoka', sans-serif;
            font-size: 1.5rem;
            color: #2a7d8c;
            animation: pulse 1.2s ease-in-out infinite;
        }
        
        @keyframes pulse {
            0%, 100% { opacity: 0.6; transform: scale(1); }
            50% { opacity: 1; transform: scale(1.05); }
        }
        
        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        .auth-container {
            background: white;
            border-radius: 24px;
            padding: 40px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.15);
            max-width: 400px;
            width: 100%;
            text-align: center;
            border: 3px solid #0d9488;
        }

        .auth-container h1 {
            font-family: 'Fredoka', sans-serif;
            font-size: 2rem;
            color: var(--ocean-deep);
            margin-bottom: 10px;
        }

        .auth-container .subtitle {
            margin-bottom: 30px;
            font-size: 1.2rem;
            font-weight: 600;
            letter-spacing: 0.5px;
        }
        
        .auth-container .subtitle .part1 {
            color: #0d9488;
        }
        
        .auth-container .subtitle .part2 {
            color: #7c3aed;
        }
        
        .auth-container .subtitle .part3 {
            color: #dc2626;
        }

        .auth-tabs {
            display: flex;
            margin-bottom: 20px;
            border-radius: 12px;
            overflow: hidden;
            border: 2px solid var(--ocean-light);
        }

        .auth-tab {
            flex: 1;
            padding: 12px;
            border: none;
            background: white;
            font-family: 'Quicksand', sans-serif;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

        .auth-tab.active {
            background: var(--ocean-light);
            color: white;
        }

        .auth-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .auth-form input {
            padding: 15px;
            border: 2px solid #14b8a6;
            border-radius: 12px;
            font-size: 1rem;
            font-family: 'Quicksand', sans-serif;
            transition: border-color 0.3s;
        }

        .auth-form input:focus {
            outline: none;
            border-color: #0d9488;
            box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
        }

        /* Password visibility toggle */
        .password-input-wrapper {
            position: relative;
            width: 100%;
        }

        .password-input-wrapper input {
            width: 100%;
            padding-right: 50px;
        }

        .password-toggle-btn {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            cursor: pointer;
            padding: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #94a3b8;
            transition: color 0.2s;
        }

        .password-toggle-btn:hover {
            color: #0d9488;
        }

        .password-toggle-btn .eye-icon {
            width: 22px;
            height: 22px;
        }

        .auth-btn {
            background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));
            color: white;
            border: none;
            border-radius: 12px;
            padding: 15px;
            font-size: 1.1rem;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            font-family: 'Quicksand', sans-serif;
        }

        .auth-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(10, 77, 104, 0.3);
        }

        .auth-error {
            background: #ffe0e0;
            color: #c0392b;
            padding: 12px;
            border-radius: 8px;
            font-size: 0.9rem;
            display: none;
        }

        .auth-success {
            background: #e0ffe0;
            color: #27ae60;
            padding: 12px;
            border-radius: 8px;
            font-size: 0.9rem;
            display: none;
        }

        /* Role toggle buttons (Parent/Teacher selection) */
        .role-toggle {
            display: flex;
            gap: 15px;
            margin-bottom: 5px;
        }

        .role-toggle-btn {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            padding: 15px;
            border: 2px solid #14b8a6;
            border-radius: 12px;
            background: #fff;
            cursor: pointer;
            transition: all 0.3s;
            font-family: 'Quicksand', sans-serif;
            font-weight: 600;
            color: #333;
        }

        .role-toggle-btn:hover {
            border-color: #0d9488;
            background: #f0fdfa;
        }

        .role-toggle-btn.active {
            border-color: #7c3aed;
            background: #f3e8ff;
            color: #7c3aed;
        }

        .role-toggle-icon {
            font-size: 1.5rem;
        }

        /* Name row (First Name / Surname side by side) */
        .name-row {
            display: flex;
            gap: 15px;
        }

        .name-row input {
            flex: 1;
            min-width: 0;
            box-sizing: border-box;
        }

        .user-bar {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            padding: 10px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            z-index: 1000;
        }
        
        .user-bar .wallet-display {
            margin-top: 0;
            padding: 6px 14px;
            font-size: 0.9rem;
        }
        
        .user-bar .wallet-display.wallet-compact {
            padding: 4px 10px;
            border-radius: 20px;
            border-width: 2px;
            box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
            gap: 4px;
        }
        
        .user-bar .wallet-compact .wallet-icon {
            font-size: 0.85rem;
        }
        
        .user-bar .wallet-compact .wallet-points {
            font-size: 0.95rem;
        }
        
        .user-bar .wallet-label {
            font-size: 0.85rem;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
            color: var(--ocean-deep);
        }

        .logout-btn {
            background: var(--red);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 8px 16px;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            font-family: 'Quicksand', sans-serif;
        }

        .floating-words {
            position: fixed;
            top: 60px;
            left: 0;
            width: 100%;
            height: calc(100% - 60px);
            pointer-events: none;
            z-index: 0;
            overflow: hidden;
        }

        .floating-word {
            position: absolute;
            font-family: 'Fredoka', cursive;
            font-size: 1.4rem;
            font-weight: 600;
            color: rgba(10, 77, 104, 0.15);
            text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
            white-space: nowrap;
            animation: floatWord linear infinite;
            left: -200px;
        }

        .floating-word:nth-child(odd) {
            color: rgba(8, 131, 149, 0.12);
        }

        .floating-word:nth-child(3n) {
            font-size: 1.1rem;
        }

        .floating-word:nth-child(4n) {
            font-size: 1.8rem;
        }

        @keyframes floatWord {
            from {
                transform: translateX(0);
            }
            to {
                transform: translateX(calc(100vw + 400px));
            }
        }

        .waves {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 150px;
            pointer-events: none;
            z-index: 0;
        }

        .wave {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 200%;
            height: 100%;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,60 Q300,0 600,60 T1200,60 L1200,120 L0,120 Z" fill="%230a4d68" opacity="0.3"/></svg>') repeat-x;
            animation: wave 15s linear infinite;
        }

        .wave:nth-child(2) {
            animation: wave 20s linear infinite reverse;
            opacity: 0.5;
        }

        @keyframes wave {
            from {
                transform: translateX(0);
            }
            to {
                transform: translateX(-50%);
            }
        }

        .container {
            position: relative;
            z-index: 1;
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }

        header {
            text-align: center;
            margin-bottom: 40px;
            animation: fadeInDown 0.8s ease-out;
        }

        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        h1 {
            font-family: 'Fredoka', cursive;
            font-size: clamp(2.5rem, 8vw, 4.5rem);
            color: var(--ocean-deep);
            text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.8);
            margin-bottom: 5px;
            font-weight: 700;
        }
        
        h1.rainbow-title {
            text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.9),
                         4px 4px 0 rgba(0, 0, 0, 0.1);
        }
        
        h1.rainbow-title span {
            display: inline-block;
        }
        
        h1.rainbow-title:hover span {
            animation: letterBounce 0.4s ease forwards;
        }
        
        h1.rainbow-title span:nth-child(1) { animation-delay: 0s; }
        h1.rainbow-title span:nth-child(2) { animation-delay: 0.03s; }
        h1.rainbow-title span:nth-child(3) { animation-delay: 0.06s; }
        h1.rainbow-title span:nth-child(4) { animation-delay: 0.09s; }
        h1.rainbow-title span:nth-child(5) { animation-delay: 0.15s; }
        h1.rainbow-title span:nth-child(6) { animation-delay: 0.18s; }
        h1.rainbow-title span:nth-child(7) { animation-delay: 0.21s; }
        h1.rainbow-title span:nth-child(8) { animation-delay: 0.24s; }
        h1.rainbow-title span:nth-child(9) { animation-delay: 0.27s; }
        
        @keyframes letterBounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-8px); }
        }

        .subtitle {
            font-size: 1.3rem;
            color: var(--ocean-light);
            font-weight: 600;
        }

        /* Daily Quote Tagline (shows after streak secured) */
        .daily-quote-tagline {
            min-height: 0;
            max-width: 600px;
            margin: 0 auto;
            text-align: center;
            transition: all 0.5s ease;
        }

        .daily-quote-tagline.has-quote {
            padding: 15px 20px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
            border-radius: 15px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(5px);
        }

        .daily-quote-tagline .tagline-quote {
            display: block;
            font-family: 'Georgia', serif;
            font-size: 1rem;
            font-style: italic;
            color: #fff;
            line-height: 1.5;
            margin-bottom: 5px;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        }

        .daily-quote-tagline .tagline-author {
            display: block;
            font-family: 'Fredoka', cursive;
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.8);
        }

        @media (max-width: 480px) {
            .daily-quote-tagline .tagline-quote {
                font-size: 0.9rem;
            }
            .daily-quote-tagline .tagline-author {
                font-size: 0.75rem;
            }
        }

        .wallet-display {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(135deg, #ffd700, #ffb347);
            padding: 12px 24px;
            border-radius: 50px;
            margin-top: 15px;
            box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
            border: 3px solid #e6ac00;
        }

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

        .wallet-points {
            font-family: 'Fredoka', cursive;
            font-size: 1.8rem;
            font-weight: 700;
            color: #5a4000;
        }

        .wallet-label {
            font-size: 1rem;
            font-weight: 600;
            color: #5a4000;
        }

        .streak-leaderboard-bar {
            display: inline-flex;
            align-items: stretch;
            margin-top: 15px;
            border-radius: 50px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        .streak-display {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(135deg, #ff6b35, #f7931e);
            padding: 12px 20px 12px 24px;
            border-radius: 0;
            margin-top: 0;
            box-shadow: none;
            border: none;
        }

        .streak-display.frozen {
            background: linear-gradient(135deg, #a0c4e8, #7fb3d9);
        }

        .streak-icon {
            font-size: 1.5rem;
            position: relative;
        }

        .streak-count {
            font-family: 'Fredoka', cursive;
            font-size: 1.8rem;
            font-weight: 700;
            color: #5a1a00;
        }

        .streak-display.frozen .streak-count {
            color: #1a4a6e;
        }

        .streak-label {
            font-size: 1rem;
            font-weight: 600;
            color: #5a1a00;
        }

        .streak-display.frozen .streak-label {
            color: #1a4a6e;
        }

        .streak-progress {
            font-family: 'Fredoka', cursive;
            font-size: 0.9rem;
            font-weight: 600;
            color: #5a1a00;
            background: rgba(255, 255, 255, 0.3);
            padding: 4px 8px;
            border-radius: 12px;
            margin-left: 4px;
        }

        .streak-display.frozen .streak-progress {
            color: #1a4a6e;
            background: rgba(255, 255, 255, 0.4);
        }

        .header-controls {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 15px;
            margin-top: 5px;
            flex-wrap: wrap;
        }

        .header-leaderboard-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 24px 12px 20px;
            border-radius: 0;
            background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
            border: none;
            cursor: pointer;
            box-shadow: none;
            transition: filter 0.2s;
            font-family: 'Quicksand', sans-serif;
            position: relative;
        }

        .header-leaderboard-btn:hover {
            filter: brightness(1.1);
        }

        .header-leaderboard-btn:active {
            filter: brightness(0.95);
        }

        .header-leaderboard-btn .leaderboard-icon {
            font-size: 1.3rem;
        }

        .header-leaderboard-btn .leaderboard-text {
            font-size: 1rem;
            font-weight: 700;
            color: white;
        }

        .friends-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 50px;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(10, 77, 104, 0.4);
            font-family: 'Quicksand', sans-serif;
        }

        .friends-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(10, 77, 104, 0.5);
        }

        .friends-btn span:first-child {
            font-size: 1.3rem;
        }

        .points-change {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-family: 'Fredoka', cursive;
            font-size: 3rem;
            font-weight: 700;
            z-index: 2000;
            pointer-events: none;
            animation: pointsFloat 1.5s ease-out forwards;
        }

        .points-change.positive {
            color: var(--green);
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
        }

        .points-change.negative {
            color: var(--red);
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
        }

        @keyframes pointsFloat {
            0% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(0.5);
            }
            20% {
                transform: translate(-50%, -50%) scale(1.2);
            }
            40% {
                transform: translate(-50%, -50%) scale(1);
            }
            100% {
                opacity: 0;
                transform: translate(-50%, -150%) scale(1);
            }
        }

        .friends-panel {
            display: none;
            position: fixed;
            top: 0;
            right: -400px;
            width: 400px;
            max-width: 100%;
            height: 100%;
            background: white;
            z-index: 1001;
            box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
            transition: right 0.3s ease;
            overflow-y: auto;
        }

        .friends-panel.open {
            right: 0;
        }

        .friends-content {
            padding: 20px;
        }

        .friends-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid #eee;
        }

        .friends-header h2 {
            font-family: 'Fredoka', cursive;
            color: var(--ocean-deep);
            font-size: 1.5rem;
            margin: 0;
        }

        .close-btn {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: #999;
            transition: color 0.3s;
        }

        .close-btn:hover {
            color: var(--red);
        }

        .your-stats {
            display: flex;
            align-items: center;
            gap: 15px;
            background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));
            padding: 20px;
            border-radius: 15px;
            margin-bottom: 20px;
            color: white;
        }

        .your-avatar {
            font-size: 2.5rem;
            background: rgba(255, 255, 255, 0.2);
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .your-info {
            flex: 1;
        }

        .your-name {
            font-family: 'Fredoka', cursive;
            font-size: 1.3rem;
            font-weight: 700;
        }

        .your-details {
            display: flex;
            gap: 15px;
            font-size: 0.9rem;
            margin-top: 5px;
            opacity: 0.9;
        }

        .your-rank {
            font-family: 'Fredoka', cursive;
            font-size: 1.8rem;
            font-weight: 700;
            background: rgba(255, 255, 255, 0.2);
            padding: 10px 15px;
            border-radius: 10px;
        }

        /* Main Friends/Global Toggle Tabs */
        .main-leaderboard-tabs {
            display: flex;
            gap: 0;
            margin-bottom: 20px;
            background: #e9ecef;
            border-radius: 12px;
            padding: 4px;
        }

        .main-tab {
            flex: 1;
            padding: 12px 16px;
            border: none;
            background: transparent;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            font-family: 'Quicksand', sans-serif;
            color: #666;
        }

        .main-tab:hover {
            color: var(--ocean-deep);
        }

        .main-tab.active {
            background: white;
            color: var(--ocean-deep);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .global-stats {
            background: linear-gradient(135deg, #7c3aed, #a855f7);
        }

        .global-list {
            max-height: 400px;
            overflow-y: auto;
        }

        /* ===== REWARDS TAB STYLES ===== */
        .rewards-intro {
            text-align: center;
            padding: 12px;
            background: linear-gradient(135deg, #fef3c7, #fde68a);
            border-radius: 12px;
            margin-bottom: 16px;
            font-weight: 600;
            color: #92400e;
        }

        .rewards-contracts {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 16px;
        }

        .reward-contract-card {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border: 2px solid #e2e8f0;
            border-radius: 16px;
            padding: 16px;
            position: relative;
            overflow: hidden;
        }

        .contract-delete-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 28px;
            height: 28px;
            border: none;
            border-radius: 50%;
            font-size: 0.85rem;
            cursor: pointer;
            opacity: 0.6;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #fee2e2;
            color: #dc2626;
            z-index: 10;
        }

        .contract-delete-btn:hover {
            opacity: 1;
            background: #fecaca;
        }

        /* Contract PIN Modal */
        .contract-pin-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
            z-index: 20000;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .contract-pin-modal {
            background: white;
            border-radius: 16px;
            padding: 24px;
            max-width: 300px;
            width: 90%;
            text-align: center;
        }

        .contract-pin-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 16px;
        }

        .contract-pin-modal input {
            width: 100%;
            padding: 12px;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            font-size: 1.5rem;
            text-align: center;
            letter-spacing: 8px;
            margin-bottom: 8px;
        }

        .contract-pin-modal input:focus {
            outline: none;
            border-color: #7c3aed;
        }

        .contract-pin-error {
            color: #dc2626;
            font-size: 0.85rem;
            min-height: 20px;
            margin-bottom: 12px;
        }

        .contract-pin-buttons {
            display: flex;
            gap: 10px;
        }

        .contract-pin-cancel,
        .contract-pin-confirm {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
        }

        .contract-pin-cancel {
            background: #f1f5f9;
            color: #475569;
        }

        .contract-pin-confirm {
            background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));
            color: white;
        }

        .reward-contract-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #8b5cf6, #a855f7, #d946ef);
        }

        .contract-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 12px;
        }

        .contract-goal-text {
            font-weight: 700;
            font-size: 1rem;
            color: #1e293b;
        }

        .contract-reward-text {
            font-size: 0.9rem;
            color: #7c3aed;
            font-weight: 600;
        }

        .contract-progress-section {
            margin: 12px 0;
        }

        .contract-progress-bar {
            height: 24px;
            background: #e2e8f0;
            border-radius: 12px;
            overflow: hidden;
            position: relative;
        }

        .contract-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #8b5cf6, #a855f7, #fbbf24);
            border-radius: 12px;
            transition: width 0.5s ease;
            position: relative;
        }

        .contract-progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .contract-progress-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-weight: 700;
            font-size: 0.85rem;
            color: #1e293b;
            text-shadow: 0 1px 2px rgba(255,255,255,0.8);
        }

        .contract-signatures {
            display: flex;
            gap: 16px;
            margin-top: 12px;
            font-size: 0.8rem;
            color: #16a34a;
        }

        .contract-signatures span {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .no-contracts {
            text-align: center;
            padding: 32px 16px;
            color: #64748b;
        }

        .no-contracts-icon {
            font-size: 3rem;
            margin-bottom: 12px;
            opacity: 0.5;
        }

        .no-contracts-hint {
            font-size: 0.85rem;
            color: #94a3b8;
        }

        .new-contract-btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #7c3aed, #a855f7);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
        }

        .new-contract-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
        }

        .new-contract-btn:disabled {
            background: #cbd5e1;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .past-rewards {
            margin-top: 20px;
            border-top: 2px solid #e2e8f0;
            padding-top: 16px;
        }

        .past-rewards-header {
            font-weight: 700;
            color: #64748b;
            margin-bottom: 12px;
            font-size: 0.9rem;
        }

        .past-reward-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px;
            background: #f1f5f9;
            border-radius: 10px;
            margin-bottom: 8px;
            font-size: 0.85rem;
        }

        .past-reward-item .checkmark {
            color: #16a34a;
            font-size: 1.2rem;
        }

        /* Reward Modal Styles */
        .reward-modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 1000;
        }

        .reward-modal-overlay.open {
            display: block;
        }

        .reward-modal {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            border-radius: 20px;
            width: 90%;
            max-width: 400px;
            max-height: 85vh;
            overflow-y: auto;
            z-index: 1001;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }

        .reward-modal.open {
            display: block;
            animation: modalSlideIn 0.3s ease;
        }

        @keyframes modalSlideIn {
            from {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.9);
            }
            to {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
        }

        .reward-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            border-bottom: 2px solid #f1f5f9;
        }

        .reward-modal-header h3 {
            margin: 0;
            font-size: 1.2rem;
            color: #1e293b;
        }

        .reward-modal-body {
            padding: 20px;
        }

        .reward-step {
            text-align: center;
        }

        .step-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 16px;
        }

        .pin-input-group {
            margin: 20px 0;
        }

        .pin-input {
            width: 120px;
            padding: 16px;
            font-size: 1.5rem;
            text-align: center;
            border: 3px solid #e2e8f0;
            border-radius: 12px;
            letter-spacing: 8px;
            font-family: monospace;
        }

        .pin-input:focus {
            outline: none;
            border-color: #7c3aed;
        }

        .pin-error {
            color: #dc2626;
            font-weight: 600;
            margin-top: 12px;
        }

        .reward-btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #7c3aed, #a855f7);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            margin-top: 16px;
        }

        .reward-btn:disabled {
            background: #cbd5e1;
            cursor: not-allowed;
        }

        .goal-options {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 20px;
        }

        .goal-option {
            cursor: pointer;
        }

        .goal-option input {
            display: none;
        }

        .goal-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 16px 10px;
            background: #f8fafc;
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            transition: all 0.2s;
        }

        .goal-option input:checked + .goal-card {
            border-color: #7c3aed;
            background: #f3e8ff;
        }

        .goal-icon {
            font-size: 1.8rem;
            margin-bottom: 6px;
        }

        .goal-name {
            font-size: 0.8rem;
            font-weight: 600;
            color: #475569;
        }

        .goal-target {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 12px;
            background: #f8fafc;
            border-radius: 10px;
        }

        .goal-target label {
            font-weight: 600;
            color: #475569;
        }

        .target-input {
            width: 80px;
            padding: 8px 12px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            font-size: 1rem;
            text-align: center;
            font-weight: 600;
        }

        #goalTargetUnit {
            color: #64748b;
            font-size: 0.9rem;
        }

        .goal-hint {
            background: #fef9c3;
            border: 1px solid #fde047;
            border-radius: 8px;
            padding: 10px 14px;
            font-size: 0.85rem;
            color: #854d0e;
            text-align: center;
            margin-top: 10px;
        }

        /* Inline Practice Level Settings */
        .inline-practice-settings {
            background: #f0f9ff;
            border: 1px solid #bae6fd;
            border-radius: 10px;
            padding: 12px;
            margin-top: 12px;
            display: none;
        }
        
        .inline-practice-settings.visible {
            display: block;
        }
        
        .inline-practice-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            font-size: 0.85rem;
            font-weight: 600;
            color: #0369a1;
        }
        
        .inline-practice-current {
            background: #0ea5e9;
            color: white;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.75rem;
        }
        
        .inline-practice-options {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        
        .inline-level-option {
            flex: 1;
            min-width: calc(50% - 3px);
        }
        
        .inline-level-option input {
            display: none;
        }
        
        .inline-level-option span {
            display: block;
            padding: 8px 6px;
            background: white;
            border: 2px solid #e0e7ff;
            border-radius: 8px;
            font-size: 0.8rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .inline-level-option input:checked + span {
            background: #0ea5e9;
            border-color: #0ea5e9;
            color: white;
        }
        
        .inline-level-option span:hover {
            border-color: #0ea5e9;
        }

        .reward-input {
            width: 100%;
            padding: 14px;
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            font-size: 1rem;
            margin-bottom: 12px;
        }

        .reward-input:focus {
            outline: none;
            border-color: #7c3aed;
        }

        .reward-guidance {
            font-size: 0.9rem;
            color: #64748b;
            margin-bottom: 12px;
            text-align: center;
        }

        .reward-examples {
            background: #f8fafc;
            border-radius: 10px;
            padding: 12px 16px;
            margin-bottom: 16px;
        }

        .reward-examples-title {
            font-weight: 600;
            font-size: 0.85rem;
            color: #475569;
            margin-bottom: 8px;
        }

        .reward-examples-list {
            margin: 0;
            padding-left: 20px;
            font-size: 0.85rem;
            color: #64748b;
        }

        .reward-examples-list li {
            margin-bottom: 4px;
        }

        .reward-step-buttons {
            display: flex;
            gap: 10px;
        }

        .reward-btn-back {
            flex: 0 0 auto;
            padding: 14px 20px;
            background: #f1f5f9;
            color: #475569;
            border: none;
            border-radius: 12px;
            font-family: 'Quicksand', sans-serif;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
            line-height: 1.5;
            margin-top: 0;
        }

        .reward-btn-back:hover {
            background: #e2e8f0;
        }

        .reward-step-buttons .reward-btn {
            flex: 1;
            line-height: 1.5;
            padding: 14px 20px;
            margin-top: 0;
        }

        .contract-preview {
            margin: 16px 0;
        }

        .contract-paper {
            background: linear-gradient(135deg, #fffbeb, #fef3c7);
            border: 2px solid #fbbf24;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
        }

        .contract-header {
            font-size: 1.1rem;
            font-weight: 700;
            color: #92400e;
            margin-bottom: 12px;
        }

        .contract-goal {
            font-size: 1rem;
            color: #1e293b;
            margin-bottom: 8px;
        }

        .contract-reward {
            font-size: 1.1rem;
            font-weight: 700;
            color: #7c3aed;
            margin-bottom: 16px;
        }

        .contract-preview .contract-signatures {
            display: flex;
            justify-content: center;
            gap: 20px;
        }

        .signature-box {
            width: 100px;
            padding: 12px;
            background: white;
            border: 2px dashed #cbd5e1;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .signature-box:hover {
            border-color: #7c3aed;
        }

        .signature-box.signed {
            border-style: solid;
            border-color: #16a34a;
            background: #f0fdf4;
        }

        .signature-placeholder {
            font-size: 1.5rem;
            margin-bottom: 4px;
        }

        .signature-tap {
            font-size: 0.7rem;
            color: #94a3b8;
        }

        .signature-box.signed .signature-tap {
            color: #16a34a;
            font-weight: 600;
        }

        .signature-box.signed .signature-tap::before {
            content: 'ÃƒÂ¢Ã…â€œÃ¢â‚¬Å“ ';
        }

        /* Celebration Modal */
        .celebration-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            z-index: 2000;
        }

        .celebration-overlay.open {
            display: block;
        }

        .celebration-modal {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: linear-gradient(135deg, #fef3c7, #fde68a);
            border: 4px solid #fbbf24;
            border-radius: 24px;
            padding: 32px;
            text-align: center;
            z-index: 2001;
            max-width: 350px;
            width: 90%;
        }

        .celebration-modal.open {
            display: block;
            animation: celebrationPop 0.5s ease;
        }

        @keyframes celebrationPop {
            0% {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.5);
            }
            50% {
                transform: translate(-50%, -50%) scale(1.1);
            }
            100% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
        }

        .celebration-content {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin-bottom: 16px;
        }

        .celebration-lightning {
            font-size: 2.5rem;
            animation: lightningFlash 0.3s infinite alternate;
        }

        @keyframes lightningFlash {
            from { opacity: 0.5; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1.1); }
        }

        .celebration-icon {
            font-size: 4rem;
            animation: celebrationBounce 0.5s infinite alternate;
        }

        @keyframes celebrationBounce {
            from { transform: translateY(0); }
            to { transform: translateY(-10px); }
        }

        .celebration-title {
            font-size: 1.5rem;
            color: #92400e;
            margin-bottom: 12px;
        }

        .celebration-reward {
            font-size: 1.2rem;
            color: #7c3aed;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .celebration-hint {
            color: #78716c;
            font-size: 0.9rem;
            margin-bottom: 20px;
        }

        .celebration-btn {
            background: linear-gradient(135deg, #7c3aed, #a855f7);
            color: white;
            border: none;
            padding: 14px 32px;
            border-radius: 12px;
            font-size: 1.1rem;
            font-weight: 700;
            cursor: pointer;
        }

        /* ===== END REWARDS STYLES ===== */

        /* Toast notifications */
        @keyframes toastIn {
            from { opacity: 0; transform: translateX(-50%) translateY(20px); }
            to { opacity: 1; transform: translateX(-50%) translateY(0); }
        }
        @keyframes toastOut {
            from { opacity: 1; transform: translateX(-50%) translateY(0); }
            to { opacity: 0; transform: translateX(-50%) translateY(20px); }
        }

        /* Smaller tabs for global leaderboard (3 tabs) */
        .global-tabs .tab-btn {
            padding: 8px 6px;
            font-size: 0.75rem;
        }

        .leaderboard-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
        }

        .tab-btn {
            flex: 1;
            padding: 10px;
            border: 2px solid var(--ocean-light);
            background: white;
            border-radius: 10px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            font-family: 'Quicksand', sans-serif;
        }

        .tab-btn:hover {
            background: #f0f8ff;
        }

        .tab-btn.active {
            background: var(--ocean-light);
            color: white;
            border-color: var(--ocean-light);
        }

        .friends-list {
            max-height: 400px;
            overflow-y: auto;
        }

        .friend-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 15px;
            border-radius: 12px;
            margin-bottom: 8px;
            background: #f8f9fa;
            transition: all 0.3s;
            position: relative;
        }

        .friend-item:hover {
            background: #e9ecef;
            transform: translateX(5px);
        }

        .friend-item.top-3 {
            background: linear-gradient(135deg, #fff9e6, #fff3cd);
            border: 2px solid #ffd700;
        }

        .friend-item.is-user {
            background: linear-gradient(135deg, #e6f3ff, #cce5ff);
            border: 2px solid var(--ocean-light);
        }

        .friend-item.is-user.top-3 {
            background: linear-gradient(135deg, #e6ffed, #c3f7d4);
            border: 2px solid var(--green);
        }

        .delete-friend-btn {
            background: var(--red);
            color: white;
            border: none;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            font-size: 0.75rem;
            font-weight: 700;
            cursor: pointer;
            position: absolute;
            right: -6px;
            top: -6px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            line-height: 1;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .delete-friend-btn:hover {
            background: #e63946;
            transform: scale(1.15);
        }

        /* Pending friend request styles */
        .friend-item.pending-request {
            background: linear-gradient(135deg, #fefce8, #fef9c3);
            border: 2px dashed #f59e0b;
            opacity: 0.95;
        }

        .friend-item.pending-request:hover {
            background: linear-gradient(135deg, #fef9c3, #fef08a);
            transform: translateX(0);
        }

        .pending-icon {
            font-size: 1.1rem;
            min-width: 30px;
            text-align: center;
        }

        .pending-label {
            color: #d97706;
            font-weight: 600;
            font-style: italic;
        }

        .pending-actions {
            display: flex;
            gap: 6px;
            flex-shrink: 0;
        }

        .pending-accept-btn,
        .pending-decline-btn {
            border: none;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            font-size: 1rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        }

        .pending-accept-btn {
            background: #22c55e;
            color: white;
        }

        .pending-accept-btn:hover {
            background: #16a34a;
            transform: scale(1.12);
        }

        .pending-decline-btn {
            background: #ef4444;
            color: white;
        }

        .pending-decline-btn:hover {
            background: #dc2626;
            transform: scale(1.12);
        }

        /* Pending requests badge on leaderboard button */
        .pending-requests-badge {
            position: absolute;
            top: -6px;
            right: -6px;
            background: #ef4444;
            color: white;
            font-size: 0.7rem;
            font-weight: 700;
            min-width: 18px;
            height: 18px;
            border-radius: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 4px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            animation: badgePulse 2s ease-in-out infinite;
        }

        @keyframes badgePulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.15); }
        }

        .friend-rank {
            font-family: 'Fredoka', cursive;
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--ocean-deep);
            min-width: 30px;
        }

        .friend-rank.gold { color: #ffd700; }
        .friend-rank.silver { color: #c0c0c0; }
        .friend-rank.bronze { color: #cd7f32; }

        .friend-avatar {
            font-size: 1.8rem;
            width: 45px;
            height: 45px;
            background: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .friend-info {
            flex: 1;
        }

        .friend-name {
            font-weight: 700;
            color: #333;
            font-size: 1rem;
        }

        .friend-stat {
            font-size: 0.85rem;
            color: #666;
            margin-top: 2px;
        }

        .friend-value {
            font-family: 'Fredoka', cursive;
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--ocean-light);
        }


        .add-friend-section {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 2px solid #eee;
            display: flex;
            gap: 10px;
        }

        .add-friend-input {
            flex: 1;
            padding: 12px 15px;
            border: 2px solid #ddd;
            border-radius: 10px;
            font-size: 1rem;
            font-family: 'Quicksand', sans-serif;
        }

        .add-friend-input:focus {
            outline: none;
            border-color: var(--ocean-light);
        }

        .add-friend-btn {
            padding: 12px 20px;
            font-size: 0.9rem;
        }

        .friends-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
        }

        .friends-overlay.open {
            display: block;
        }

        .confetti-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 2000;
            overflow: hidden;
        }

        .confetti {
            position: absolute;
            width: 10px;
            height: 10px;
            opacity: 0;
            animation: confetti-fall 3s ease-out forwards;
        }

        .confetti.circle {
            border-radius: 50%;
        }

        .confetti.square {
            border-radius: 2px;
        }

        .confetti.triangle {
            width: 0;
            height: 0;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-bottom: 10px solid currentColor;
            background: transparent !important;
        }

        @keyframes confetti-fall {
            0% {
                opacity: 1;
                transform: translateY(-10px) rotate(0deg) scale(1);
            }
            100% {
                opacity: 0;
                transform: translateY(100vh) rotate(720deg) scale(0.5);
            }
        }

        .landing {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 40px;
            animation: fadeIn 1s ease-in;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .islands-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 40px;
            width: 100%;
            max-width: 1200px;
        }

        .island-card {
            position: relative;
            background: linear-gradient(135deg, var(--sand) 0%, #e8d4a0 100%);
            border-radius: 50% 50% 45% 45% / 30% 30% 70% 70%;
            padding: 60px 40px;
            cursor: pointer;
            transition: all 0.4s ease;
            box-shadow: 0 10px 30px var(--shadow),
                        inset 0 -10px 20px rgba(0, 0, 0, 0.1);
            border: 5px solid var(--palm);
        }

        .island-card:hover {
            transform: translateY(-10px) scale(1.03);
            box-shadow: 0 20px 50px var(--shadow);
        }

        .island-number {
            font-family: 'Fredoka', cursive;
            font-size: 3rem;
            color: var(--ocean-deep);
            font-weight: 700;
            margin-bottom: 10px;
        }

        .island-name {
            font-size: 1.5rem;
            color: var(--ocean-light);
            font-weight: 600;
            margin-bottom: 15px;
        }

        .island-progress {
            font-size: 0.95rem;
            color: #666;
            margin-top: 15px;
        }

        .progress-bar-container {
            width: 100%;
            height: 20px;
            background: rgba(255, 255, 255, 0.5);
            border-radius: 10px;
            overflow: hidden;
            margin-top: 10px;
            border: 2px solid var(--ocean-light);
        }

        .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--yellow), var(--green), var(--blue));
            transition: width 0.3s ease;
            border-radius: 8px;
        }

        /* Locked island styles */
        .island-card.island-locked {
            opacity: 0.7;
            filter: grayscale(40%);
            cursor: not-allowed;
        }

        .island-card.island-locked:hover {
            transform: translateY(-5px) scale(1.01);
            box-shadow: 0 15px 40px var(--shadow);
        }

        .island-lock-icon {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 2rem;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
        }

        .progress-bar.locked {
            background: linear-gradient(90deg, #aaa, #888);
        }

        .island-view {
            display: none;
            animation: fadeIn 0.5s ease-in;
        }

        .island-header {
            background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));
            color: white;
            padding: 30px;
            border-radius: 20px;
            margin-bottom: 30px;
            box-shadow: 0 10px 30px var(--shadow);
            position: relative;
            overflow: visible;
        }
        
        .island-header-compact {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 20px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        
        .island-header-compact .btn-large {
            margin: 0;
        }
        
        /* Top-right positioned guide for island view */
        .island-guide.island-guide-topright {
            position: relative !important;
            top: auto !important;
            right: auto !important;
            transform: none !important;
            display: flex !important;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            margin-bottom: 15px;
            padding-right: 10px;
        }
        
        .island-guide-topright .guide-character {
            position: relative;
            width: 60px;
            height: 60px;
            order: 2;
            flex-shrink: 0;
        }
        
        .island-guide-topright .guide-speech-bubble {
            position: relative;
            top: auto;
            right: auto;
            transform: none;
            max-width: 320px;
            padding: 12px 16px;
            font-size: 0.9rem;
            order: 1;
        }

        .island-title {
            font-family: 'Fredoka', cursive;
            font-size: 2.5rem;
            margin-bottom: 15px;
        }

        .island-stats {
            display: flex;
            gap: 30px;
            flex-wrap: wrap;
            font-size: 1.1rem;
        }

        .stat-item {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .legend {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            margin-bottom: 20px;
            padding: 20px;
            background: white;
            border-radius: 15px;
            box-shadow: 0 5px 15px var(--shadow);
        }
        
        .legend.legend-compact {
            gap: 0;
            padding: 0;
            align-items: center;
            justify-content: center;
            flex-wrap: nowrap;
            position: relative;
            overflow: hidden;
        }
        
        .legend-progress-bar {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.3);
            z-index: 0;
        }
        
        .legend-progress-fill {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, #a78bfa, #8b5cf6, #7c3aed);
            transition: width 0.5s ease-out;
            opacity: 0.25;
        }
        
        .legend-icons {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 20px;
            position: relative;
            z-index: 1;
        }
        
        .legend-compact .legend-box {
            width: 24px;
            height: 24px;
            font-size: 0.6rem;
        }
        
        .legend-arrow {
            color: #9ca3af;
            font-size: 0.9rem;
            font-weight: 500;
        }
        
        .legend-label {
            font-weight: 600;
            color: #374151;
            margin-left: 4px;
            font-size: 0.95rem;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
        }

        .legend-box {
            width: 30px;
            height: 30px;
            border-radius: 6px;
            border: 2px solid rgba(0, 0, 0, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            font-weight: 700;
            color: rgba(0, 0, 0, 0.5);
            font-family: 'Quicksand', sans-serif;
        }

        .word-grid {
            display: grid;
            grid-template-columns: repeat(10, 1fr);
            gap: 6px;
            background: white;
            padding: 20px;
            border-radius: 20px;
            box-shadow: 0 10px 30px var(--shadow);
            margin-bottom: 30px;
        }

        .word-cell {
            aspect-ratio: 1;
            border-radius: 6px;
            cursor: default;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            font-size: 0.55rem;
            font-weight: 600;
            text-align: center;
            padding: 3px;
            border: 1px solid rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
        }

        .word-emoji {
            font-size: 1.2rem;
            margin-bottom: 2px;
        }

        .word-text {
            font-size: 0.5rem;
            line-height: 1.1;
            word-break: break-word;
        }

        .word-cell:hover {
            transform: scale(1.3);
            z-index: 10;
            box-shadow: 0 4px 12px var(--shadow);
            font-size: 0.7rem;
        }

        .word-cell.not-mastered {
            background: var(--red);
            color: white;
        }

        .word-cell.correct-once {
            background: var(--yellow);
            color: #333;
        }

        .word-cell.correct-twice {
            background: var(--orange);
            color: white;
        }

        .word-cell.correct-thrice {
            background: var(--green);
            color: white;
        }

        .word-cell.mastered {
            background: var(--blue);
            color: white;
            font-weight: 700;
        }

        .word-cell.locked {
            opacity: 0.6;
            cursor: not-allowed;
            position: relative;
        }

        .word-cell.locked::after {
            content: '';
            position: absolute;
            font-size: 0.7rem;
            bottom: 4px;
            right: 4px;
        }

        /* Homophone cell styling - no emoji, just words */
        .word-cell.homophone-cell {
            aspect-ratio: auto;
            min-height: 45px;
            padding: 6px 4px;
        }

        .word-cell.homophone-cell .homophone-text {
            font-size: 0.55rem;
            line-height: 1.3;
        }

        .word-cell.homophone-cell:hover {
            transform: scale(1.2);
        }

        .word-cell.homophone-cell:hover .homophone-text {
            font-size: 0.65rem;
        }

        .quiz-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #1a1a2e;
            z-index: 1000;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.3s ease-in;
        }
        
        /* Anti-cheat: Disable text selection on quiz elements */
        .quiz-modal {
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
        
        /* Allow selection only on input fields */
        .quiz-modal input {
            -webkit-user-select: text;
            -moz-user-select: text;
            -ms-user-select: text;
            user-select: text;
        }

        .quiz-content {
            background: white;
            border-radius: 25px;
            padding: 50px;
            max-width: 800px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: slideUp 0.4s ease-out;
            position: relative;
        }

        @keyframes slideUp {
            from {
                transform: translateY(50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .quiz-step-indicator {
            text-align: center;
            font-size: 1.1rem;
            color: var(--ocean-light);
            font-weight: 700;
            margin-bottom: 20px;
        }

        .quiz-question {
            font-size: 1.8rem;
            color: var(--ocean-deep);
            font-weight: 700;
            margin-bottom: 30px;
            text-align: center;
        }

        .quiz-word {
            font-family: 'Fredoka', cursive;
            font-size: 3rem;
            color: var(--ocean-light);
            text-align: center;
            margin-bottom: 30px;
        }

        .quiz-options {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 30px;
        }

        .quiz-option {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            border: 3px solid var(--ocean-light);
            border-radius: 15px;
            padding: 15px 12px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
        }

        .quiz-option:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px var(--shadow);
            background: linear-gradient(135deg, #fff, #f8f9fa);
        }

        .quiz-option.correct {
            background: linear-gradient(135deg, var(--green), #5ab86d);
            color: white;
            border-color: var(--green);
        }

        .quiz-option.incorrect {
            background: linear-gradient(135deg, var(--red), #ff6b7a);
            color: white;
            border-color: var(--red);
        }

        .cloze-sentence {
            font-size: 1.3rem;
            line-height: 1.8;
            padding: 20px;
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            border-radius: 15px;
            margin-bottom: 20px;
            text-align: center;
        }

        .cloze-gap {
            display: inline-block;
            min-width: 120px;
            border-bottom: 3px solid var(--ocean-deep);
            margin: 0 5px;
            font-weight: 700;
            color: var(--ocean-deep);
        }

        .cloze-options {
            grid-template-columns: repeat(2, 1fr);
        }

        @media (min-width: 500px) {
            .cloze-options {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        .definition-section {
            display: none;
            animation: fadeIn 0.5s ease-in;
        }

        .spelling-definition {
            border-radius: 18px;
            overflow: hidden;
            margin-bottom: 20px;
            box-shadow: 0 4px 20px rgba(13,61,82,0.13);
        }

        .def-zone {
            background: linear-gradient(135deg, #0d3d52 0%, #1a7a6a 100%);
            padding: 18px 22px;
        }

        .def-zone-label {
            font-size: 0.65rem;
            font-weight: 800;
            letter-spacing: 1.6px;
            text-transform: uppercase;
            color: #a8edd9;
            margin-bottom: 6px;
        }

        .def-zone-text {
            font-size: 1.05rem;
            font-weight: 700;
            color: #ffffff;
            line-height: 1.45;
        }

        .example-sentence {
            background: #e2f5f2;
            padding: 14px 22px 18px;
            position: relative;
        }

        .ex-zone-label {
            font-size: 0.65rem;
            font-weight: 800;
            letter-spacing: 1.6px;
            text-transform: uppercase;
            color: #1a7a6a;
            margin-bottom: 8px;
        }

        .ex-zone-quote {
            position: absolute;
            top: 10px;
            right: 16px;
            font-size: 44px;
            line-height: 1;
            color: #7dd9c8;
            font-family: Georgia, serif;
            opacity: 0.7;
        }

        .ex-zone-text {
            font-style: italic;
            color: #1a4a45;
            font-size: 1.1rem;
            line-height: 1.6;
        }

        .spelling-clue {
            text-align: center;
            font-size: 2.5rem;
            font-family: 'Fredoka', cursive;
            color: #0d3d52;
            letter-spacing: 8px;
            margin-bottom: 25px;
            padding: 20px 24px;
            background: #d4eeea;
            border: 2px solid #9dd4cb;
            border-radius: 18px;
            box-shadow: 0 4px 20px rgba(13,61,82,0.08);
        }

        .clue-dash {
            display: inline-block;
            width: 1.1ch;
            height: 3px;
            background: #1a7a6a;
            border-radius: 2px;
            margin: 0 3px;
            position: relative;
            top: 10px;
        }

        .spelling-input {
            width: 100%;
            font-size: 1.8rem;
            padding: 20px;
            border: 3px solid var(--ocean-light);
            border-radius: 15px;
            text-align: center;
            font-family: 'Quicksand', sans-serif;
            font-weight: 700;
            margin-bottom: 20px;
            text-transform: none;
        }

        .spelling-input:focus {
            outline: none;
            border-color: var(--ocean-deep);
            box-shadow: 0 0 0 3px rgba(8, 131, 149, 0.2);
        }

        .quiz-feedback {
            text-align: center;
            font-size: 1.3rem;
            font-weight: 700;
            margin-top: 20px;
            padding: 15px;
            border-radius: 10px;
        }

        .quiz-feedback.correct {
            background: rgba(107, 207, 127, 0.2);
            color: var(--green);
        }

        .quiz-feedback.incorrect {
            background: rgba(255, 71, 87, 0.2);
            color: var(--red);
        }

        .timer-container {
            width: 100%;
            height: 8px;
            background: #e0e0e0;
            border-radius: 4px;
            margin-bottom: 20px;
            overflow: hidden;
        }

        .timer-bar {
            height: 100%;
            width: 100%;
            border-radius: 4px;
            transition: width 0.1s linear, background-color 0.3s ease;
        }

        .timer-bar.green {
            background: linear-gradient(90deg, #22c55e, #16a34a);
        }

        .timer-bar.yellow {
            background: linear-gradient(90deg, #fbbf24, #f59e0b);
        }

        .timer-bar.red {
            background: linear-gradient(90deg, #ef4444, #dc2626);
        }

        .timer-text {
            text-align: center;
            font-size: 1.2rem;
            font-weight: 700;
            margin-bottom: 10px;
            color: var(--ocean-deep);
        }

        .btn {
            background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));
            color: white;
            border: none;
            border-radius: 12px;
            padding: 15px 35px;
            font-size: 1.1rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: 'Quicksand', sans-serif;
            box-shadow: 0 5px 15px var(--shadow);
        }

        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px var(--shadow);
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .btn-large {
            padding: 20px 50px;
            font-size: 1.4rem;
            background: linear-gradient(135deg, #22c55e, #16a34a);
        }

        .btn-large:hover {
            background: linear-gradient(135deg, #16a34a, #15803d);
        }
        
        .btn-large.btn-locked {
            background: linear-gradient(135deg, #6b7280, #4b5563);
            cursor: not-allowed;
            opacity: 0.8;
        }
        
        .btn-large.btn-locked:hover {
            background: linear-gradient(135deg, #6b7280, #4b5563);
            transform: none;
        }
        
        /* Pulsating Practice Words button */
        .btn-practice-pulse {
            animation: practice-pulse 2s ease-in-out infinite;
            box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
        }
        
        @keyframes practice-pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
                transform: scale(1);
            }
            50% {
                box-shadow: 0 0 20px 10px rgba(34, 197, 94, 0.3);
                transform: scale(1.02);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
                transform: scale(1);
            }
        }
        
        .btn-practice-pulse:hover {
            animation: none;
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
        }

        .btn-secondary {
            background: #f1f5f9;
            color: #475569;
            border: 2px solid #cbd5e1;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }
        
        .btn-secondary:hover {
            background: #e2e8f0;
            border-color: #94a3b8;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
            transform: translateY(-2px);
        }

        .action-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 20px;
        }

        .action-buttons .btn {
            flex: 0 0 auto;
            min-width: 140px;
        }

        .action-buttons .btn-secondary {
            flex: 0 0 auto;
        }

        @media (max-width: 768px) {
            .word-grid {
                grid-template-columns: repeat(5, 1fr);
                gap: 4px;
                padding: 15px;
            }

            .quiz-options {
                grid-template-columns: 1fr;
            }

            .quiz-content {
                padding: 30px 20px;
            }

            .spelling-clue {
                font-size: 1.8rem;
                letter-spacing: 4px;
            }
        }
    
.link-btn{
  background: transparent;
  border: none;
  color: #0b7b8c;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 0 0;
  text-decoration: underline;
  font-size: 16px;
}
.link-btn:active{ transform: translateY(1px); }

/* Coin falling animation */
.coin-animation {
    position: fixed;
    font-size: 2.5rem;
    z-index: 2001;
    pointer-events: none;
    animation: coinFall 0.8s ease-in forwards;
}

@keyframes coinFall {
    0% {
        opacity: 1;
        transform: scale(1.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(360deg);
    }
}

/* Level up celebration text */
.level-up-text {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Fredoka', cursive;
    font-weight: 700;
    z-index: 2000;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: levelUpPop 1.2s ease-out forwards;
}

.level-up-text.level-1 {
    font-size: 2.5rem;
    color: var(--yellow);
}

.level-up-text.level-2 {
    font-size: 3rem;
    color: var(--orange);
}

.level-up-text.level-3 {
    font-size: 3.5rem;
    color: var(--green);
}

.level-up-text.level-4 {
    font-size: 4rem;
    color: var(--blue);
}

@keyframes levelUpPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3);
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -70%) scale(0.8);
    }
}

/* Sparkle container */
.sparkle-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
    z-index: 1999;
}

/* Individual sparkle */
.sparkle {
    position: absolute;
    font-size: 1.5rem;
    animation: sparkleFloat 1s ease-out forwards;
}

@keyframes sparkleFloat {
    0% {
        opacity: 1;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(360deg);
    }
}

/* Star burst for higher levels */
.star-burst {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 1998;
}

.star {
    position: absolute;
    font-size: 1.8rem;
    animation: starExplode 1s ease-out forwards;
}

@keyframes starExplode {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0.5);
    }
    30% {
        opacity: 1;
        transform: scale(1.3);
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

/* Wallet pulse when coin lands */
.wallet-display.pulse {
    animation: walletPulse 0.4s ease-out;
}

@keyframes walletPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 6px 25px rgba(255, 215, 0, 0.7);
    }
    100% {
        transform: scale(1);
    }
}

/* ============ FRIEND CODES & ONLINE PRESENCE ============ */

/* Your Friend Code Display */
.your-friend-code {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed var(--ocean-light);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.friend-code-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.friend-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.friend-code-display span {
    font-family: 'Fredoka', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ocean-deep);
    letter-spacing: 2px;
    background: white;
    padding: 8px 16px;
    border-radius: 10px;
    border: 2px solid var(--ocean-light);
}

.copy-code-btn {
    background: var(--ocean-light);
    color: white;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-code-btn:hover {
    background: var(--ocean-deep);
    transform: scale(1.1);
}

.friend-code-hint {
    font-size: 0.75rem;
    color: #888;
    margin-top: 8px;
}

/* Friends Online Banner */
.friends-online-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #155724;
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

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

/* Friends Online Badge on Button */
.friends-online-badge {
    background: #28a745;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

/* Online Status Indicator */
.online-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 0.9rem;
    line-height: 1;
}

.friend-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.friend-avatar-wrapper .friend-avatar {
    margin: 0;
}

/* Friend Status Text */
.friend-status-text {
    font-size: 0.75rem;
    color: #888;
    margin-left: 8px;
    font-weight: 400;
}

/* Online status colors for friend items */
.friend-item.status-practicing {
    border-left: 4px solid #28a745;
}

.friend-item.status-online {
    border-left: 4px solid #28a745;
}

.friend-item.status-recent {
    border-left: 4px solid #ffc107;
}

/* Add Friend Tabs */
.add-friend-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.add-tab {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Quicksand', sans-serif;
}

.add-tab:hover {
    border-color: var(--ocean-light);
    background: #f0f8ff;
}

.add-tab.active {
    background: var(--ocean-light);
    color: white;
    border-color: var(--ocean-light);
}

.add-friend-form {
    display: flex;
    gap: 10px;
}

.add-friend-form .add-friend-input {
    flex: 1;
}

/* Make add friend section stack better */
.add-friend-section {
    flex-direction: column;
}

/* ============ END FRIEND CODES & ONLINE PRESENCE ============ */

/* ============ DAY STREAK CELEBRATION ============ */
.streak-celebration {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Fredoka', cursive;
    font-size: 2rem;
    font-weight: 700;
    color: #ff6b35;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    pointer-events: none;
    animation: streakPop 3s ease-out forwards;
    text-align: center;
    padding: 20px 40px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.95), rgba(247, 147, 30, 0.95));
    border-radius: 20px;
    border: 4px solid #fff;
    box-shadow: 0 10px 40px rgba(255, 107, 53, 0.5);
}

@keyframes streakPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    25% {
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -70%) scale(0.8);
    }
}

.streak-emoji-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1999;
    overflow: hidden;
}

.streak-emoji {
    position: absolute;
    font-size: 2.5rem;
    top: -50px;
    animation: streakEmojiFloat 2s ease-out forwards;
}

@keyframes streakEmojiFloat {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(360deg) scale(0.5);
    }
}

.streak-secured {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Fredoka', cursive;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    padding: 15px 30px;
    border-radius: 15px;
    border: 3px solid #fff;
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.5);
    z-index: 2000;
    pointer-events: none;
    animation: streakSecuredPop 2.5s ease-out forwards;
}

@keyframes streakSecuredPop {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.5) translateY(20px);
    }
    15% {
        opacity: 1;
        transform: translateX(-50%) scale(1.05) translateY(0);
    }
    25% {
        transform: translateX(-50%) scale(1) translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateX(-50%) scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0.9) translateY(-20px);
    }
}
/* ============ END DAY STREAK CELEBRATION ============ */

/* ============ STREAK QUOTE CELEBRATION ============ */
.streak-quote-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease-out;
    overflow: hidden;
}

.streak-quote-overlay.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.streak-quote-modal {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 25px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    animation: modalPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.streak-quote-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: fireGlow 1s ease-in-out infinite alternate;
}

@keyframes fireGlow {
    from {
        filter: drop-shadow(0 0 10px #ff6b35);
        transform: scale(1);
    }
    to {
        filter: drop-shadow(0 0 25px #ffd700);
        transform: scale(1.1);
    }
}

.streak-quote-title {
    font-family: 'Fredoka', cursive;
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 5px;
}

.streak-quote-subtitle {
    font-family: 'Fredoka', cursive;
    font-size: 1.1rem;
    color: #4ecdc4;
    margin-bottom: 20px;
}

.streak-quote-divider {
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
    margin: 20px auto;
}

.streak-quote-text {
    font-family: 'Georgia', serif;
    font-size: 1.2rem;
    color: #fff;
    line-height: 1.6;
    margin-bottom: 15px;
    font-style: italic;
    padding: 0 10px;
}

.streak-quote-author {
    font-family: 'Fredoka', cursive;
    font-size: 1rem;
    color: #96ceb4;
    margin-bottom: 25px;
}

.streak-quote-btn {
    font-family: 'Fredoka', cursive;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    background: linear-gradient(135deg, #ffd700, #ffed4a);
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.streak-quote-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

.streak-quote-btn:active {
    transform: translateY(0);
}

/* Confetti particles */
.confetti-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    border-radius: 2px;
    animation: confettiFall linear forwards;
    opacity: 0.8;
}

.confetti-particle:nth-child(odd) {
    width: 8px;
    height: 14px;
    border-radius: 50%;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .streak-quote-modal {
        padding: 30px 20px;
        margin: 15px;
    }
    
    .streak-quote-icon {
        font-size: 3rem;
    }
    
    .streak-quote-title {
        font-size: 1.6rem;
    }
    
    .streak-quote-text {
        font-size: 1rem;
    }
    
    .streak-quote-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}
/* ============ END STREAK QUOTE CELEBRATION ============ */

/* ============ PARENT ZONE PANEL ============ */
.settings-btn-floating {
    display: none; /* Deprecated - use parent-zone-btn-floating */
}

.parent-zone-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.parent-zone-subheading {
    font-family: 'Fredoka', cursive;
    font-size: 1.2rem;
    color: var(--ocean-deep);
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* Accordion Styles */
.parent-zone-accordion {
    margin-bottom: 15px;
}

.accordion-header {
    width: 100%;
    padding: 18px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #ddd;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Quicksand', sans-serif;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: var(--ocean-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.accordion-header.open {
    background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));
    color: white;
    border-color: var(--ocean-deep);
    border-radius: 12px 12px 0 0;
}

.accordion-title {
    font-family: 'Fredoka', cursive;
    font-size: 1.15rem;
    font-weight: 600;
}

.accordion-arrow {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.accordion-header.open .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    background: white;
    border: 2px solid #ddd;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-description {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.current-level-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.parent-zone-btn-floating {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    z-index: 100;
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    color: white !important;
    border: none;
    padding: 12px 20px !important;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.parent-zone-btn-floating:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.5);
    background: linear-gradient(135deg, #4338ca, #6d28d9);
}

.parent-zone-btn-floating .parent-zone-icon {
    font-size: 1.2rem;
}

.parent-zone-btn-floating .parent-zone-label {
    white-space: nowrap;
}

.settings-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
}

.settings-overlay.open {
    display: block;
}

.settings-panel {
    display: none;
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    max-width: 100%;
    height: 100%;
    background: white;
    z-index: 1003;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.settings-panel.open {
    right: 0;
}

.settings-content {
    padding: 25px;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.settings-header h2 {
    font-family: 'Fredoka', cursive;
    color: var(--ocean-deep);
    font-size: 1.5rem;
    margin: 0;
}

.settings-error {
    background: #ffe0e0;
    color: #c0392b;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.settings-success {
    background: #e0ffe0;
    color: #27ae60;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.current-level-section {
    background: linear-gradient(135deg, #e6f7ff, #f0f9ff);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid var(--ocean-light);
}

.current-level-section h3 {
    display: none; /* Using accordion header instead */
}

.current-level-display {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.current-level-display .level-stars {
    font-size: 1.3rem;
}

.current-level-display .level-name {
    font-family: 'Fredoka', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ocean-deep);
}

.current-level-display .level-time {
    background: var(--ocean-deep);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.level-selection-section h3 {
    font-family: 'Fredoka', cursive;
    color: var(--ocean-deep);
    font-size: 1.1rem;
    margin: 0 0 5px 0;
}

.section-hint {
    color: #666;
    font-size: 0.85rem;
    margin: 0 0 20px 0;
}

.level-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.level-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.level-option input[type="radio"] {
    display: none;
}

.level-radio-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.2s;
    background: white;
}

.level-option input[type="radio"]:checked + .level-radio-content {
    border-color: var(--ocean-light);
    background: linear-gradient(135deg, #e6f7ff, #f0f9ff);
    box-shadow: 0 2px 8px rgba(8, 131, 149, 0.2);
}

.level-radio-content:hover {
    border-color: var(--ocean-light);
    transform: translateX(5px);
}

.level-radio-content .level-stars {
    font-size: 1rem;
    min-width: 80px;
}

.level-radio-content .level-name {
    flex: 1;
    font-weight: 600;
    color: #333;
}

.level-radio-content .level-time {
    background: #f0f0f0;
    color: #666;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.level-option input[type="radio"]:checked + .level-radio-content .level-time {
    background: var(--ocean-light);
    color: white;
}

/* Timer Setting Styles */
.timer-setting-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #e0e0e0;
}

.timer-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.timer-option {
    flex: 1;
    cursor: pointer;
}

.timer-option input[type="radio"] {
    display: none;
}

.timer-radio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.2s;
    background: white;
    text-align: center;
}

.timer-option input[type="radio"]:checked + .timer-radio-content {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7, #fef9c3);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.timer-radio-content:hover {
    border-color: #f59e0b;
    transform: translateY(-2px);
}

.timer-radio-content .timer-icon {
    font-size: 1.5rem;
}

.timer-radio-content .timer-value {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
}

.timer-radio-content .timer-desc {
    background: #f0f0f0;
    color: #666;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.timer-option input[type="radio"]:checked + .timer-radio-content .timer-desc {
    background: #f59e0b;
    color: white;
}

.pin-section {
    background: linear-gradient(135deg, #fff9e6, #fff3cd);
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.pin-section h4 {
    font-family: 'Fredoka', cursive;
    color: #856404;
    font-size: 1rem;
    margin: 0 0 10px 0;
}

.pin-hint {
    color: #856404;
    font-size: 0.85rem;
    margin: 0 0 15px 0;
}

.pin-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.pin-inputs input {
    flex: 1;
    min-width: 120px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    text-align: center;
    letter-spacing: 8px;
}

.pin-inputs input:focus {
    outline: none;
    border-color: var(--ocean-light);
}

.save-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
}

/* Streak Level in Header */
.streak-level {
    font-size: 0.9rem;
    margin-left: 5px;
    cursor: help;
}

/* ============ ACCOUNT SETTINGS ============ */
.account-action {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.account-action:last-child {
    margin-bottom: 0;
}

.account-action h4 {
    font-family: 'Fredoka', cursive;
    color: var(--ocean-deep);
    font-size: 1rem;
    margin: 0 0 15px 0;
}

.account-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.account-inputs input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
}

.account-inputs input:focus {
    outline: none;
    border-color: var(--ocean-light);
}

.input-hint {
    font-size: 0.8rem;
    color: #888;
    margin: -5px 0 15px 0;
    font-style: italic;
}

.current-value {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 12px 0;
    padding: 10px 12px;
    background: #f0f8ff;
    border-radius: 8px;
    border-left: 3px solid var(--ocean-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-value strong {
    color: var(--ocean-deep);
}

.account-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));
}

/* ============ EMAIL REPORT SETTINGS ============ */
.email-report-settings {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

.email-report-settings h4 {
    font-family: 'Fredoka', cursive;
    color: var(--ocean-deep);
    font-size: 1rem;
    margin: 0 0 15px 0;
}

.email-recipients {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.email-recipient {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
}

.email-recipient.primary {
    background: #f0f8ff;
    border-color: var(--ocean-light);
}

.email-address {
    color: #334155;
    font-size: 0.95rem;
    word-break: break-all;
}

.email-lock {
    font-size: 1rem;
    opacity: 0.6;
}

.email-remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    transition: transform 0.2s;
}

.email-remove-btn:hover {
    transform: scale(1.2);
}

.add-email-section {
    margin-bottom: 20px;
}

.add-email-btn {
    background: none;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 12px 15px;
    width: 100%;
    color: #64748b;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-email-btn:hover {
    border-color: var(--ocean-light);
    color: var(--ocean-deep);
    background: #f0f8ff;
}

.add-email-btn span {
    font-size: 1.2rem;
    font-weight: 700;
}

.add-email-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.add-email-form input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
}

.add-email-form input:focus {
    outline: none;
    border-color: var(--ocean-light);
}

.add-email-buttons {
    display: flex;
    gap: 10px;
}

.btn-small {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-confirm {
    background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));
    color: white;
}

.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(10, 77, 104, 0.3);
}

.btn-cancel {
    background: #f1f5f9;
    color: #64748b;
}

.btn-cancel:hover {
    background: #e2e8f0;
}

.report-frequency {
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
}

.report-frequency > label {
    display: block;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.frequency-options {
    display: flex;
    gap: 10px;
}

.frequency-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.frequency-option:hover {
    border-color: #cbd5e1;
}

.frequency-option input {
    margin: 0;
    cursor: pointer;
}

.frequency-option span {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    color: #334155;
}

.frequency-option:has(input:checked) {
    background: #f0f8ff;
    border-color: var(--ocean-light);
}

.frequency-option:has(input:checked) span {
    color: var(--ocean-deep);
    font-weight: 600;
}

.report-settings-status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'Quicksand', sans-serif;
    text-align: center;
    display: none;
}

.report-settings-status.success {
    display: block;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.report-settings-status.error {
    display: block;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.frequency-hint {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}

.report-day-selector {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.report-day-selector label {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
}

.report-day-selector select {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    color: #334155;
    background: white;
    cursor: pointer;
}

.report-day-selector select:focus {
    outline: none;
    border-color: var(--ocean-light);
}

/* ============ END EMAIL REPORT SETTINGS ============ */

/* ============ PIN MODAL ============ */
.pin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pin-modal {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: pinModalIn 0.3s ease-out;
}

@keyframes pinModalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.pin-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pin-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.pin-modal-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.pin-modal h3 {
    font-family: 'Fredoka', cursive;
    color: var(--ocean-deep);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.pin-modal-desc {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.pin-modal-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.pin-modal-inputs input {
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.2rem;
    font-family: 'Quicksand', sans-serif;
    text-align: center;
    letter-spacing: 8px;
    font-weight: 600;
}

.pin-modal-inputs input:focus {
    outline: none;
    border-color: var(--ocean-light);
}

.pin-modal-inputs input::placeholder {
    letter-spacing: normal;
    font-weight: 400;
}

.pin-modal-error {
    color: #dc2626;
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 24px;
}

.pin-modal-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.pin-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(10, 77, 104, 0.3);
}

.pin-modal-link {
    background: none;
    border: none;
    color: #666;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 15px;
    padding: 8px;
    text-decoration: underline;
}

.pin-modal-link:hover {
    color: var(--ocean-deep);
}
/* ============ END PIN MODAL ============ */

/* ============ END ACCOUNT SETTINGS ============ */

@media (max-width: 768px) {
    .settings-panel {
        width: 100%;
        right: -100%;
    }
    
    .parent-zone-btn-floating {
        bottom: 20px;
        right: 20px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .parent-zone-btn-floating .parent-zone-icon {
        font-size: 1.1rem;
    }
    
    .pin-inputs {
        flex-direction: column;
    }
    
    .pin-inputs input {
        width: 100%;
    }
    
    .level-radio-content {
        flex-wrap: wrap;
    }
    
    .level-radio-content .level-stars {
        min-width: 60px;
    }
}

/* Progress Report Button */
.progress-report-section {
    margin-bottom: 25px;
}

.progress-report-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.progress-report-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.progress-report-btn .report-icon {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-report-btn .report-text {
    flex: 1;
    text-align: left;
}

.progress-report-btn .report-title {
    display: block;
    font-family: 'Fredoka', cursive;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.progress-report-btn .report-subtitle {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.progress-report-btn .report-arrow {
    font-size: 1.5rem;
    color: white;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.progress-report-btn:hover .report-arrow {
    transform: translateX(5px);
    opacity: 1;
}

/* Practice Settings Divider */
.practice-settings-divider {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.practice-settings-divider::before,
.practice-settings-divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #e0e0e0;
}

.practice-settings-divider::before {
    margin-right: 15px;
}

.practice-settings-divider::after {
    margin-left: 15px;
}

/* ============ END PARENT ZONE PANEL ============ */

/* ============ PROGRESS REPORT MODAL ============ */
.progress-report-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}

.progress-report-modal.open {
    display: flex;
}

.progress-report-content {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 24px;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease-out;
}

.progress-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 24px 24px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.progress-report-header h2 {
    font-family: 'Fredoka', cursive;
    color: white;
    font-size: 1.5rem;
    margin: 0;
}

.progress-report-header .close-btn {
    color: white;
    font-size: 1.8rem;
    opacity: 0.8;
}

.progress-report-header .close-btn:hover {
    opacity: 1;
    color: white;
}

.report-child-name {
    text-align: center;
    padding: 20px;
    font-size: 1.1rem;
    color: #666;
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    border-bottom: 1px solid #e0e0e0;
}

.report-child-name span {
    font-weight: 700;
    color: #4f46e5;
}

/* Practice Level Display */
.practice-level-display {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
}

.practice-level-pill {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.5);
    color: #64748b;
    transition: all 0.2s;
}

.practice-level-pill.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.practice-level-pill .level-time {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-left: 4px;
}

.practice-level-hint {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
    padding: 10px 20px 15px;
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    border-bottom: 3px solid #d1d5db;
}

.report-section {
    padding: 25px 30px;
    border-bottom: 3px solid #d1d5db;
}

.report-section:last-child {
    border-bottom: none;
}

.report-section h3 {
    font-family: 'Fredoka', cursive;
    font-size: 1.2rem;
    color: var(--ocean-deep);
    margin: 0 0 20px 0;
}

/* Week Calendar */
.daily-target-reminder {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 15px 0;
}

.daily-target-reminder strong {
    color: #4f46e5;
    font-weight: 700;
}

.daily-target-reminder .target-hint {
    font-size: 0.8rem;
    opacity: 0.7;
}

.week-calendar {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
}

.calendar-day {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: #f1f5f9;
    border-radius: 12px;
    transition: all 0.3s;
}

/* Future days - grey */
.calendar-day.calendar-future {
    background: #f1f5f9;
    color: #94a3b8;
}

/* No practice - red */
.calendar-day.calendar-none {
    background: linear-gradient(135deg, #fecaca, #fca5a5);
    color: #991b1b;
}

/* Below target - orange */
.calendar-day.calendar-partial {
    background: linear-gradient(135deg, #fed7aa, #fdba74);
    color: #9a3412;
}

/* Met/exceeded target - green */
.calendar-day.calendar-complete {
    background: linear-gradient(135deg, #86efac, #4ade80);
    color: #166534;
}

.calendar-day.today {
    border: 3px solid #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.calendar-day .day-name {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.calendar-day .day-time {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Fredoka', cursive;
}

/* Week Stats */
.week-stats {
    display: flex;
    gap: 15px;
}

.week-stat {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.week-stat .stat-value {
    display: block;
    font-family: 'Fredoka', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0d4f5f;
}

.week-stat .stat-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
}

/* Monthly Calendar */
.month-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.month-calendar-header h3 {
    margin: 0;
    font-family: 'Fredoka', cursive;
    font-size: 1.2rem;
    color: #0d4f5f;
}

.month-nav-btn {
    background: #e0e7ff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4f46e5;
    transition: all 0.2s;
}

.month-nav-btn:hover {
    background: #c7d2fe;
}

.month-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.month-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.month-day-header {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    padding: 4px 0;
}

.month-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.month-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    position: relative;
}

.month-day-number {
    font-size: 0.65rem;
    color: #94a3b8;
    position: absolute;
    top: 2px;
    right: 4px;
}

.month-day-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
}

.month-day-circle.none {
    background: linear-gradient(135deg, #fca5a5, #f87171);
}

.month-day-circle.partial {
    background: linear-gradient(135deg, #fdba74, #fb923c);
}

.month-day-circle.complete {
    background: linear-gradient(135deg, #86efac, #4ade80);
}

.month-day-circle.future {
    background: #e2e8f0;
    color: #94a3b8;
}

.month-day.empty {
    visibility: hidden;
}

/* Overall Progress Bar */
.overall-progress-bar {
    position: relative;
    height: 40px;
    background: #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

.overall-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #22c55e, #4f46e5);
    border-radius: 20px;
    transition: width 0.5s ease;
}

.overall-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Fredoka', cursive;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    text-shadow: 0 0 4px white, 0 0 4px white;
}

/* Progress Breakdown */
.progress-breakdown {
    display: flex;
    gap: 15px;
}

.breakdown-item {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
}

.breakdown-item .breakdown-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 5px;
}

.breakdown-item .breakdown-value {
    display: block;
    font-family: 'Fredoka', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ocean-deep);
}

/* Focus Words List */
.section-description {
    font-size: 0.9rem;
    color: #666;
    margin: -10px 0 15px 0;
}

.focus-words-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.focus-word-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #fff7ed;
    border-radius: 10px;
    border-left: 4px solid #f97316;
}

.focus-word-item .word-emoji {
    font-size: 1.5rem;
}

.focus-word-item .word-info {
    flex: 1;
}

.focus-word-item .word-name {
    display: block;
    font-weight: 700;
    color: #333;
}

.focus-word-item .word-status {
    display: block;
    font-size: 0.8rem;
    color: #666;
}

.focus-word-item .word-level {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.focus-word-item .word-level.level-0 { background: #fee2e2; color: #dc2626; }
.focus-word-item .word-level.level-1 { background: #fef3c7; color: #d97706; }
.focus-word-item .word-level.level-2 { background: #ffedd5; color: #ea580c; }
.focus-word-item .word-level.level-3 { background: #dcfce7; color: #16a34a; }

.no-focus-words {
    text-align: center;
    padding: 20px;
    color: #22c55e;
    font-weight: 600;
}

.no-focus-words .celebration-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

/* Skill Bars */
.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-bar-item .skill-name {
    width: 90px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.skill-bar {
    flex: 1;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
}

.skill-bar-item:nth-child(1) .skill-bar-fill { background: linear-gradient(90deg, #f97316, #fb923c); }
.skill-bar-item:nth-child(2) .skill-bar-fill { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.skill-bar-item:nth-child(3) .skill-bar-fill { background: linear-gradient(90deg, #06b6d4, #22d3ee); }

.skill-bar-item .skill-percent {
    width: 45px;
    font-family: 'Fredoka', cursive;
    font-size: 0.95rem;
    font-weight: 700;
    color: #666;
    text-align: right;
}

/* Tips Section */
.tips-section {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.tips-list {
    margin: 0;
    padding-left: 20px;
}

.tips-list li {
    margin-bottom: 10px;
    color: #166534;
    line-height: 1.5;
}

.tips-list li:last-child {
    margin-bottom: 0;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .progress-report-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .progress-report-header {
        border-radius: 0;
    }
    
    .week-stats {
        flex-wrap: wrap;
    }
    
    .week-stat {
        min-width: calc(50% - 10px);
    }
    
    .progress-breakdown {
        flex-direction: column;
        gap: 10px;
    }
    
    .calendar-day {
        padding: 10px 4px;
    }
    
    .calendar-day .day-name {
        font-size: 0.6rem;
    }
}
/* ============ END PROGRESS REPORT MODAL ============ */

/* ============ CHARACTER SYSTEM STYLES ============ */

/* User character in top bar */
.user-info {
    cursor: pointer;
    transition: transform 0.2s;
}

.user-info:hover {
    transform: scale(1.05);
}

.user-character {
    width: 36px;
    height: 50px;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    transform: rotate(10deg);
}

/* Character colors */
.char-container.blue { --glow-color: #00bfff; }
.char-container.red { --glow-color: #ff1744; }

/* Yellow - Orange fire edge */
.char-container.yellow { 
    --glow-color: #ff6b35; 
}
.char-container.yellow .char-bolt {
    filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.6)) drop-shadow(0 0 15px rgba(255, 107, 53, 0.3));
}

/* Green - Cyan edge */
.char-container.green { 
    --glow-color: #00ffff; 
}
.char-container.green .char-bolt {
    filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.6)) drop-shadow(0 0 15px rgba(0, 255, 255, 0.3));
}

/* Cyan - Pink vaporwave edge */
.char-container.cyan { 
    --glow-color: #ff4081; 
}
.char-container.cyan .char-bolt {
    filter: drop-shadow(0 0 8px rgba(255, 64, 129, 0.6)) drop-shadow(0 0 15px rgba(255, 64, 129, 0.3));
}

/* Ghost - semi-transparent with eerie glow */
.char-container.ghost { 
    --glow-color: #c8c8ff;
}
.char-container.ghost .char-bolt {
    filter: drop-shadow(0 0 10px rgba(200, 200, 255, 0.5));
    opacity: 0.6;
    animation: ghostFloat 3s ease-in-out infinite;
}
@keyframes ghostFloat {
    0%, 100% { opacity: 0.6; transform: translateY(0); }
    50% { opacity: 0.4; transform: translateY(-2px); }
}
@keyframes ghostMarch {
    to { stroke-dashoffset: -20; }
}

/* Lava - molten glow with pulse */
.char-container.lava { 
    --glow-color: #ff6600;
}
.char-container.lava .char-bolt {
    filter: drop-shadow(0 0 10px rgba(255, 100, 0, 0.8)) drop-shadow(0 0 20px rgba(255, 50, 0, 0.5));
    animation: lavaBoltPulse 1.5s ease-in-out infinite;
}
@keyframes lavaBoltPulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 100, 0, 0.8)) drop-shadow(0 0 20px rgba(255, 50, 0, 0.5)); }
    50% { filter: drop-shadow(0 0 15px rgba(255, 100, 0, 1)) drop-shadow(0 0 30px rgba(255, 50, 0, 0.7)); }
}

/* Galaxy - space glow with stars */
.char-container.galaxy { 
    --glow-color: #a78bfa;
}
.char-container.galaxy .char-bolt {
    filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.8)) drop-shadow(0 0 25px rgba(139, 92, 246, 0.6));
}

/* Special color class effects */
.char-ghost::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.char-lava::before {
    content: '';
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #ffff00;
    border-radius: 50%;
    box-shadow: 0 0 6px #ff6600;
    animation: emberRise 2s ease-out infinite;
    z-index: 20;
}
.char-lava::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 30%;
    width: 3px;
    height: 3px;
    background: #ff8800;
    border-radius: 50%;
    box-shadow: 0 0 4px #ff4500;
    animation: emberRise 2.5s ease-out infinite 0.5s;
    z-index: 20;
}
@keyframes emberRise {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-30px); opacity: 0; }
}

.char-galaxy::before {
    content: '\2726';
    position: absolute;
    top: 20%;
    left: 25%;
    font-size: 6px;
    color: white;
    animation: starTwinkleGalaxy 1.5s ease-in-out infinite;
    z-index: 20;
}
.char-galaxy::after {
    content: '\2726';
    position: absolute;
    top: 60%;
    right: 25%;
    font-size: 4px;
    color: #ff88ff;
    animation: starTwinkleGalaxy 2s ease-in-out infinite 0.5s;
    z-index: 20;
}
@keyframes starTwinkleGalaxy {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.5); }
}

/* Neon Pink - fluorescent glow with pulsing black edge */
.char-neonpink::before {
    content: '\2727';
    position: absolute;
    top: 15%;
    left: 30%;
    font-size: 8px;
    color: #ff00ff;
    animation: neonPinkSparkle 1s ease-in-out infinite;
    z-index: 20;
}
.char-neonpink::after {
    content: '\2727';
    position: absolute;
    top: 55%;
    right: 30%;
    font-size: 6px;
    color: #ff69b4;
    animation: neonPinkSparkle 1.5s ease-in-out infinite 0.3s;
    z-index: 20;
}
@keyframes neonPinkSparkle {
    0%, 100% { opacity: 1; transform: scale(1); text-shadow: 0 0 8px #ff00ff; }
    50% { opacity: 0.5; transform: scale(0.7); text-shadow: 0 0 15px #ff00ff; }
}
.char-container.neonpink {
    --glow-color: #ff1493;
}
.char-container.neonpink .char-bolt {
    filter: drop-shadow(0 0 10px rgba(255, 20, 147, 0.7)) drop-shadow(0 0 20px rgba(255, 0, 255, 0.4));
}

/* Electric - crackling lightning effect */
.char-electric::before {
    content: '\26A1';
    position: absolute;
    top: 5%;
    left: 15%;
    font-size: 10px;
    color: #00ffff;
    animation: electricCrackle 0.15s ease-in-out infinite;
    z-index: 20;
    text-shadow: 0 0 10px #00ffff;
}
.char-electric::after {
    content: '\26A1';
    position: absolute;
    top: 40%;
    right: 10%;
    font-size: 8px;
    color: #ffffff;
    animation: electricCrackle 0.2s ease-in-out infinite 0.1s;
    z-index: 20;
    text-shadow: 0 0 8px #00d4ff;
}
@keyframes electricCrackle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    25% { opacity: 0.3; transform: scale(0.8) rotate(-10deg); }
    50% { opacity: 1; transform: scale(1.1) rotate(5deg); }
    75% { opacity: 0.5; transform: scale(0.9) rotate(-5deg); }
}
.char-container.electric {
    --glow-color: #00ffff;
}
.char-container.electric .char-bolt {
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.8)) drop-shadow(0 0 30px rgba(0, 136, 255, 0.5));
    animation: electricFlicker 0.1s ease-in-out infinite, charPulse 1.5s ease-in-out infinite;
}
@keyframes electricFlicker {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.8)) drop-shadow(0 0 30px rgba(0, 136, 255, 0.5)) brightness(1); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 40px rgba(0, 255, 255, 0.7)) brightness(1.2); }
}

/* Toxic - radioactive dripping effect */
.char-toxic::before {
    content: '\2622';
    position: absolute;
    top: 10%;
    left: 20%;
    font-size: 10px;
    color: #7fff00;
    animation: toxicPulse 1s ease-in-out infinite;
    z-index: 20;
    text-shadow: 0 0 10px #39ff14;
}
.char-toxic::after {
    content: '\25CF';
    position: absolute;
    bottom: 5%;
    left: 50%;
    font-size: 6px;
    color: #39ff14;
    animation: toxicDrip 2s ease-in infinite;
    z-index: 20;
}
@keyframes toxicPulse {
    0%, 100% { opacity: 1; transform: scale(1); text-shadow: 0 0 10px #39ff14; }
    50% { opacity: 0.6; transform: scale(0.9); text-shadow: 0 0 20px #7fff00; }
}
@keyframes toxicDrip {
    0% { transform: translateX(-50%) translateY(-80px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateX(-50%) translateY(20px); opacity: 0; }
}
.char-container.toxic {
    --glow-color: #39ff14;
}
.char-container.toxic .char-bolt {
    filter: drop-shadow(0 0 12px rgba(57, 255, 20, 0.7)) drop-shadow(0 0 25px rgba(127, 255, 0, 0.4));
}

/* Void - swirling black hole effect */
.char-void::before {
    content: '\2726';
    position: absolute;
    top: 25%;
    left: 20%;
    font-size: 6px;
    color: #ffffff;
    animation: voidSwirl 4s linear infinite;
    z-index: 20;
}
.char-void::after {
    content: '\2727';
    position: absolute;
    top: 60%;
    right: 20%;
    font-size: 5px;
    color: #cc88ff;
    animation: voidSwirl 3s linear infinite reverse;
    z-index: 20;
}
@keyframes voidSwirl {
    0% { transform: rotate(0deg) translateX(15px) rotate(0deg); opacity: 1; }
    50% { opacity: 0.3; }
    100% { transform: rotate(360deg) translateX(15px) rotate(-360deg); opacity: 1; }
}
.char-container.void {
    --glow-color: #8b00ff;
}
.char-container.void .char-bolt {
    filter: drop-shadow(0 0 15px rgba(139, 0, 255, 0.6)) drop-shadow(0 0 30px rgba(102, 0, 170, 0.4));
}

/* Diamond - sparkling crystal effect */
.char-diamond::before {
    content: '\2726';
    position: absolute;
    top: 15%;
    left: 25%;
    font-size: 10px;
    color: #ffffff;
    animation: diamondSparkle 1.5s ease-in-out infinite;
    z-index: 20;
    text-shadow: 0 0 5px #88ccff, 0 0 10px #ffffff;
}
.char-diamond::after {
    content: '\2727';
    position: absolute;
    top: 50%;
    right: 20%;
    font-size: 8px;
    color: #ffccee;
    animation: diamondSparkle 2s ease-in-out infinite 0.7s;
    z-index: 20;
    text-shadow: 0 0 5px #ffccee;
}
@keyframes diamondSparkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    25% { opacity: 0.3; transform: scale(0.5) rotate(45deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(0deg); }
    75% { opacity: 0.5; transform: scale(0.8) rotate(-45deg); }
}
.char-container.diamond {
    --glow-color: #ffffff;
}
.char-container.diamond .char-bolt {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 20px rgba(200, 220, 255, 0.5)) drop-shadow(0 0 30px rgba(255, 200, 230, 0.3));
}

/* Holographic - iridescent shimmer effect */
.char-holographic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: holographicSweep 2s linear infinite;
    z-index: 20;
    pointer-events: none;
}
@keyframes holographicSweep {
    0% { left: -50%; }
    100% { left: 150%; }
}
.char-container.holographic {
    --glow-color: #ff88ff;
}
.char-container.holographic .char-bolt {
    filter: drop-shadow(0 0 8px rgba(255, 136, 204, 0.6)) drop-shadow(0 0 15px rgba(136, 255, 204, 0.4)) drop-shadow(0 0 20px rgba(136, 204, 255, 0.3));
    animation: holographicGlow 3s ease-in-out infinite, charPulse 1.5s ease-in-out infinite;
}
@keyframes holographicGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 136, 204, 0.6)) drop-shadow(0 0 15px rgba(136, 255, 204, 0.4)); }
    33% { filter: drop-shadow(0 0 8px rgba(136, 255, 204, 0.6)) drop-shadow(0 0 15px rgba(136, 204, 255, 0.4)); }
    66% { filter: drop-shadow(0 0 8px rgba(136, 204, 255, 0.6)) drop-shadow(0 0 15px rgba(255, 136, 204, 0.4)); }
}

.char-container.black { 
    --glow-color: #ff0000;
}
.char-container.black .char-bolt {
    filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.6)) drop-shadow(0 0 15px rgba(255, 0, 0, 0.4));
}

/* Character container */
.char-container {
    position: relative;
    --glow-color: #ffd700;
}

/* Bolt SVG */
.char-bolt {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px var(--glow-color));
    animation: charPulse 1.5s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes charPulse {
    0%, 100% { filter: drop-shadow(0 0 6px var(--glow-color)); }
    50% { filter: drop-shadow(0 0 12px var(--glow-color)); }
}

/* Face container */
.char-face {
    position: absolute;
    top: 32%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

/* Accessory layer - on top of face */
.char-accessory-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* Eyes base */
.char-eyes {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 4px;
    position: relative;
}

.char-eye {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    position: relative;
    animation: charBlink 3s infinite;
}

.char-eye::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: #1a1a2e;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes charBlink {
    0%, 96%, 100% { transform: scaleY(1); }
    98% { transform: scaleY(0.1); }
}

/* Cross eyes */
.char-eyes-cross { position: relative; }
.char-eyes-cross .char-eye { width: 9px; height: 7px; }
.char-eyes-cross .char-eye::after { width: 4px; height: 4px; }
.char-eyes-cross .char-eye:first-child { transform: rotate(20deg); }
.char-eyes-cross .char-eye:last-child { transform: rotate(-20deg); }
.char-eyes-cross::before {
    content: ''; position: absolute; top: -6px; left: -2px;
    width: 12px; height: 3px; background: white; border-radius: 2px; transform: rotate(25deg);
}
.char-eyes-cross::after {
    content: ''; position: absolute; top: -6px; right: -2px;
    width: 12px; height: 3px; background: white; border-radius: 2px; transform: rotate(-25deg);
}

/* Sleepy eyes */
.char-eye-sleepy { width: 12px; height: 2px; background: white; border-radius: 2px; animation: none; }
.char-eye-sleepy::after { display: none; }

/* === SAD FACE === */
.char-sad {
    animation: sadBob 2s ease-in-out infinite;
}
@keyframes sadBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(2px); }
}

/* Sad eyes - looking down with watery effect */
.char-eyes-sad {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.char-eye-sad {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 6px rgba(79, 195, 247, 0.5);
}
.sad-pupil {
    width: 6px;
    height: 6px;
    background: radial-gradient(circle at 40% 40%, #5c6bc0 60%, #1a237e 100%);
    border-radius: 50%;
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.sad-pupil::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    top: 1px;
    left: 1px;
    opacity: 0.9;
}

/* Sad mouth - uses hypno mouth with tremble */
.sad-tremble {
    animation: sadMouthTremble 0.15s ease-in-out infinite;
}
@keyframes sadMouthTremble {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    75% { transform: translateX(1px); }
}

/* Tear drops as symbol falling from face area */
.char-tears-symbol {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 50px;
    pointer-events: none;
}
.tear-drop {
    position: absolute;
    width: 5px;
    height: 8px;
    background: linear-gradient(to bottom, #81d4fa, #29b6f6);
    border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
    opacity: 0;
    animation: tearDropFall 1.2s ease-in infinite;
}
.tear-drop:nth-child(1) {
    left: 8px;
    animation-delay: 0s;
}
.tear-drop-2 {
    left: 14px;
    animation-delay: 0.6s;
}
.tear-drop-3 {
    right: 14px;
    animation-delay: 0.3s;
}
.tear-drop-4 {
    right: 8px;
    animation-delay: 0.9s;
}
@keyframes tearDropFall {
    0% { top: 0; opacity: 0; }
    10% { opacity: 0.9; }
    100% { top: 45px; opacity: 0; }
}

/* Sad container aura */
.char-container.char-sad .char-bolt {
    filter: drop-shadow(0 0 10px rgba(79, 195, 247, 0.4));
}

/* === THOUGHTFUL FACE === */
.char-eyes-thoughtful {
    display: flex;
    gap: 6px;
    justify-content: center;
    position: relative;
}
.char-eye-thoughtful {
    width: 14px !important;
    height: 16px !important;
    background: white;
    border-radius: 50%;
    position: relative;
    overflow: visible;
}
.char-eye-thoughtful::before {
    content: '';
    position: absolute;
    top: 35%;
    left: 55%;
    width: 8px;
    height: 8px;
    background: #5c6bc0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: thoughtfulPupilDrift 4s ease-in-out infinite;
}
.thoughtful-pupil {
    position: absolute;
    top: 30%;
    left: 55%;
    width: 4px;
    height: 4px;
    background: #1a237e;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: thoughtfulPupilDrift 4s ease-in-out infinite;
}
.thoughtful-pupil::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -1px;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0.9;
}
.char-eye-thoughtful:last-child::before,
.char-eye-thoughtful:last-child .thoughtful-pupil {
    animation: thoughtfulPupilDrift 4s ease-in-out infinite;
}
@keyframes thoughtfulPupilDrift {
    0%, 100% { transform: translate(-50%, -50%); }
    25% { transform: translate(-40%, -60%); }
    50% { transform: translate(-60%, -50%); }
    75% { transform: translate(-50%, -40%); }
}

.char-eyebrows-thoughtful {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 8px;
}
.char-eyebrows-thoughtful::before {
    content: '';
    position: absolute;
    left: 0;
    width: 14px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transform: rotate(-12deg);
    animation: thoughtfulBrowRaise 4s ease-in-out infinite;
}
.char-eyebrows-thoughtful::after {
    content: '';
    position: absolute;
    right: 0;
    width: 14px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transform: rotate(5deg);
}
@keyframes thoughtfulBrowRaise {
    0%, 100% { transform: rotate(-12deg) translateY(0); }
    50% { transform: rotate(-18deg) translateY(-2px); }
}

.char-mouth-thoughtful {
    width: 8px;
    height: 5px;
    margin: 3px auto 0;
    border: 2px solid white;
    border-radius: 50%;
    background: rgba(92, 107, 192, 0.5);
    animation: thoughtfulMouthPurse 3s ease-in-out infinite;
}
@keyframes thoughtfulMouthPurse {
    0%, 100% { width: 8px; }
    50% { width: 10px; }
}

/* Iridescent Lightbulb */
.char-lightbulb {
    position: relative;
    width: 20px;
    height: 30px;
    animation: lightbulbFloat 2s ease-in-out infinite;
}
.lightbulb-glass {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 18px;
    border-radius: 50% 50% 40% 40%;
    background: linear-gradient(135deg, #ff9be2, #9be2ff, #e2ff9b, #9bffe2, #e29bff);
    background-size: 300% 300%;
    animation: iridescentShift 3s ease-in-out infinite;
    border: 1.5px solid white;
    box-shadow: 0 0 10px rgba(255, 155, 226, 0.5), 0 0 20px rgba(155, 226, 255, 0.3);
}
.lightbulb-glass::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 8px;
    background: white;
    opacity: 0.4;
    border-radius: 50%;
    animation: filamentGlow 0.5s ease-in-out infinite;
}
.lightbulb-glass::after {
    content: '';
    position: absolute;
    top: 40%;
    left: 30%;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
}
.lightbulb-base {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 6px;
    background: linear-gradient(to bottom, #ffd54f, #ffb300, #ff8f00);
    border-radius: 2px;
}
.lightbulb-base::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 3px solid #ff8f00;
}
.lightbulb-rays {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 24px;
}
.lightbulb-rays span {
    position: absolute;
    width: 2px;
    height: 6px;
    background: linear-gradient(to top, rgba(255,255,255,0), rgba(255,255,255,0.8));
    border-radius: 2px;
}
.lightbulb-rays span:nth-child(1) {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    animation: rayPulse 1s ease-in-out infinite;
}
.lightbulb-rays span:nth-child(2) {
    top: -2px;
    left: -2px;
    transform: rotate(-45deg);
    animation: rayPulse 1.2s ease-in-out infinite;
}
.lightbulb-rays span:nth-child(3) {
    top: -2px;
    right: -2px;
    transform: rotate(45deg);
    animation: rayPulse 1.1s ease-in-out infinite;
}
.lightbulb-rays span:nth-child(4) {
    top: 6px;
    left: -6px;
    transform: rotate(-70deg);
    animation: rayPulse 1.3s ease-in-out infinite;
}
.lightbulb-rays span:nth-child(5) {
    top: 6px;
    right: -6px;
    transform: rotate(70deg);
    animation: rayPulse 1.15s ease-in-out infinite;
}
@keyframes iridescentShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes filamentGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}
@keyframes lightbulbFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes rayPulse {
    0%, 100% { opacity: 0.5; height: 6px; }
    50% { opacity: 1; height: 8px; }
}

/* Thought bubbles */
.thought-bubbles {
    position: absolute;
    bottom: 10px;
    left: -8px;
    width: 10px;
    height: 20px;
}
.thought-bubbles span {
    position: absolute;
    background: white;
    border-radius: 50%;
}
.thought-bubbles span:nth-child(1) {
    bottom: 0;
    left: 0;
    width: 5px;
    height: 5px;
    animation: thoughtBubble 2s ease-in-out infinite;
}
.thought-bubbles span:nth-child(2) {
    bottom: 6px;
    left: 3px;
    width: 4px;
    height: 4px;
    animation: thoughtBubble 2s ease-in-out infinite 0.3s;
}
.thought-bubbles span:nth-child(3) {
    bottom: 11px;
    left: 5px;
    width: 3px;
    height: 3px;
    animation: thoughtBubble 2s ease-in-out infinite 0.6s;
}
@keyframes thoughtBubble {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Thoughtful container */
.char-thoughtful {
    animation: none;
}
.char-thoughtful::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(90, 150, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
    border-radius: 10px;
    animation: thoughtfulAura 3s ease-in-out infinite;
}
@keyframes thoughtfulAura {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* === ENERGETIC FACE === */
.char-eyes-energetic {
    display: flex;
    gap: 6px;
    justify-content: center;
    position: relative;
}
.char-eye-energetic {
    width: 16px !important;
    height: 16px !important;
    background: white;
    border-radius: 50%;
    position: relative;
    animation: energeticEyePulse 0.3s ease-in-out infinite;
}
.char-eye-energetic::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #00bcd4;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.energetic-star-pupil {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    transform: translate(-50%, -50%);
    animation: energeticStarSpin 2s linear infinite;
}
.energetic-star-pupil::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 8px solid white;
}
.energetic-star-pupil::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 8px solid white;
}
.char-eye-energetic:last-child .energetic-star-pupil {
    animation: energeticStarSpinReverse 2s linear infinite;
}
/* Electric sparks around eyes */
.char-eyes-energetic::before {
    content: '\26A1';
    position: absolute;
    top: -8px;
    left: -12px;
    font-size: 8px;
    animation: energeticSparkle 0.2s ease-in-out infinite;
}
.char-eyes-energetic::after {
    content: '\26A1';
    position: absolute;
    top: -8px;
    right: -12px;
    font-size: 8px;
    animation: energeticSparkle 0.2s ease-in-out infinite 0.1s;
}
.char-eyebrows-energetic {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 10px;
}
.char-eyebrows-energetic::before {
    content: '';
    position: absolute;
    left: 0;
    width: 15px;
    height: 4px;
    background: white;
    border-radius: 3px;
    transform: rotate(-15deg);
    animation: energeticBrowBounce 0.4s ease-in-out infinite;
}
.char-eyebrows-energetic::after {
    content: '';
    position: absolute;
    right: 0;
    width: 15px;
    height: 4px;
    background: white;
    border-radius: 3px;
    transform: rotate(15deg);
    animation: energeticBrowBounce 0.4s ease-in-out infinite 0.1s;
}
@keyframes energeticEyePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
@keyframes energeticStarSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes energeticStarSpinReverse {
    0% { transform: translate(-50%, -50%) rotate(360deg); }
    100% { transform: translate(-50%, -50%) rotate(0deg); }
}
@keyframes energeticSparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}
@keyframes energeticBrowBounce {
    0%, 100% { transform: rotate(-15deg) translateY(0); }
    50% { transform: rotate(-20deg) translateY(-3px); }
}

/* Furious eyes */
.char-eyes-furious { position: relative; }
.char-eyes-furious .char-eye { width: 9px; height: 6px; }
.char-eyes-furious .char-eye::after { width: 3px; height: 3px; }
.char-eyes-furious .char-eye:first-child { transform: rotate(25deg); }
.char-eyes-furious .char-eye:last-child { transform: rotate(-25deg); }
.char-eyes-furious::before {
    content: ''; position: absolute; top: -7px; left: -3px;
    width: 14px; height: 4px; background: white; border-radius: 2px; transform: rotate(35deg);
}
.char-eyes-furious::after {
    content: ''; position: absolute; top: -7px; right: -3px;
    width: 14px; height: 4px; background: white; border-radius: 2px; transform: rotate(-35deg);
}

/* Mouths */
.char-mouth-happy {
    width: 12px; height: 6px; border: 2px solid white; border-top: none;
    border-radius: 0 0 8px 8px; margin: 0 auto;
}
.char-mouth-cross {
    width: 12px; height: 6px; border: 2px solid white; border-bottom: none;
    border-radius: 8px 8px 0 0; margin: 0 auto;
}
.char-mouth-silly {
    width: 12px; height: 6px; border: 2px solid white; border-top: none;
    border-radius: 0 0 8px 8px; margin: 0 auto; position: relative;
}
.char-mouth-silly::after {
    content: ''; position: absolute; width: 6px; height: 8px; background: #ff6b9d;
    border-radius: 0 0 4px 4px; top: 4px; left: 50%; transform: translateX(-50%);
    animation: charTongue 1s ease-in-out infinite;
}
@keyframes charTongue { 0%, 100% { height: 8px; } 50% { height: 10px; } }

.char-mouth-sleepy {
    width: 10px; height: 12px; border: 2px solid white; border-radius: 50%; margin: 0 auto;
    animation: charYawn 2s ease-in-out infinite;
}
@keyframes charYawn { 0%, 100% { height: 12px; width: 10px; } 50% { height: 14px; width: 12px; } }

.char-mouth-energetic { 
    width: 18px; 
    height: 10px; 
    margin: 3px auto 0; 
    border: 2px solid white; 
    border-top: none;
    border-radius: 0 0 12px 12px; 
    background: #0097a7;
    position: relative;
    animation: energeticMouthPulse 0.3s ease-in-out infinite;
}
.char-mouth-energetic::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 5px;
    background: white;
    border-radius: 2px;
}
@keyframes energeticMouthPulse { 
    0%, 100% { transform: scale(1); } 
    50% { transform: scale(1.15); } 
}

/* Energetic symbol effects */
.char-energetic-bolts {
    font-size: 14px;
    animation: energeticBoltShake 0.3s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(0, 229, 255, 0.8));
}
.char-energetic-bolts .energetic-bolt-2 {
    position: absolute;
    top: -8px;
    left: -18px;
    font-size: 10px;
    animation: energeticBoltShake 0.25s ease-in-out infinite;
}
.char-energetic-bolts .energetic-bolt-3 {
    position: absolute;
    top: 12px;
    left: 5px;
    font-size: 8px;
    animation: energeticBoltShake 0.2s ease-in-out infinite;
}
.char-energetic-bolts .energetic-spark {
    position: absolute;
    top: -5px;
    left: -25px;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: energeticSparkFly 0.5s ease-out infinite;
}
.char-energetic-bolts .energetic-spark-2 {
    left: 15px;
    top: 15px;
    animation: energeticSparkFly 0.4s ease-out infinite 0.2s;
}
@keyframes energeticBoltShake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(2px, -1px); }
    50% { transform: translate(-1px, 1px); }
    75% { transform: translate(1px, 2px); }
}
@keyframes energeticSparkFly {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(-10px, -15px) scale(0); opacity: 0; }
}

/* Energetic container vibration */
.char-energetic {
    animation: energeticVibrate 0.2s ease-in-out infinite;
}
.char-energetic::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
    border-radius: 10px;
    animation: energeticAura 0.3s ease-in-out infinite;
}
@keyframes energeticVibrate {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(1px, 0); }
    50% { transform: translate(-1px, 1px); }
    75% { transform: translate(0, -1px); }
}
@keyframes energeticAura {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.char-mouth-furious {
    width: 14px; height: 6px; margin: 0 auto; border-radius: 2px;
    background: repeating-linear-gradient(90deg, white 0px, white 3px, #1a1a2e 3px, #1a1a2e 4px);
}

.char-mouth-neutral {
    width: 10px; height: 2px; background: white; margin: 0 auto; border-radius: 1px;
}

/* === OVER THE MOON FACE === */
.char-eyes-overthemoon {
    display: flex;
    gap: 6px;
    justify-content: center;
    position: relative;
}
.char-eye-overthemoon {
    width: 16px !important;
    height: 16px !important;
    background: white;
    border-radius: 50%;
    position: relative;
    animation: overthemoonEyePulse 0.5s ease-in-out infinite;
}
.overthemoon-star {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
}
.overthemoon-star::before {
    content: '\2605';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: #ff4081;
    animation: overthemoonStarColor 1s ease-in-out infinite;
}
.char-eye-overthemoon:last-child .overthemoon-star::before {
    animation: overthemoonStarColor 1s ease-in-out infinite 0.5s;
}
.char-eyebrows-overthemoon {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 10px;
}
.char-eyebrows-overthemoon::before {
    content: '';
    position: absolute;
    left: 0;
    width: 16px;
    height: 4px;
    background: white;
    border-radius: 3px;
    transform: rotate(-20deg);
    animation: overthemoonBrowBounce 0.5s ease-in-out infinite;
}
.char-eyebrows-overthemoon::after {
    content: '';
    position: absolute;
    right: 0;
    width: 16px;
    height: 4px;
    background: white;
    border-radius: 3px;
    transform: rotate(20deg);
    animation: overthemoonBrowBounce 0.5s ease-in-out infinite 0.1s;
}
@keyframes overthemoonEyePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
@keyframes overthemoonStarColor {
    0%, 100% { color: #ff4081; }
    33% { color: #ffeb3b; }
    66% { color: #00e5ff; }
}
@keyframes overthemoonBrowBounce {
    0%, 100% { transform: rotate(-20deg) translateY(0); }
    50% { transform: rotate(-25deg) translateY(-4px); }
}

.char-mouth-overthemoon {
    width: 20px;
    height: 12px;
    border: 2px solid white;
    border-top: none;
    border-radius: 0 0 14px 14px;
    margin: 3px auto 0;
    background: #7b1fa2;
    position: relative;
    animation: overthemoonMouthPulse 0.5s ease-in-out infinite;
}
.char-mouth-overthemoon::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 5px;
    background: white;
    border-radius: 2px;
}
.overthemoon-tongue {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 6px;
    background: #ff6b9d;
    border-radius: 0 0 6px 6px;
    animation: overthemoonTongue 0.3s ease-in-out infinite;
}
@keyframes overthemoonMouthPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
@keyframes overthemoonTongue {
    0%, 100% { height: 6px; }
    50% { height: 8px; }
}

/* Party effects */
.char-party-effects {
    font-size: 14px;
    animation: partyBounce 0.3s ease-in-out infinite;
}
.char-party-effects .party-popper-2 {
    position: absolute;
    top: 5px;
    left: -25px;
    font-size: 12px;
    animation: partyBounce 0.35s ease-in-out infinite;
}
.char-party-effects .confetti-1 {
    position: absolute;
    top: -10px;
    left: -15px;
    width: 5px;
    height: 5px;
    background: #ff4081;
    transform: rotate(45deg);
    animation: confettiFall 2s linear infinite;
}
.char-party-effects .confetti-2 {
    position: absolute;
    top: -5px;
    left: 15px;
    width: 4px;
    height: 4px;
    background: #ffeb3b;
    border-radius: 50%;
    animation: confettiFall 2.3s linear infinite 0.5s;
}
.char-party-effects .confetti-3 {
    position: absolute;
    top: 0;
    left: -30px;
    width: 4px;
    height: 4px;
    background: #00e5ff;
    transform: rotate(30deg);
    animation: confettiFall 1.8s linear infinite 0.3s;
}
@keyframes partyBounce {
    0%, 100% { transform: translateY(0) rotate(-10deg); }
    50% { transform: translateY(-5px) rotate(10deg); }
}
@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(80px) rotate(360deg); opacity: 0; }
}

/* Over the moon container bounce */
.char-overthemoon {
    animation: overthemoonBounce 0.5s ease-in-out infinite;
}
.char-overthemoon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 100, 200, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
    border-radius: 10px;
    animation: overthemoonAura 0.5s ease-in-out infinite;
}
@keyframes overthemoonBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes overthemoonAura {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* === WACKY FACE === */
.char-eyes-cheeky {
    display: flex;
    gap: 4px;
    align-items: flex-start;
}
.char-eye-cheeky-big {
    width: 16px !important;
    height: 18px !important;
    border-radius: 50%;
    background: white;
    position: relative;
    animation: cheekyBigEye 0.3s ease-in-out infinite;
}
.char-eye-cheeky-big::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #5D3A1A;
    border-radius: 50%;
    top: 4px;
    left: 3px;
    animation: cheekyPupilDart 0.4s ease-in-out infinite;
}
.char-eye-cheeky-big::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    top: 5px;
    left: 5px;
    z-index: 1;
}
.char-eye-cheeky-small {
    width: 10px !important;
    height: 12px !important;
    border-radius: 50%;
    background: white;
    position: relative;
    margin-top: 4px;
    animation: cheekySmallEye 0.25s ease-in-out infinite;
}
.char-eye-cheeky-small::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: #5D3A1A;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    animation: cheekyPupilDart 0.3s ease-in-out infinite reverse;
}
@keyframes cheekyBigEye {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1) rotate(5deg); }
}
@keyframes cheekySmallEye {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.9) rotate(-5deg); }
}
@keyframes cheekyPupilDart {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(3px, -2px); }
    50% { transform: translate(-2px, 2px); }
    75% { transform: translate(2px, 1px); }
}
.char-mouth-cheeky {
    width: 16px;
    height: 8px;
    border: 2px solid white;
    border-top: none;
    border-radius: 0 0 12px 12px;
    margin: 2px auto 0;
    position: relative;
    animation: cheekyMouthWobble 0.6s ease-in-out infinite;
}
@keyframes cheekyMouthWobble {
    0%, 100% { transform: rotate(-5deg) scaleX(1); }
    50% { transform: rotate(5deg) scaleX(1.1); }
}
.char-tongue {
    width: 8px;
    height: 12px;
    background: #ff6b9d;
    border-radius: 0 0 6px 6px;
    margin: -2px auto 0;
    animation: cheekyTongue 0.4s ease-in-out infinite;
}
@keyframes cheekyTongue {
    0%, 100% { height: 12px; transform: rotate(5deg); }
    50% { height: 16px; transform: rotate(-5deg); }
}
.char-cheeky-stars {
    animation: cheekyStarsSpin 1s linear infinite;
}
.char-cheeky-stars .cheeky-star-small {
    position: absolute;
    font-size: 8px;
    top: -5px;
    left: -15px;
    animation: cheekyStarsSpin 1.2s linear infinite reverse;
}
.char-cheeky-stars .cheeky-spiral {
    position: absolute;
    font-size: 10px;
    top: 10px;
    left: 5px;
    animation: cheekySpiral 0.5s linear infinite;
}
@keyframes cheekyStarsSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes cheekySpiral {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* === HYPNOTISED FACE === */
.char-eyes-hypno {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.char-eye-hypno {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50%;
    background: white;
    position: relative;
    overflow: hidden;
}
.hypno-spiral {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: 
        conic-gradient(from 0deg, #8b5cf6 0deg, transparent 30deg, #8b5cf6 60deg, transparent 90deg, 
                       #8b5cf6 120deg, transparent 150deg, #8b5cf6 180deg, transparent 210deg,
                       #8b5cf6 240deg, transparent 270deg, #8b5cf6 300deg, transparent 330deg, #8b5cf6 360deg);
    animation: hypnoSpiral 2s linear infinite;
}
.hypno-spiral::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #6366f1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.hypno-spiral-reverse {
    animation: hypnoSpiralReverse 2s linear infinite;
}
@keyframes hypnoSpiral {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes hypnoSpiralReverse {
    0% { transform: translate(-50%, -50%) rotate(360deg); }
    100% { transform: translate(-50%, -50%) rotate(0deg); }
}
.char-mouth-hypno {
    width: 10px;
    height: 8px;
    border: 2px solid white;
    border-radius: 50%;
    margin: 3px auto 0;
    background: rgba(45, 27, 78, 0.8);
    animation: hypnoMouthDroop 3s ease-in-out infinite;
}
@keyframes hypnoMouthDroop {
    0%, 100% { height: 8px; }
    50% { height: 10px; }
}
.char-hypno-swirls {
    animation: hypnoFloat 2s ease-in-out infinite;
}
.char-hypno-swirls .hypno-stars {
    position: absolute;
    font-size: 8px;
    animation: hypnoStarsOrbit 4s linear infinite;
    transform-origin: -10px 0;
}
@keyframes hypnoFloat {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(-3px); opacity: 0.7; }
}
@keyframes hypnoStarsOrbit {
    0% { transform: rotate(0deg) translateX(15px); }
    100% { transform: rotate(360deg) translateX(15px); }
}

/* === NAUGHTY FACE === */
.char-eyes-naughty {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.char-eye-naughty {
    width: 14px !important;
    height: 16px !important;
    border-radius: 50%;
    background: #000;
    position: relative;
    box-shadow: inset 0 0 5px #1a0000, 0 0 3px #000;
    animation: naughtyEyePulse 2s ease-in-out infinite;
}
.char-eye-naughty::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 12px;
    border-radius: 50%;
    background: #0a0a0a;
}
.naughty-pupil {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #ff0000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px #ff0000, 0 0 15px #ff0000;
    animation: naughtyPupilGlow 0.5s ease-in-out infinite;
}
.naughty-pupil::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 2px;
    height: 2px;
    background: #ff6666;
    border-radius: 50%;
    opacity: 0.6;
}
@keyframes naughtyEyePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes naughtyPupilGlow {
    0%, 100% { box-shadow: 0 0 8px #ff0000, 0 0 15px #ff0000; opacity: 0.9; }
    50% { box-shadow: 0 0 12px #ff0000, 0 0 20px #ff3333; opacity: 1; }
}

/* Naughty eyebrows */
.char-eyes-naughty::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -5px;
    width: 16px;
    height: 4px;
    background: #222;
    border-radius: 2px;
    transform: rotate(25deg);
}
.char-eyes-naughty::after {
    content: '';
    position: absolute;
    top: -8px;
    right: -5px;
    width: 16px;
    height: 4px;
    background: #222;
    border-radius: 2px;
    transform: rotate(-25deg);
}

/* Naughty mischievous smirk */
.char-mouth-naughty {
    width: 14px;
    height: 7px;
    margin: 4px auto 0;
    border: 2px solid #ff4444;
    border-top: none;
    border-radius: 0 0 12px 12px;
    position: relative;
    transform: rotate(-8deg);
    animation: naughtySmirk 2s ease-in-out infinite;
}
.char-mouth-naughty::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -2px;
    width: 6px;
    height: 2px;
    background: #ff4444;
    border-radius: 2px;
    transform: rotate(-20deg);
}
@keyframes naughtySmirk {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(-5deg) scaleX(1.1); }
}

/* Naughty effects */
.char-naughty-effects {
    animation: naughtyFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
}
.naughty-wisp {
    position: absolute;
    top: 5px;
    left: -20px;
    width: 8px;
    height: 15px;
    background: linear-gradient(to top, transparent, rgba(255, 0, 0, 0.4));
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: naughtyWispFloat 2s ease-in-out infinite;
}
.naughty-wisp-2 {
    left: auto;
    right: -15px;
    top: 10px;
    width: 6px;
    height: 12px;
    animation: naughtyWispFloat 2.5s ease-in-out infinite reverse;
}
@keyframes naughtyFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes naughtyWispFloat {
    0%, 100% { 
        transform: translateY(0) scaleY(1); 
        opacity: 0.4;
    }
    50% { 
        transform: translateY(-8px) scaleY(1.3); 
        opacity: 0.7;
    }
}

/* Naughty container effect */
.char-naughty { 
    animation: naughtyPulse 3s ease-in-out infinite;
}
.char-naughty::after {
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 0, 0, 0.1) 0%, transparent 60%);
    pointer-events: none; 
    z-index: 1; 
    border-radius: 10px;
    animation: naughtyAuraFlicker 0.5s ease-in-out infinite;
}
@keyframes naughtyPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.1); }
}
@keyframes naughtyAuraFlicker {
    0%, 100% { opacity: 0.8; }
    25% { opacity: 1; }
    50% { opacity: 0.6; }
    75% { opacity: 0.9; }
}

.char-eye-plain {
    width: 4px !important; height: 4px !important; border-radius: 50%;
}

/* Symbols */
.char-symbol { position: absolute; top: 10%; right: -5px; z-index: 15; font-size: 12px; }
.char-thumbs { animation: charThumbsBounce 1s ease-in-out infinite; }
@keyframes charThumbsBounce { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-4px) rotate(5deg); } }

.char-zzz {
    color: white; font-weight: bold; font-size: 10px; text-shadow: 0 0 5px var(--glow-color);
    animation: charZzzFloat 2s ease-in-out infinite;
}
@keyframes charZzzFloat { 0%, 100% { transform: translateY(0) rotate(-10deg); opacity: 0.7; } 50% { transform: translateY(-5px) rotate(0deg); opacity: 1; } }

.char-steam { animation: charSteamRise 0.8s ease-out infinite; }
.char-steam .steam-small { position: absolute; top: 5px; left: -15px; font-size: 10px; animation: charSteamRise 0.8s ease-out infinite 0.3s; }
@keyframes charSteamRise { 0% { transform: translateY(0) scale(1); opacity: 0.9; } 100% { transform: translateY(-8px) scale(1.3); opacity: 0; } }

/* Furious shake */
.char-furious { animation: charShake 0.1s infinite; }
.char-furious::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 0, 0, 0.15) 0%, transparent 60%);
    pointer-events: none; z-index: 1; border-radius: 10px;
}
@keyframes charShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1px); } 75% { transform: translateX(1px); } }

/* Wacky wobble */
.char-cheeky { animation: charWackyWobble 0.5s ease-in-out infinite; }
.char-cheeky::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 107, 157, 0.1) 0%, transparent 60%);
    pointer-events: none; z-index: 1; border-radius: 10px;
}
@keyframes charWackyWobble { 
    0%, 100% { transform: rotate(-2deg); } 
    50% { transform: rotate(2deg); } 
}

/* Hypnotised sway */
.char-hypnotised { animation: charHypnoSway 2s ease-in-out infinite; }
.char-hypnotised::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
    pointer-events: none; z-index: 1; border-radius: 10px;
    animation: charHypnoGlow 2s ease-in-out infinite;
}
@keyframes charHypnoSway { 
    0%, 100% { transform: translateX(0); } 
    25% { transform: translateX(2px); }
    75% { transform: translateX(-2px); }
}
@keyframes charHypnoGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Sparks */
.char-sparks { position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; }
.char-spark {
    position: absolute; width: 3px; height: 3px; background: white; border-radius: 50%;
    animation: charSpark 0.8s ease-out infinite;
}
.char-spark:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.char-spark:nth-child(2) { top: 40%; right: 5%; animation-delay: 0.2s; }
.char-spark:nth-child(3) { top: 60%; left: 5%; animation-delay: 0.4s; }
@keyframes charSpark { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0) translateY(-15px); } }

/* ============ CHARACTER PICKER MODAL ============ */

.character-picker-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); display: flex; justify-content: center; align-items: center;
    z-index: 10000; backdrop-filter: blur(4px);
}

.character-picker-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px; padding: 25px; max-width: 400px; width: 90%; max-height: 90vh;
    overflow-y: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); border: 2px solid rgba(255, 255, 255, 0.1);
}

.character-picker-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}

.character-picker-header h2 { color: white; font-size: 1.4rem; margin: 0; }

.character-picker-header .close-btn {
    background: rgba(255, 255, 255, 0.1); border: none; color: white;
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; transition: background 0.2s;
}
.character-picker-header .close-btn:hover { background: rgba(255, 255, 255, 0.2); }

.character-preview-section { display: flex; justify-content: center; margin-bottom: 25px; }
.character-preview { width: 100px; height: 140px; position: relative; }

.character-picker-section { margin-bottom: 20px; }
.character-picker-section h3 { color: rgba(255, 255, 255, 0.8); font-size: 0.95rem; margin-bottom: 12px; font-weight: 600; }

.face-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.face-option {
    background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; padding: 12px 8px; cursor: pointer; transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.face-option:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }
.face-option.selected { background: rgba(138, 43, 226, 0.3); border-color: #9c27b0; box-shadow: 0 0 15px rgba(138, 43, 226, 0.4); }

.face-emoji { font-size: 1.8rem; }
.face-label { color: rgba(255, 255, 255, 0.7); font-size: 0.75rem; font-weight: 500; }
.face-option.selected .face-label { color: white; }
.face-cost { font-size: 0.6rem; color: #ffc107; }

.face-option.locked {
    opacity: 0.5; cursor: not-allowed; position: relative;
}
.face-option.locked::after {
    content: '\1F512'; position: absolute; top: 5px; right: 5px; font-size: 0.7rem;
}

.face-points-display {
    font-size: 0.75rem; color: #ffc107; margin-left: 8px;
}

.color-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.color-option {
    background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; padding: 10px 6px; cursor: pointer; transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    position: relative;
}
.color-option:hover:not(.locked) { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }
.color-option.selected { 
    border-color: var(--btn-color); 
    box-shadow: 0 0 15px var(--btn-color), 0 0 30px color-mix(in srgb, var(--btn-color) 50%, transparent), inset 0 0 10px color-mix(in srgb, var(--btn-color) 20%, transparent); 
    background: color-mix(in srgb, var(--btn-color) 15%, rgba(255, 255, 255, 0.05));
}

.color-swatch { width: 28px; height: 28px; border-radius: 50%; background: var(--btn-color); box-shadow: 0 0 10px var(--btn-color); }

/* Red swatch with black outline */
.red-swatch {
    background: linear-gradient(135deg, #ff5252, #ff1744, #d50000);
    box-shadow: 0 0 10px rgba(255, 23, 68, 0.6);
    border: 2px solid #000000 !important;
}

.color-label { color: rgba(255, 255, 255, 0.7); font-size: 0.65rem; font-weight: 500; }
.color-option.selected .color-label { color: white; }
.color-cost { font-size: 0.55rem; color: #ffc107; }

.color-option.locked {
    opacity: 0.5; cursor: not-allowed;
}
.color-option.locked::after {
    content: '\1F512'; position: absolute; top: 5px; right: 5px; font-size: 0.7rem;
}

.color-option.ultimate { border-color: rgba(156, 39, 176, 0.5); }
.color-option.ultimate .color-cost { color: #ba68c8; }

.color-points-display {
    font-size: 0.75rem; color: #ffc107; margin-left: 8px;
}

.rainbow-swatch {
    background: linear-gradient(135deg, #ff0000, #ff8800, #ffff00, #00ff00, #0088ff, #8800ff);
    animation: rainbowRotate 2s linear infinite;
}
@keyframes rainbowRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.ghost-swatch {
    background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(200,200,230,0.4), rgba(180,180,210,0.3));
    border: 2px dashed rgba(255,255,255,0.6) !important;
    animation: ghostSwatchPulse 2s ease-in-out infinite, ghostSwatchBorder 1s linear infinite;
}
@keyframes ghostSwatchPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.5; }
}
@keyframes ghostSwatchBorder {
    to { border-color: rgba(255,255,255,0.3); }
}

.lava-swatch {
    background: linear-gradient(135deg, #ff4500, #ff6600, #cc3300);
    box-shadow: 0 0 10px rgba(255, 100, 0, 0.6);
    animation: lavaPulse 1.5s ease-in-out infinite;
}
@keyframes lavaPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 100, 0, 0.6); }
    50% { box-shadow: 0 0 20px rgba(255, 100, 0, 0.9); }
}

.galaxy-swatch {
    background: linear-gradient(135deg, #7c3aed, #5b21b6, #4c1d95);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    position: relative;
    overflow: hidden;
}
.galaxy-swatch::before {
    content: '\2726';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    animation: starTwinkle 1.5s ease-in-out infinite;
}
@keyframes starTwinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.neonpink-swatch {
    background: linear-gradient(135deg, #ff69b4, #ff1493, #ff00aa);
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.6);
    position: relative;
    animation: neonPinkSwatchPulse 1s ease-in-out infinite;
    border: 2px solid #000 !important;
}
@keyframes neonPinkSwatchPulse {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(255, 20, 147, 0.6), inset 0 0 5px rgba(255, 105, 180, 0.5);
        border-color: #000;
    }
    50% { 
        box-shadow: 0 0 20px rgba(255, 0, 255, 0.9), inset 0 0 10px rgba(255, 105, 180, 0.8);
        border-color: #333;
    }
}

/* Electric swatch - crackling energy */
.electric-swatch {
    background: linear-gradient(135deg, #ffffff, #00d4ff, #0088ff);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.7), 0 0 20px rgba(0, 136, 255, 0.4);
    animation: electricSwatchPulse 0.2s ease-in-out infinite;
    position: relative;
}
@keyframes electricSwatchPulse {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.7), 0 0 20px rgba(0, 136, 255, 0.4);
        filter: brightness(1);
    }
    50% { 
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.9), 0 0 30px rgba(0, 255, 255, 0.6);
        filter: brightness(1.3);
    }
}

/* Toxic swatch - radioactive glow */
.toxic-swatch {
    background: linear-gradient(180deg, #7fff00, #39ff14, #32cd32, #228b22);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.7);
    animation: toxicSwatchPulse 1.5s ease-in-out infinite;
    position: relative;
}
.toxic-swatch::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #7fff00;
    border-radius: 50%;
    animation: toxicBubble 2s ease-in-out infinite;
}
@keyframes toxicSwatchPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(57, 255, 20, 0.6); }
    50% { box-shadow: 0 0 20px rgba(127, 255, 0, 0.9); }
}
@keyframes toxicBubble {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0; }
    50% { transform: translateX(-50%) translateY(-15px); opacity: 1; }
}

/* Void swatch - black hole effect */
.void-swatch {
    background: radial-gradient(circle at center, #000000 0%, #1a0033 40%, #3d0066 70%, #6600aa 100%);
    box-shadow: 0 0 15px rgba(139, 0, 255, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.8);
    animation: voidSwatchPulse 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}
.void-swatch::before {
    content: '\2726';
    position: absolute;
    font-size: 6px;
    color: white;
    animation: voidStarSwirl 4s linear infinite;
}
@keyframes voidSwatchPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(139, 0, 255, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.8); }
    50% { box-shadow: 0 0 20px rgba(139, 0, 255, 0.8), inset 0 0 15px rgba(0, 0, 0, 0.9); }
}
@keyframes voidStarSwirl {
    0% { top: 50%; left: 80%; opacity: 1; }
    25% { top: 20%; left: 50%; opacity: 0.7; }
    50% { top: 50%; left: 20%; opacity: 0.4; }
    75% { top: 80%; left: 50%; opacity: 0.2; }
    100% { top: 50%; left: 50%; opacity: 0; }
}

/* Diamond swatch - sparkling crystal */
.diamond-swatch {
    background: linear-gradient(135deg, #ffffff 0%, #e6f3ff 25%, #cce5ff 50%, #e6f3ff 75%, #ffffff 100%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(200, 220, 255, 0.4);
    animation: diamondSwatchSparkle 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}
.diamond-swatch::before {
    content: '\2726';
    position: absolute;
    top: 20%;
    left: 60%;
    font-size: 8px;
    color: #88ccff;
    animation: diamondTwinkle 1s ease-in-out infinite;
}
.diamond-swatch::after {
    content: '\2727';
    position: absolute;
    top: 60%;
    left: 25%;
    font-size: 6px;
    color: #ffccee;
    animation: diamondTwinkle 1.5s ease-in-out infinite 0.5s;
}
@keyframes diamondSwatchSparkle {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}
@keyframes diamondTwinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.5); }
}

/* Holographic swatch - iridescent shimmer */
.holographic-swatch {
    background: linear-gradient(135deg, #ff88cc, #88ffcc, #88ccff, #ffcc88, #cc88ff);
    background-size: 300% 300%;
    animation: holographicShift 3s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 136, 204, 0.5);
    position: relative;
    overflow: hidden;
}
.holographic-swatch::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: holographicSheen 2s linear infinite;
}
@keyframes holographicShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes holographicSheen {
    0% { left: -100%; }
    100% { left: 200%; }
}

.save-character-btn {
    width: 100%; padding: 14px; background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    border: none; border-radius: 12px; color: white; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s; margin-top: 10px;
}
.save-character-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(156, 39, 176, 0.4); }
.save-character-btn:active { transform: translateY(0); }

/* ============ ACCESSORY SYSTEM ============ */
.accessory-points-display {
    font-size: 0.75rem;
    color: #ffc107;
    margin-left: 8px;
}

.accessory-options { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px; 
}

.accessory-option {
    background: rgba(255, 255, 255, 0.05); 
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; 
    padding: 12px 6px; 
    cursor: pointer; 
    transition: all 0.2s;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 4px;
    position: relative;
}

.accessory-option:hover:not(.locked) { 
    background: rgba(255, 255, 255, 0.1); 
    border-color: rgba(255, 255, 255, 0.3); 
}

.accessory-option.selected { 
    background: rgba(138, 43, 226, 0.3); 
    border-color: #9c27b0; 
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4); 
}

.accessory-option.locked {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.accessory-option.locked::after {
    content: '\1F512';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.7rem;
}
.accessory-option.locked::after {
    content: '\1F512';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.7rem;
}
.accessory-option.locked::after {
    content: '\1F512';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.7rem;
}
.accessory-option.locked::after {
    content: '\1F512';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.7rem;
}
.accessory-option.locked::after {
    content: '\1F512';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.7rem;
}
.accessory-option.locked::after {
    content: '\1F512';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.7rem;
}
.accessory-option.locked::after {
    content: '\1F512';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.7rem;
}

.accessory-option.ultimate {
    border-color: rgba(147, 51, 234, 0.5);
    background: rgba(147, 51, 234, 0.15);
}

.accessory-option.ultimate.selected {
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.6);
}

.accessory-icon { 
    font-size: 1.6rem; 
}

.accessory-label { 
    color: rgba(255, 255, 255, 0.7); 
    font-size: 0.65rem; 
    font-weight: 500; 
    text-align: center;
    line-height: 1.2;
}

.accessory-option.selected .accessory-label { 
    color: white; 
}

.accessory-cost {
    font-size: 0.6rem;
    color: #ffc107;
    background: rgba(255, 193, 7, 0.2);
    padding: 2px 6px;
    border-radius: 8px;
    margin-top: 2px;
}

.accessory-option.locked .accessory-cost {
    color: rgba(255, 193, 7, 0.5);
}

/* ============ END ACCESSORY SYSTEM ============ */

/* ============ END CHARACTER SYSTEM ============ */

/* ============ HEADER LIGHTNING BOLTS ============ */
.header-bolt-container {
    display: inline-block;
    vertical-align: middle;
    width: 50px;
    height: 70px;
    margin: 0 5px;
    transform: rotate(10deg);
}

.header-bolt-container.header-bolt-right {
    transform: rotate(-10deg) scaleX(-1);
}

.header-bolt-container .char-container {
    width: 100% !important;
    height: 100% !important;
}

.header-bolt-container .char-face {
    transform: translateX(-50%) scale(0.55);
}

.header-bolt-container .char-symbol {
    font-size: 10px;
    top: 8%;
    right: -3px;
}

.header-bolt-container .char-zzz {
    font-size: 8px;
}

.header-bolt-container .char-bolts {
    font-size: 10px;
}

.header-bolt-container .char-bolts .bolt-small {
    font-size: 6px;
    top: -3px;
    left: -8px;
}

.header-bolt-container .char-bolts .bolt-tiny {
    font-size: 5px;
    top: 8px;
    left: -2px;
}

.header-bolt-container .char-steam .steam-small {
    font-size: 8px;
    left: -10px;
}

.header-bolt-container .char-thumbs {
    font-size: 10px;
}

.header-bolt-container .char-sparks {
    display: none;
}
/* ============ END HEADER LIGHTNING BOLTS ============ */

/* ============ CUSTOM ISLANDS STYLES ============ */

#customIslandsOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

#customIslandsPanel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 24px;
    width: 95%;
    max-width: 550px;
    max-height: 90vh;
    overflow: hidden;
    z-index: 9999;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease-out;
}

.custom-islands-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
}

.custom-islands-header h2 {
    margin: 0;
    font-family: 'Fredoka', cursive;
    font-size: 1.4rem;
}

.custom-islands-header .close-btn {
    color: white;
    opacity: 0.8;
    font-size: 1.5rem;
}

.custom-islands-header .close-btn:hover {
    opacity: 1;
}

#customIslandsContent {
    padding: 20px 25px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

/* Sections */
.ci-section {
    margin-bottom: 25px;
}

.ci-section h3 {
    font-family: 'Fredoka', cursive;
    color: #ea580c;
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.ci-empty {
    color: #999;
    font-style: italic;
    padding: 15px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Island Cards */
.ci-island-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid #f97316;
}

.ci-island-card:hover {
    background: #eef4f7;
    transform: translateX(5px);
}

.ci-island-card.added {
    border-left-color: var(--green);
}

.ci-island-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ci-island-name {
    font-weight: 700;
    color: #333;
}

.ci-island-meta {
    font-size: 0.85rem;
    color: #666;
}

.ci-island-code {
    font-family: monospace;
    font-size: 0.8rem;
    color: #888;
    background: #eee;
    padding: 4px 10px;
    border-radius: 6px;
}

.ci-remove-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
}

/* Create Button */
.ci-create-btn {
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f97316, #ea580c);
}

/* Join Section */
.ci-join-section {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.ci-join-section input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    font-family: monospace;
}

.ci-join-section input:focus {
    border-color: #f97316;
    outline: none;
}

/* Create Form */
.ci-create-form, .ci-word-editor, .ci-view-island {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ci-back-btn {
    background: #f0f0f0;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.ci-back-btn:hover {
    background: #e0e0e0;
}

.ci-create-form h3, .ci-word-editor h3, .ci-view-island h3 {
    font-family: 'Fredoka', cursive;
    color: #ea580c;
    margin: 0 0 20px 0;
}

.ci-form-group {
    margin-bottom: 18px;
}

.ci-form-group label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.ci-form-group input,
.ci-form-group select,
.ci-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.ci-form-group input:focus,
.ci-form-group select:focus,
.ci-form-group textarea:focus {
    border-color: #f97316;
    outline: none;
}

.ci-form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.ci-help-text {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
}

.ci-next-btn {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
}

/* Word Editor */
.ci-editor-header {
    margin-bottom: 20px;
}

.ci-progress {
    margin-top: 10px;
}

.ci-progress-text {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.ci-progress-text.complete {
    color: var(--green);
    font-weight: 600;
}

.ci-progress-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.ci-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #22c55e);
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* Share Info */
.ci-share-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 15px;
    background: #fff7ed;
    border-radius: 10px;
    margin-bottom: 20px;
}

.ci-share-code {
    font-family: monospace;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: #ea580c;
    background: white;
    padding: 5px 12px;
    border-radius: 6px;
}

.ci-copy-btn {
    background: #f97316;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

.ci-share-note {
    font-size: 0.8rem;
    color: #666;
    margin-left: auto;
}

/* Complete Banner */
.ci-complete-banner {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 15px;
}

.ci-practice-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--green), #27ae60);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Add Word Section */
.ci-add-word-section {
    background: #fff7ed;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.ci-add-word-section h4 {
    margin: 0 0 15px 0;
    color: #ea580c;
    font-family: 'Fredoka', cursive;
}

.ci-word-input-row {
    display: flex;
    gap: 10px;
}

.ci-word-input-row input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ccc;
    border-radius: 10px;
    font-size: 1rem;
}

.ci-word-input-row input:focus {
    border-color: #f97316;
    outline: none;
}

/* Loading */
.ci-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Lookup Result */
.ci-lookup-result {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
    border: 2px solid #f97316;
}

.ci-lookup-result.not-found {
    border-color: #ffc107;
}

.ci-lookup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.ci-lookup-word {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ea580c;
}

.ci-lookup-pos {
    font-style: italic;
    color: #888;
}

.ci-lookup-not-found {
    background: #fff3cd;
    color: #856404;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
}

.ci-manual-entry-note {
    color: #666;
    margin-bottom: 15px;
}

.ci-lookup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

/* Word List */
.ci-word-list {
    margin-top: 20px;
}

.ci-word-list h4 {
    font-family: 'Fredoka', cursive;
    color: #ea580c;
    margin: 0 0 15px 0;
}

.ci-word-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 8px;
}

.ci-word-num {
    width: 28px;
    height: 28px;
    background: #f97316;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.ci-word-details {
    flex: 1;
    min-width: 0;
}

.ci-word-text {
    display: block;
    font-weight: 700;
    color: #333;
}

.ci-word-def {
    display: block;
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ci-word-remove {
    background: #ff6b6b;
    color: white;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.ci-word-remove:hover {
    opacity: 1;
}

/* View Only mode */
.ci-word-list.view-only .ci-word-item {
    cursor: default;
}

.ci-view-island .ci-desc {
    color: #666;
    margin-bottom: 10px;
}

.ci-view-island .ci-word-count {
    color: #888;
    margin-bottom: 20px;
}

/* Danger Zone */
.ci-danger-zone {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.btn-danger {
    background: #dc3545 !important;
}

.btn-danger:hover {
    background: #c82333 !important;
}

/* Mobile */
@media (max-width: 500px) {
    #customIslandsPanel {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        transform: translate(-50%, -50%);
    }
    
    .custom-islands-header {
        border-radius: 0;
    }
    
    #customIslandsContent {
        max-height: calc(100vh - 70px);
    }
    
    .ci-word-input-row {
        flex-direction: column;
    }
    
    .ci-share-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ci-share-note {
        margin-left: 0;
    }
}

/* ============ CUSTOM ISLANDS ON HOME PAGE ============ */

.custom-island-card {
    position: relative;
    cursor: grab;
}

.custom-island-card:active {
    cursor: grabbing;
}

.custom-island-card .island-number {
    color: #f97316 !important;
}

.custom-island-card .progress-bar.custom {
    background: linear-gradient(90deg, #f97316, #22c55e) !important;
}

.island-drag-handle {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.2rem;
    color: #999;
    cursor: grab;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.island-drag-handle:hover {
    opacity: 1;
}

.custom-island-card.dragging {
    opacity: 0.5;
    transform: scale(1.02);
}

.drop-indicator {
    width: 8px;
    height: 150px;
    background: linear-gradient(180deg, #f97316, #ea580c);
    border-radius: 4px;
    margin: 0 10px;
    animation: dropPulse 0.5s ease-in-out infinite alternate;
}

@keyframes dropPulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* ============ HOME PAGE TOGGLE IN WORD STUDIO ============ */

.ci-home-toggle {
    background: #fff7ed;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.ci-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.ci-toggle-label input {
    display: none;
}

.ci-toggle-slider {
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    position: relative;
    transition: background 0.3s;
}

.ci-toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ci-toggle-label input:checked + .ci-toggle-slider {
    background: #f97316;
}

.ci-toggle-label input:checked + .ci-toggle-slider::before {
    transform: translateX(24px);
}

.ci-toggle-text {
    font-weight: 600;
    color: #333;
}

.ci-toggle-hint {
    font-size: 0.8rem;
    color: #888;
}

@media (max-width: 500px) {
    .ci-home-toggle {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============ QUIZ COMPANION CHARACTER ============ */

.quiz-companion {
    position: fixed;
    top: 10%;
    right: 5%;
    width: 100px;
    height: 140px;
    z-index: 1001;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.quiz-companion .char-container {
    animation: companionBob 2s ease-in-out infinite;
}

/* Idle state (default) - gentle bobbing */
.quiz-companion.state-idle .char-container {
    animation: companionBob 2s ease-in-out infinite;
}

/* Correct answer - bounce celebration */
.quiz-companion.state-correct .char-container {
    animation: companionBounce 0.6s ease-out;
}

/* Wrong answer - shake */
.quiz-companion.state-wrong .char-container {
    animation: companionShake 0.5s ease-out;
}

/* Timer low - nervous vibrate */
.quiz-companion.state-nervous .char-container {
    animation: companionNervous 0.15s linear infinite;
}

/* Streak - excited glow pulse */
.quiz-companion.state-streak .char-container {
    animation: companionStreak 0.8s ease-in-out infinite;
}

@keyframes companionBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes companionBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-20px) scale(1.15); }
    50% { transform: translateY(-5px) scale(1.05); }
    75% { transform: translateY(-12px) scale(1.1); }
}

@keyframes companionShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px) rotate(-8deg); }
    40% { transform: translateX(10px) rotate(8deg); }
    60% { transform: translateX(-8px) rotate(-5deg); }
    80% { transform: translateX(8px) rotate(5deg); }
}

@keyframes companionNervous {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

@keyframes companionStreak {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 200, 0, 0.5));
    }
    50% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 25px rgba(255, 200, 0, 0.8));
    }
}

/* Mobile responsive */
@media (max-width: 500px) {
    .quiz-companion {
        width: 60px;
        height: 85px;
        top: 10px;
        right: 10px;
    }
}

/* Island Guide Character */
.island-guide {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: guideSlideIn 0.6s ease-out;
    z-index: 10;
}

.guide-speech-bubble {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 16px 20px;
    max-width: 300px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 30px rgba(138, 43, 226, 0.2);
    animation: bubblePop 0.4s ease-out 0.3s both;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.guide-speech-bubble::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border: 10px solid transparent;
    border-left-color: #16213e;
    border-right: none;
}

.guide-quote-text {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 600;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 25%, #ffd700 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.6;
    display: block;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.guide-character {
    width: 80px;
    height: 110px;
    flex-shrink: 0;
    animation: guideFloat 3s ease-in-out infinite;
}

.guide-character svg {
    width: 100%;
    height: 100%;
}

@keyframes guideSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

@keyframes bubblePop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes guideFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@media (max-width: 900px) {
    .island-guide {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        justify-content: center;
        margin: 15px 0;
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .guide-speech-bubble {
        max-width: 100%;
    }
    
    .guide-speech-bubble::after {
        right: 50%;
        top: auto;
        bottom: -10px;
        transform: translateX(50%) rotate(-90deg);
    }
    
    .guide-character {
        width: 60px;
        height: 85px;
    }
}

/* Word Studio Button inside Parent Zone */
.word-studio-btn-inside {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.word-studio-btn-inside:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.word-studio-btn-inside span:first-child,
.word-studio-btn-inside span:last-child {
    font-size: 1.2rem;
}

/* ============ BIBBY BOT HELP SYSTEM ============ */

/* Floating Bibby Button */
.bibby-bot {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: bibbyPulse 3s ease-in-out infinite;
    border: 3px solid white;
}

.bibby-bot:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(2, 132, 199, 0.5);
    animation: none;
}

.bibby-bot:active {
    transform: scale(0.95);
}

.bibby-svg {
    width: 50px;
    height: 50px;
}

.bibby-tooltip {
    position: absolute;
    bottom: 70px;
    left: 0;
    background: white;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0369a1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.bibby-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    box-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.bibby-bot:hover .bibby-tooltip {
    opacity: 1;
    transform: translateY(0);
}

@keyframes bibbyPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Quote Thought Bubble - positioned below top-left character */
.bibby-quote-bubble {
    position: absolute;
    top: 130px;
    left: 30px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 30px;
    padding: 18px 24px;
    max-width: 340px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 30px rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: opacity 0.4s ease, visibility 0.4s, transform 0.4s ease;
}

.bibby-quote-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.bibby-quote-bubble.hiding {
    opacity: 0;
    transform: scale(0.9);
}

/* Thought bubble trail - three circles going UP from the cloud to the character */
.bibby-quote-bubble::before,
.bibby-quote-bubble::after {
    content: '';
    position: absolute;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Medium circle - middle of trail */
.bibby-quote-bubble::before {
    width: 18px;
    height: 18px;
    top: -30px;
    left: 35px;
}

/* Larger circle - closest to cloud */
.bibby-quote-bubble::after {
    width: 24px;
    height: 24px;
    top: -15px;
    left: 50px;
}

/* Smallest circle - closest to character */
.bibby-quote-bubble .thought-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    top: -42px;
    left: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bibby-quote-text {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 600;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 25%, #ffd700 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.6;
    display: block;
    animation: gradientShift 5s ease infinite;
}

/* Greeting Thought Bubble - same style as quote bubble */
.greeting-thought-bubble {
    position: absolute;
    top: 130px;
    left: 30px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 30px;
    padding: 18px 24px;
    max-width: 340px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 30px rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: opacity 0.4s ease, visibility 0.4s, transform 0.4s ease;
    cursor: pointer;
}

.greeting-thought-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Thought bubble trail */
.greeting-thought-bubble::before,
.greeting-thought-bubble::after {
    content: '';
    position: absolute;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.greeting-thought-bubble::before {
    width: 18px;
    height: 18px;
    top: -30px;
    left: 35px;
}

.greeting-thought-bubble::after {
    width: 24px;
    height: 24px;
    top: -15px;
    left: 50px;
}

.greeting-thought-bubble .thought-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    top: -42px;
    left: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.greeting-text {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 700;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 25%, #ffd700 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.6;
    display: block;
    animation: gradientShift 5s ease infinite;
}

.greeting-subtext {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-top: 6px;
}

/* Feedback Overlay */
.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}

.feedback-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Feedback Panel */
.feedback-panel {
    position: fixed;
    bottom: 100px;
    left: 20px;
    width: 340px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 10000;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
    display: flex;
    flex-direction: column;
}

.feedback-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Feedback Header */
.feedback-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-bottom: 1px solid #7dd3fc;
}

.feedback-header-icon {
    flex-shrink: 0;
}

.feedback-header-text h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #0c4a6e;
    font-family: 'Fredoka', sans-serif;
}

.feedback-header-text p {
    margin: 2px 0 0 0;
    font-size: 0.85rem;
    color: #0369a1;
}

.feedback-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.feedback-close-btn:hover {
    background: white;
    color: #0c4a6e;
}

/* Timer Pause Notice */
.feedback-pause-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 1px solid #f59e0b;
    font-size: 0.85rem;
    font-weight: 600;
    color: #92400e;
}

.feedback-pause-notice.feedback-paused {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-bottom-color: #34d399;
    color: #065f46;
}

.feedback-pause-notice span {
    font-size: 1rem;
}

/* Feedback Steps */
.feedback-step {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

/* Category Buttons */
.feedback-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feedback-category {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-family: 'Quicksand', sans-serif;
}

.feedback-category:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    transform: translateX(4px);
}

.feedback-category:active {
    transform: translateX(2px) scale(0.98);
}

.category-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.category-text {
    font-size: 0.95rem;
    color: #334155;
    font-weight: 500;
    line-height: 1.3;
}

/* Feedback Divider */
.feedback-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
    margin: 16px 0;
}

/* Tutorial Button in Feedback */
.feedback-tutorial-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border: 2px solid #e9d5ff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-family: 'Quicksand', sans-serif;
    width: 100%;
}

.feedback-tutorial-btn:hover {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    border-color: #c4b5fd;
    transform: translateX(4px);
}

.feedback-tutorial-btn .category-icon {
    font-size: 1.4rem;
}

.feedback-tutorial-btn .category-text {
    color: #7c3aed;
    font-weight: 600;
}

/* Back Button */
.feedback-back-btn {
    background: none;
    border: none;
    color: #0284c7;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    margin-bottom: 12px;
    border-radius: 6px;
    transition: background 0.2s;
    font-family: 'Quicksand', sans-serif;
}

.feedback-back-btn:hover {
    background: #e0f2fe;
}

/* Selected Category Display */
.feedback-selected-category {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #e0f2fe;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 600;
    color: #0369a1;
}

/* Feedback Form */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.feedback-form textarea {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Quicksand', sans-serif;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.feedback-form textarea:focus {
    outline: none;
    border-color: #7dd3fc;
}

.feedback-form textarea::placeholder {
    color: #94a3b8;
}

/* Photo Upload */
.feedback-photo-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feedback-photo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s;
    font-family: 'Quicksand', sans-serif;
}

.feedback-photo-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #475569;
}

.feedback-photo-btn span {
    font-size: 1.2rem;
}

.feedback-photo-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    margin: 0;
    font-style: italic;
}

.feedback-photo-preview {
    display: none;
}

.feedback-photo-preview.has-photo {
    display: block;
    position: relative;
}

.feedback-photo-preview img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.feedback-photo-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Submit Button */
.feedback-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Quicksand', sans-serif;
    margin-top: 8px;
}

.feedback-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.feedback-submit-btn:active {
    transform: translateY(0);
}

.feedback-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Thank You Screen */
.feedback-thankyou {
    text-align: center;
    padding: 30px 20px;
}

.thankyou-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: celebrateBounce 0.6s ease-out;
}

@keyframes celebrateBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.feedback-thankyou h3 {
    font-size: 1.5rem;
    color: #0c4a6e;
    margin-bottom: 8px;
    font-family: 'Fredoka', sans-serif;
}

.feedback-thankyou p {
    color: #64748b;
    margin-bottom: 20px;
}

.feedback-done-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    transition: transform 0.2s;
}

.feedback-done-btn:hover {
    transform: scale(1.05);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .bibby-bot {
        bottom: 16px;
        left: 16px;
        width: 56px;
        height: 56px;
    }
    
    .bibby-svg {
        width: 42px;
        height: 42px;
    }
    
    .feedback-panel {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
    }
    
    .feedback-panel.open {
        transform: translateY(0) scale(1);
    }
    
    .bibby-tooltip {
        display: none;
    }
}

/* ==================== DAILY PROGRESS RING ==================== */

.daily-progress-ring-container {
    position: fixed;
    top: 8%;
    right: 4%;
    width: 120px;
    height: 160px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.daily-progress-ring {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 6;
}

.progress-ring-fill {
    fill: none;
    stroke: #22c55e;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

/* Gold ring when goal is complete */
.daily-progress-ring-container.goal-complete .progress-ring-fill {
    stroke: #f59e0b;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
}

.daily-progress-ring-container.goal-complete #progressCompleteCheck {
    opacity: 1 !important;
    animation: checkPop 0.4s ease-out;
}

@keyframes checkPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Reposition quiz companion inside ring */
.daily-progress-ring-container .quiz-companion {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: 100px;
    height: 100px;
}

.daily-progress-time {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.daily-progress-ring-container.goal-complete .daily-progress-time {
    color: #fbbf24;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .daily-progress-ring-container {
        top: 5%;
        right: 2%;
        width: 90px;
        height: 130px;
    }
    
    .daily-progress-ring {
        width: 90px;
        height: 90px;
    }
    
    .progress-ring-bg,
    .progress-ring-fill {
        stroke-width: 5;
    }
    
    .daily-progress-ring-container .quiz-companion {
        width: 70px;
        height: 70px;
    }
    
    .daily-progress-time {
        font-size: 0.75rem;
    }
}
