        /* =========================================
           STYLE.CSS
           ========================================= */
        :root {
            --bg-gradient: radial-gradient(circle at center, #1a0000 0%, #000000 100%);
            --glass-bg: rgba(255, 255, 255, 0.1);
            --glass-border: rgba(255, 255, 255, 0.2);
            --primary: #ff0040;
            --accent: #ff4d79;
            --gold: #ffd700;
            --text-main: #fff;
            --text-muted: #ffcccc;
        }

        /* Birthday Mode Style */
        body.birthday-mode {
            --bg-gradient: radial-gradient(circle at center, #4a0026 0%, #1a000d 100%);
            --primary: #ff0080;
            --accent: #ff66b3;
        }


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

        body {
            font-family: 'Poppins', sans-serif;
            background: var(--bg-gradient);
            color: var(--text-main);
            min-height: 100vh;
            overflow-x: hidden;
            transition: background 1s ease;

        }

        #app-content {
            /* حقن تسريع الهاردوير بدون تدمير الـ Fixed Modals */
            transform: translateZ(0);
            will-change: transform;
            -webkit-overflow-scrolling: touch;
        }

        h1,
        h2,
        h3 {
            font-family: 'Dancing Script', cursive;
        }

        /* --- LOGIN SCREEN --- */
        #login-screen {
            position: fixed;
            inset: 0;
            z-index: 2000;
            background-size: cover;
            background-position: center;
            background-image: url('https://images.unsplash.com/photo-1518173946687-a4c8892bbd9f?q=80&w=1920&auto=format&fit=crop');
            display: flex;
            align-items: center;
            justify-content: center;
            transition: opacity 0.5s ease;
        }

        #login-screen::before {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
        }

        .login-card {
            position: relative;
            z-index: 10;
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(20px);
            padding: 3rem;
            border-radius: 30px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            text-align: center;
            width: 90%;
            max-width: 450px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        }

        .login-title {
            font-family: 'Great Vibes', cursive;
            font-size: 3.5rem;
            color: #ff0055;
            text-shadow: 0 0 20px rgba(255, 0, 85, 0.5);
            margin-bottom: 10px;
            line-height: 1.1;
        }

        /* --- MAIN HEADER (NAMES) --- */
        .header-names {
            font-family: 'Great Vibes', cursive;
            font-size: 4rem;
            background: linear-gradient(to bottom, #ff0055, #ff99aa);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-align: center;
            margin-bottom: 20px;
            filter: drop-shadow(0 0 10px rgba(255, 0, 85, 0.5));
            line-height: 1.2;
        }

        /* Birthday Header (Hidden by default) */
        .birthday-header {
            display: none;
            font-family: 'Great Vibes', cursive;
            font-size: 3.5rem;
            color: var(--gold);
            text-shadow: 0 0 20px #ff0080;
            margin-bottom: 20px;
            animation: bounce 2s infinite;
        }

        .birthday-msg {
            display: none;
            font-size: 1.2rem;
            font-style: italic;
            color: #fff;
            max-width: 600px;
            margin: 0 auto 30px auto;
            line-height: 1.6;
        }

        body.birthday-mode .birthday-header,
        body.birthday-mode .birthday-msg {
            display: block;
        }

        body.birthday-mode .header-names,
        body.birthday-mode .hero-sub {
            display: none;
        }

        @keyframes bounce {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-10px);
            }
        }

        /* --- COMPONENTS --- */
        .glass-card {
            background: var(--glass-bg);
            backdrop-filter: blur(15px);
            border: 1px solid var(--glass-border);
            border-radius: 20px;
            padding: 2rem;
            margin-bottom: 2rem;
            position: relative;
        }

        .glass-input {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: white;
            padding: 12px;
            border-radius: 10px;
            outline: none;
            width: 100%;
            margin-bottom: 10px;
        }

        .action-btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 20px;
            cursor: pointer;
            font-weight: bold;
            transition: 0.3s;
        }

        .action-btn:hover {
            transform: scale(1.05);
            background: var(--accent);
        }

        /* --- MEDIA GRID --- */
        .media-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
            margin-top: 1rem;
        }

        .media-item {
            position: relative;
            border-radius: 15px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(0, 0, 0, 0.3);
        }

        .media-visual {
            width: 100%;
            aspect-ratio: 1/1;
            background: #000;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .media-visual.video {
            aspect-ratio: 16/9;
        }

        .media-visual img,
        .media-visual video,
        .media-visual iframe {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border: none;
        }

        .media-controls {
            display: flex;
            justify-content: space-between;
            padding: 10px;
            background: rgba(255, 255, 255, 0.1);
        }

        .icon-btn {
            background: none;
            border: none;
            font-size: 1.2rem;
            cursor: pointer;
            transition: 0.2s;
            z-index: 5;
        }

        .btn-del {
            color: #ff4444;
        }

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

        .btn-fav {
            color: #ccc;
        }

        .btn-fav.active {
            color: #ff0055;
        }

        /* --- AI CHAT --- */
        .ai-modal {
            position: fixed;
            bottom: 90px;
            right: 20px;
            width: 350px;
            height: 500px;
            background: rgba(20, 0, 10, 0.95);
            border: 1px solid var(--primary);
            border-radius: 20px;
            display: flex;
            flex-direction: column;
            transform: scale(0);
            transition: 0.3s;
            transform-origin: bottom right;
            z-index: 3000;
            box-shadow: 0 0 30px rgba(255, 0, 85, 0.3);
        }

        .ai-modal.active {
            transform: scale(1);
        }

        .chat-header {
            padding: 15px;
            background: var(--primary);
            border-radius: 20px 20px 0 0;
            color: white;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .chat-body {
            flex: 1;
            padding: 15px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .msg {
            padding: 8px 12px;
            border-radius: 15px;
            max-width: 80%;
            font-size: 0.9rem;
            margin-bottom: 5px;
        }

        .msg-bot {
            background: rgba(255, 255, 255, 0.1);
            align-self: flex-start;
            border-bottom-left-radius: 2px;
        }

        .msg-user {
            background: var(--primary);
            align-self: flex-end;
            border-bottom-right-radius: 2px;
        }

        /* --- CONTROLS --- */
        .controls-dock {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1500;
            display: flex;
            gap: 10px;
        }

        .dock-btn {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.15);
            color: white;
            cursor: pointer;
            backdrop-filter: blur(5px);
            font-size: 1.2rem;
            transition: 0.3s;
        }

        .dock-btn:hover {
            background: var(--primary);
            transform: scale(1.1);
        }

        /* Heart Glow Animation for AI */
        .heart-glow {
            color: #ff0055;
            animation: glow-pulse 1.5s infinite alternate;
            font-size: 1.4rem;
        }

        @keyframes glow-pulse {
            from {
                text-shadow: 0 0 5px #ff0055, 0 0 10px #ff0055;
                transform: scale(1);
            }

            to {
                text-shadow: 0 0 20px #ff0055, 0 0 30px #ff0055;
                transform: scale(1.1);
            }
        }

        /* --- NOTES & BUCKET --- */
        .sticky-note {
            width: 180px;
            height: 180px;
            background: #fff9c4;
            color: #333;
            padding: 15px;
            font-family: 'Dancing Script', cursive;
            font-size: 1.4rem;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            position: relative;
            transform: rotate(-2deg);
            margin: 10px;
            box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
        }

        .bucket-item {
            display: flex;
            justify-content: space-between;
            padding: 10px;
            background: rgba(255, 255, 255, 0.05);
            margin-bottom: 5px;
            border-radius: 5px;
        }

        /* --- BACKGROUND --- */
        #flower-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            pointer-events: none;
        }

        .hidden {
            display: none !important;
        }

        /* =========================================
           CINEMA ROOM STYLES (PHASE 1)
           ========================================= */
        .cinema-container {
            position: relative;
            display: flex;
            flex-direction: row;
            width: 100%;
            height: 60vh;
            /* الطول بيتظبط حسب حجم الشاشة */
            min-height: 400px;
            background: #000;
            border-radius: 15px;
            overflow: hidden;
            border: 1px solid var(--glass-border);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        }

        .cinema-screen {
            flex: 1;
            /* بياخد كل المساحة الفاضية */
            display: flex;
            align-items: center;
            justify-content: center;
            background: #0a0a0a;
            position: relative;
        }

        .cinema-screen video {
            width: 100%;
            height: 100%;
            object-fit: contain;
            /* عشان الفيلم ميتعملوش زووم ويتقص */
            z-index: 2;
        }

        /* الشات الشفاف اللي على الجنب */
        .cinema-chat {
            width: 320px;
            /* عرض الشات على اللاب توب */
            background: rgba(20, 0, 10, 0.4);
            /* لون شفاف */
            backdrop-filter: blur(15px);
            /* تأثير الإزاز */
            -webkit-backdrop-filter: blur(15px);
            border-left: 1px solid var(--glass-border);
            display: flex;
            flex-direction: column;
            z-index: 3;
        }

        .cinema-chat-header {
            padding: 15px;
            background: rgba(255, 0, 85, 0.2);
            border-bottom: 1px solid var(--glass-border);
            color: white;
            font-weight: bold;
            text-align: center;
        }

        .cinema-chat-messages {
            flex: 1;
            padding: 15px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .cinema-input-area {
            padding: 10px;
            border-top: 1px solid var(--glass-border);
            display: flex;
            gap: 5px;
        }

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

        /* تظبيط الموبايل (الشات هينزل تحت الشاشة) */
        @media (max-width: 768px) {
            .cinema-container {
                flex-direction: column;
                height: auto;
            }

            .cinema-screen {
                height: 35vh;
                min-height: 250px;
            }

            .cinema-chat {
                width: 100%;
                height: 40vh;
                border-left: none;
                border-top: 1px solid var(--glass-border);
            }
        }

        /* =========================================
           WATCH2GETHER CLONE LAYOUT (THE WAR ROOM)
           ========================================= */
        .w2g-layout {
            display: grid;
            grid-template-columns: 7fr 3fr;
            /* 70% فيديو، 30% شات */
            gap: 20px;
            width: 100%;
            height: 70vh;
            min-height: 500px;
        }

        .w2g-left {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .w2g-video-wrapper {
            flex: 1;
            background: #000;
            border-radius: 15px;
            position: relative;
            overflow: hidden;
            border: 1px solid var(--glass-border);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        }

        /* شريط التواجد تحت الفيديو */
        .w2g-presence-bar {
            height: 70px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            display: flex;
            align-items: center;
            padding: 0 20px;
            gap: 20px;
            border: 1px solid var(--glass-border);
        }

        .user-avatar {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(0, 0, 0, 0.4);
            padding: 5px 20px 5px 5px;
            border-radius: 40px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .avatar-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: bold;
            font-size: 1.2rem;
            color: white;
        }

        /* اللمبة (أحمر يعني أوفلاين، أخضر يعني أونلاين) */
        .status-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #ff4444;
            box-shadow: 0 0 10px #ff4444;
            transition: 0.3s;
        }

        .status-dot.online {
            background: #00ff88;
            box-shadow: 0 0 15px #00ff88;
        }

        .w2g-right {
            display: flex;
            flex-direction: column;
            background: rgba(20, 0, 10, 0.4);
            backdrop-filter: blur(15px);
            border-radius: 15px;
            border: 1px solid var(--glass-border);
            overflow: hidden;
        }

        /* دوران بالعرض بدون Auto-Rotate (CSS) */
        body.cinema-landscape-active {
            overflow: hidden;
        }

        .w2g-layout.cinema-force-landscape {
            position: fixed !important;
            top: 50% !important;
            left: 50% !important;
            width: 100vh !important;
            height: 100vw !important;
            max-width: none !important;
            min-height: 0 !important;
            transform: translate(-50%, -50%) rotate(90deg) !important;
            transform-origin: center center !important;
            z-index: 99999 !important;
            background: #000 !important;
            margin: 0 !important;
            padding: 0 !important;
            gap: 10px !important;
        }

        .w2g-layout.cinema-force-landscape .w2g-video-wrapper {
            flex: 1;
            min-height: 0;
        }

        .w2g-layout:fullscreen.cinema-force-landscape {
            width: 100vh !important;
            height: 100vw !important;
            transform: translate(-50%, -50%) rotate(90deg) !important;
            top: 50% !important;
            left: 50% !important;
            position: fixed !important;
        }

        @media (orientation: landscape) {
            .w2g-layout.cinema-force-landscape {
                width: 100vw !important;
                height: 100vh !important;
                transform: translate(-50%, -50%) rotate(0deg) !important;
            }
        }

        /* Fullscreen styles for Cinema Room */
        .w2g-layout:fullscreen {
            display: flex;
            width: 100vw;
            height: 100vh;
            background: #000;
            padding: 0;
            margin: 0;
            gap: 0;
        }

        .w2g-layout:fullscreen .w2g-left {
            flex: 1;
            height: 100%;
        }

        .w2g-layout:fullscreen .w2g-video-wrapper {
            height: 100%;
            border-radius: 0;
            border: none;
        }

        .w2g-layout:fullscreen .w2g-presence-bar {
            position: absolute;
            bottom: 20px;
            left: 20px;
            z-index: 10;
            background: rgba(0, 0, 0, 0.6);
            border: none;
        }

        .w2g-layout:fullscreen .w2g-right {
            position: absolute;
            top: auto;
            bottom: 0;
            right: 0;
            width: 320px;
            max-width: 35vw;
            height: auto;
            background: transparent;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border-radius: 0;
            border: none;
            z-index: 10;
            pointer-events: none;
        }

        .w2g-layout:fullscreen .cinema-chat-messages {
            max-height: 280px; /* Restricts height to show approx 3-4 messages */
        }

        .w2g-right.hidden-chat {
            display: none !important;
        }

        .w2g-layout:fullscreen .w2g-right>div {
            pointer-events: auto;
            /* Re-enable clicks for chat elements */
        }

        .w2g-layout:fullscreen .w2g-right>div:first-child {
            display: none;
        }

        .w2g-layout:fullscreen .w2g-right>div:last-child {
            background: transparent !important;
            border: none !important;
        }

        /* تظبيط الموبايل عشان ينزلوا تحت بعض */
        @media (max-width: 900px) {
            .w2g-layout {
                grid-template-columns: 1fr;
                height: auto;
            }

            .w2g-video-wrapper {
                height: 40vh;
                min-height: 250px;
            }

            .w2g-right {
                height: 50vh;
            }

            .w2g-presence-bar {
                flex-wrap: wrap;
                justify-content: center;
            }
        }

        /* =========================================
           TIC-TAC-TOE (XO) CSS
           ========================================= */
        .tictactoe-board {
            display: grid;
            grid-template-columns: repeat(3, 100px);
            gap: 10px;
            justify-content: center;
            margin: 20px auto;
        }

        .xo-cell {
            width: 100px;
            height: 100px;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid var(--primary);
            border-radius: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 4rem;
            cursor: pointer;
            transition: 0.3s;
            color: white;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
            text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
        }

        .xo-cell:hover {
            background: rgba(255, 0, 85, 0.2);
            transform: scale(1.05);
        }

        .game-status {
            font-size: 1.5rem;
            color: var(--gold);
            margin-bottom: 10px;
            font-weight: bold;
        }

        /* تصغير حجم اللمبة في غرفة الألعاب */
        .mini-dot {
            width: 8px !important;
            height: 8px !important;
        }

        /* =========================================
           GAME SELECTION MENU CSS
           ========================================= */
        .game-menu-grid {
            display: flex;
            gap: 20px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 20px;
        }

        .game-card {
            background: rgba(0, 0, 0, 0.4);
            border: 1px solid var(--glass-border);
            border-radius: 15px;
            overflow: hidden;
            width: 250px;
            cursor: pointer;
            transition: 0.3s;
            text-align: center;
        }

        .game-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 10px 30px rgba(255, 0, 85, 0.5);
            border-color: var(--primary);
        }

        .game-card img {
            width: 100%;
            height: 150px;
            object-fit: cover;
            border-bottom: 1px solid var(--glass-border);
        }

        .game-card h3 {
            padding: 15px;
            color: white;
            font-size: 1.2rem;
            margin: 0;
            font-family: 'Poppins', sans-serif;
            font-weight: 600;
        }

        /* =========================================
           SURVIVAL GAME CSS
           ========================================= */
        #survival-game {
            display: none;
            width: 100%;
            max-width: 600px;
            margin: 0 auto;
            text-align: center;
            position: relative;
        }

        .threat-container {
            position: relative;
            width: 100%;
            height: 250px;
            border-radius: 15px;
            overflow: hidden;
            border: 2px solid #ff4444;
            box-shadow: 0 0 30px rgba(255, 68, 68, 0.5);
            margin-bottom: 20px;
            background: #000;
        }

        .threat-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0.8;
            transition: 0.5s;
        }

        .threat-timer {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 4rem;
            font-weight: bold;
            color: #fff;
            text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
            font-family: monospace;
            z-index: 10;
        }

        .survival-panel {
            background: rgba(255, 255, 255, 0.05);
            padding: 20px;
            border-radius: 15px;
            border: 1px solid var(--glass-border);
            margin-bottom: 20px;
        }

        .mistakes-dots {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-top: 10px;
        }

        .mistake-dot {
            width: 15px;
            height: 15px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid #fff;
        }

        .mistake-dot.filled {
            background: #ff4444;
            box-shadow: 0 0 10px #ff4444;
            border-color: #ff4444;
        }

        #penalty-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(150, 0, 0, 0.95);
            z-index: 9999;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            padding: 20px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.5s ease;
            backdrop-filter: blur(10px);
        }

        #penalty-screen.active {
            opacity: 1;
            pointer-events: auto;
        }

        .penalty-heart {
            font-size: 100px;
            animation: beat 1s infinite alternate;
            margin-bottom: 20px;
            text-shadow: 0 0 30px #ff0000;
        }

        .pulse-red {
            animation: pulse-red 1s infinite alternate;
        }

        @keyframes pulse-red {
            from {
                box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
            }

            to {
                box-shadow: 0 0 30px rgba(255, 0, 0, 1);
                font-size: 120px;
            }
        }
           
        /* =========================================
           MINEFIELD TRUST GAME CSS
           ========================================= */
        #minefield-game {
            display: none;
            width: 100%;
            max-width: 600px;
            margin: 0 auto;
            text-align: center;
        }

        .minefield-board {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 5px;
            width: 100%;
            max-width: 400px;
            margin: 20px auto;
            aspect-ratio: 1/1;
            background: rgba(255, 255, 255, 0.05);
            padding: 10px;
            border-radius: 15px;
            border: 2px solid var(--primary);
            box-shadow: 0 0 20px rgba(255, 0, 85, 0.3);
        }

        .mine-cell {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            transition: 0.3s;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .mine-cell.fog {
            background: rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(5px);
        }

        .mine-cell.walker {
            background: rgba(255, 0, 85, 0.5);
            box-shadow: 0 0 15px var(--primary);
            animation: pulse 1.5s infinite alternate;
        }

        .mine-cell.goal {
            background: rgba(255, 215, 0, 0.3);
            box-shadow: 0 0 15px var(--gold);
        }

        .mine-cell.mine-visible {
            background: rgba(255, 68, 68, 0.3);
            border-color: #ff4444;
        }

        .mine-cell.exploded {
            background: #ff0000;
            box-shadow: 0 0 30px #ff0000;
            animation: explode-anim 0.5s;
        }

        @keyframes explode-anim {
            0% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.5);
                background: #fff;
            }

            100% {
                transform: scale(1);
            }
        }

        @keyframes shake-board {
            0% {
                transform: translate(1px, 1px) rotate(0deg);
            }

            10% {
                transform: translate(-1px, -2px) rotate(-1deg);
            }

            20% {
                transform: translate(-3px, 0px) rotate(1deg);
            }

            30% {
                transform: translate(3px, 2px) rotate(0deg);
            }

            40% {
                transform: translate(1px, -1px) rotate(1deg);
            }

            50% {
                transform: translate(-1px, 2px) rotate(-1deg);
            }

            60% {
                transform: translate(-3px, 1px) rotate(0deg);
            }

            70% {
                transform: translate(3px, 1px) rotate(-1deg);
            }

            80% {
                transform: translate(-1px, -1px) rotate(1deg);
            }

            90% {
                transform: translate(1px, 2px) rotate(0deg);
            }

            100% {
                transform: translate(1px, -2px) rotate(-1deg);
            }
        }

        .shaking {
            animation: shake-board 0.5s;
            animation-iteration-count: infinite;
            border-color: #ff0000 !important;
        }

        .d-pad {
            display: grid;
            grid-template-columns: 60px 60px 60px;
            grid-template-rows: 60px 60px 60px;
            gap: 10px;
            justify-content: center;
            margin: 20px auto;
        }

        .d-btn {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid var(--primary);
            border-radius: 10px;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            transition: 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .d-btn:active {
            background: var(--primary);
            transform: scale(0.9);
        }

        .d-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: #333;
            border-color: #555;
        }

        .up-btn {
            grid-column: 2;
            grid-row: 1;
        }

        .left-btn {
            grid-column: 1;
            grid-row: 2;
        }

        .down-btn {
            grid-column: 2;
            grid-row: 2;
        }

        .right-btn {
            grid-column: 3;
            grid-row: 2;
        }

        .settings-modal {
            display: none;
            position: fixed;
            top: 75px;
            /* عشان تنزل تحت زرار الترس مباشرة */
            right: 20px;
            /* عشان تلزق في اليمين زي الزرار */
            /* مسحنا أوامر التمركز بتاعة نص الشاشة */
            width: 90%;
            max-width: 350px;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(15px);
            border: 1px solid var(--primary);
            border-radius: 15px;
            border-top-right-radius: 2px;
            /* حركة ديزاين صايعة تخليها كأنها طالعة من الزرار */
            z-index: 10000;
            padding: 20px;
            color: white;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
        }

        .settings-modal.active {
            display: block;
            animation: fadeIn 0.3s;
        }

        .settings-group {
            margin-bottom: 15px;
            text-align: left;
        }

        .settings-group label {
            display: block;
            margin-bottom: 5px;
            color: var(--gold);
            font-size: 0.9rem;
        }

        .settings-input {
            width: 100%;
            padding: 10px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 5px;
            color: white;
            margin-bottom: 5px;
        }

        /* =========================================
           WHATSAPP CHAT STYLES (STUDY ROOM)
           ========================================= */
        .wa-chat-container {
            background-color: #efeae2;
            background-image: url("https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png");
            background-repeat: repeat;
        }

        .wa-msg-user {
            background-color: #d9fdd3;
            color: #111;
            align-self: flex-end;
            border-radius: 10px 10px 0 10px;
            box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
            padding: 8px 12px;
            max-width: 80%;
            display: flex;
            flex-direction: column;
        }

        .wa-msg-bot {
            background-color: #ffffff;
            color: #111;
            align-self: flex-start;
            border-radius: 10px 10px 10px 0;
            box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
            border-left: none;
            padding: 8px 12px;
            max-width: 80%;
            display: flex;
            flex-direction: column;
        }

        .wa-msg-text {
            font-size: 0.9rem;
            margin-bottom: 2px;
        }

        .wa-msg-time {
            font-size: 0.65rem;
            color: #667781;
            text-align: right;
        }

        .wa-sender {
            font-size: 0.75rem;
            color: #128c7e;
            font-weight: bold;
            margin-bottom: 2px;
        }

        /* =========================================
           STUDY PREMIUM FEATURES
           ========================================= */
        .study-task-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(255, 255, 255, 0.1);
            padding: 10px;
            margin-bottom: 8px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: 0.3s;
            color: white;
        }

        .study-task-item.completed {
            opacity: 0.6;
            background: rgba(0, 255, 136, 0.1);
            border-color: #00ff88;
            text-decoration: line-through;
        }

        .study-task-checkbox {
            width: 20px;
            height: 20px;
            cursor: pointer;
            accent-color: #FFD700;
            margin-right: 10px;
        }

        .btn-save {
            background: var(--primary);
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 0.8rem;
        }

        /* =========================================
           UNIVERSE VAULT (POLAROID & CINEMA ARCHITECTURE)
           ========================================= */
        /* 1. هيكل البولارويد المصغر الرومانسي (Mini Corkboard) */
        #gallery-grid, #full-gallery-grid {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 12px;
            padding: 10px;
        }

        .polaroid-item {
            width: calc(50% - 12px); /* صورتين بالظبط في الصف */
            max-width: 150px;
            /* تغيير الإطار الأبيض للون عاجي بلمسة روز دافئة ومشعة */
            background: linear-gradient(135deg, #fffaff 0%, #fff0f3 100%); 
            padding: 4px 4px 24px 4px; /* تقليل حجم الإطار الأبيض العريض جداً */
            border-radius: 4px;
            box-shadow: 0 4px 15px rgba(255, 0, 64, 0.15), 3px 5px 12px rgba(0,0,0,0.4);
            margin-bottom: 10px;
            position: relative;
            transform: rotate(-2deg);
            transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            flex: 0 0 auto;
        }
        .polaroid-item:nth-child(even) { transform: rotate(3deg); }
        .polaroid-item:hover { transform: scale(1.15) rotate(0deg); z-index: 20; box-shadow: 0 10px 25px rgba(255,0,85,0.4); }
        
        /* جعل الصورة تأخذ مساحة أكبر ومريحة */
        .polaroid-item img { width: 100%; height: 140px; object-fit: cover; border-radius: 2px; display: block; cursor: pointer; }
        
        .polaroid-controls {
            position: absolute; bottom: 4px; left: 0; width: 100%;
            display: flex; justify-content: space-around; padding: 0 5px;
            opacity: 0; transition: 0.3s;
        }
        .polaroid-item:hover .polaroid-controls { opacity: 1; }
        .polaroid-controls .icon-btn { font-size: 0.8rem; padding: 2px; color: #888; }

        /* شاشة العرض الكاملة الرومانسية (Blur Lightbox) */
        .lightbox-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            z-index: 7000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease;
        }
        .lightbox-overlay.active {
            opacity: 1;
            pointer-events: auto;
            z-index: 10050;
        }
        .lightbox-overlay img {
            max-width: 95%;
            max-height: 85vh;
            object-fit: contain;
            border-radius: 10px;
            box-shadow: 0 0 35px rgba(255, 0, 64, 0.4);
            transform: scale(0.92);
            transition: transform 0.4s ease;
            cursor: default;
        }
        .lightbox-overlay.active img {
            transform: scale(1);
        }
        .lightbox-close-btn {
            position: absolute;
            top: 18px;
            right: 18px;
            z-index: 2;
            font-family: 'Poppins', sans-serif;
            font-size: 0.85rem;
            padding: 10px 18px;
            border-radius: 999px;
            cursor: pointer;
            color: #ffcccc;
            background: rgba(255, 0, 64, 0.2);
            border: 1px solid rgba(255, 77, 121, 0.5);
        }

        /* 2. هيكل شريط السينما (للفيديوهات) */
        #video-grid {
            display: flex;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            gap: 20px;
            padding-bottom: 20px;
            -webkit-overflow-scrolling: touch;
        }

        #video-grid::-webkit-scrollbar {
            height: 6px;
        }

        #video-grid::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 10px;
        }

        .video-card {
            flex: 0 0 85%;
            scroll-snap-align: center;
            position: relative;
            border-radius: 16px;
            background: rgba(10, 5, 8, 0.6);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.05);
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            display: flex;
            flex-direction: column;
        }

        .video-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(255, 0, 85, 0.25);
            border-color: var(--primary);
        }

        .video-progress-border {
            position: absolute;
            inset: 0;
            border-radius: 16px;
            padding: 3px;
            background: conic-gradient(from 0deg, var(--primary) var(--progress, 0%), transparent var(--progress, 0%));
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
            z-index: 10;
            transition: background 0.1s linear;
        }

        .video-frame {
            position: relative;
            width: 100%;
            height: auto;
            border-radius: 14px;
            overflow: hidden;
            display: flex;
            background: #000;
        }

        .custom-video {
            width: 100%;
            height: auto;
            max-height: 60vh;
            object-fit: contain;
            display: block;
            cursor: pointer;
        }

        .video-play-btn {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3.5rem;
            color: rgba(255, 255, 255, 0.85);
            text-shadow: 0 0 20px var(--primary);
            pointer-events: none;
            transition: opacity 0.3s ease, transform 0.3s ease;
            z-index: 5;
        }

        .video-play-btn.playing {
            opacity: 0;
            transform: scale(1.5);
        }

        .video-actions {
            position: absolute;
            top: 15px;
            right: 15px;
            display: flex;
            gap: 12px;
            opacity: 0;
            transition: opacity 0.3s ease, transform 0.3s ease;
            background: rgba(20, 5, 10, 0.6);
            padding: 8px 12px;
            border-radius: 20px;
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            transform: translateY(-10px);
            z-index: 20;
        }

        .video-card:hover .video-actions {
            opacity: 1;
            transform: translateY(0);
        }

        /* 3. تفاعل نبض القلب */
        .heart-btn {
            color: #ccc;
            text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
        }

        .heart-btn.active {
            color: #ff0055;
            animation: beat 0.4s alternate;
            text-shadow: 0 0 15px #ff0055;
        }

        .polaroid-controls .btn-del {
            color: #ccc;
        }

        .polaroid-controls .btn-del:hover {
            color: #ff0000;
        }
        /* درع إخفاء الغرفة السرية */
        .hidden-vault {
            display: none !important;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 10001;
            overflow: hidden;
            pointer-events: none;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.45s ease, visibility 0.45s ease;
        }
        .hidden-vault.active-vault {
            display: block !important;
            pointer-events: auto;
            opacity: 1;
            visibility: visible;
        }

        .gallery-vault-backdrop {
            position: fixed;
            inset: 0;
            z-index: 10000;
            background: rgba(8, 0, 4, 0.55);
            backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.45s ease, visibility 0.45s ease;
        }
        .gallery-vault-backdrop.active {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }
        body.gallery-vault-open {
            overflow: hidden;
        }
        body.gallery-vault-open #app-content {
            filter: blur(14px) brightness(0.45);
            pointer-events: none;
            user-select: none;
        }

        .romantic-gallery-vault {
            background: radial-gradient(ellipse at 50% 0%, rgba(120, 0, 40, 0.35) 0%, transparent 55%),
                linear-gradient(180deg, #120408 0%, #050203 45%, #0a0406 100%);
        }
        .romantic-gallery-vault-inner {
            height: 100%;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 20px 20px 100px;
            -webkit-overflow-scrolling: touch;
        }
        .romantic-gallery-header {
            text-align: center;
            padding: 10px 10px 28px;
            position: relative;
        }
        .romantic-gallery-back {
            position: absolute;
            left: 0;
            top: 8px;
            font-family: 'Poppins', sans-serif;
            font-size: 0.85rem;
            padding: 10px 18px;
            border-radius: 999px;
            cursor: pointer;
            color: #ffcccc;
            background: rgba(255, 0, 64, 0.15);
            border: 1px solid rgba(255, 77, 121, 0.45);
            box-shadow: 0 0 20px rgba(255, 0, 64, 0.2);
            transition: 0.25s ease;
        }
        .romantic-gallery-back:hover {
            background: rgba(255, 0, 64, 0.35);
            color: #fff;
            transform: scale(1.03);
        }
        .romantic-gallery-title {
            font-family: 'Great Vibes', cursive;
            font-size: clamp(2.5rem, 8vw, 4.2rem);
            color: #ff4d79;
            text-shadow: 0 0 30px rgba(255, 0, 64, 0.5);
            margin: 36px 0 8px;
            line-height: 1.1;
        }
        .romantic-gallery-tagline {
            font-family: 'Poppins', sans-serif;
            font-size: 1rem;
            color: #ffb3c6;
            max-width: 520px;
            margin: 0 auto 8px;
            line-height: 1.6;
        }
        .romantic-gallery-whisper {
            font-size: 0.8rem;
            color: rgba(255, 180, 200, 0.65);
            font-style: italic;
            letter-spacing: 0.5px;
        }
        .romantic-gallery-grid,
        #full-gallery-grid.romantic-gallery-grid {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 18px;
            padding: 10px 8px 40px;
            max-width: 1200px;
            margin: 0 auto;
        }
        .romantic-gallery-vault .polaroid-item {
            width: calc(33.333% - 14px);
            max-width: 200px;
        }
        @media (max-width: 768px) {
            .romantic-gallery-vault .polaroid-item {
                width: calc(50% - 12px);
                max-width: 170px;
            }
        }
        .romantic-gallery-empty {
            text-align: center;
            color: #ff8fab;
            font-size: 1.05rem;
            padding: 40px 20px;
            font-style: italic;
        }
        /* =========================================
   OFFLINE SCREEN PREMIUM STYLES (Task 1)
   ========================================= */
.offline-screen {
    position: fixed;
    inset: 0; /* بتاخد الشاشة كلها بالمللي */
    background: rgba(15, 0, 8, 0.85); /* روز داكن جداً رومانسي */
    backdrop-filter: blur(20px); /* تأثير التغبيش الفخم */
    -webkit-backdrop-filter: blur(20px);
    z-index: 100000; /* أعلى z-index في الموقع عشان يغطي على أي مودال أو ألعاب */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none; /* طول ما النت شغال الشاشة شفافة ومبتمنعش الكليكات */
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.offline-screen.active {
    opacity: 1;
    pointer-events: auto; /* تقفل الموقع تماماً وتحمي الداتا لو النت فصل */
}

.offline-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 50px 40px;
    border-radius: 30px;
    border: 1px solid rgba(255, 0, 64, 0.3);
    box-shadow: 0 0 40px rgba(255, 0, 64, 0.2);
    max-width: 400px;
    width: 90%;
}

.offline-title {
    font-family: 'Great Vibes', cursive;
    color: var(--primary);
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(255, 0, 64, 0.4);
}

.offline-text {
    color: #ffcccc;
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.5;
}

.offline-icon {
    font-size: 4.5rem;
    color: var(--primary);
    margin-bottom: 25px;
    animation: heartPulse 1.2s infinite alternate cubic-bezier(0.4, 0, 0.6, 1);
}

.radar-spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 0, 64, 0.1);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spinAround 1s linear infinite;
    margin: 30px auto 0 auto;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

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

@keyframes heartPulse {
    from { transform: scale(1); text-shadow: 0 0 10px var(--primary); }
    to { transform: scale(1.15); text-shadow: 0 0 25px var(--primary); }
}

/* =========================================
   ROMANTIC NOTIFY (Shared Core UI)
   ========================================= */
.romantic-toast-root {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.romantic-toast-root.active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.romantic-toast-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(80, 0, 20, 0.45) 0%, rgba(5, 0, 2, 0.92) 70%);
    backdrop-filter: blur(12px);
}

.romantic-toast-root.romantic-toast-no-blur .romantic-toast-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.romantic-toast-card {
    position: relative;
    z-index: 2;
    max-width: 420px;
    width: 100%;
    padding: 28px 26px 22px;
    border-radius: 24px;
    border: 1px solid rgba(255, 0, 64, 0.35);
    background: linear-gradient(145deg, rgba(26, 8, 12, 0.98) 0%, rgba(8, 4, 6, 0.99) 55%, rgba(12, 6, 8, 0.98) 100%);
    box-shadow: 0 0 60px rgba(255, 0, 64, 0.25), 0 24px 80px rgba(0, 0, 0, 0.75);
    text-align: center;
    transform: scale(0.88) translateY(12px);
    transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.romantic-toast-root.active .romantic-toast-card {
    transform: scale(1) translateY(0);
}

.romantic-toast-glow {
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(255, 0, 64, 0.2), transparent 40%, rgba(255, 215, 0, 0.08));
    pointer-events: none;
    z-index: -1;
}

.romantic-toast-hearts {
    font-size: 1.1rem;
    letter-spacing: 6px;
    margin-bottom: 12px;
    opacity: 0.9;
    animation: heartPulse 1.8s ease-in-out infinite alternate;
}

.romantic-toast-title {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    font-weight: 400;
    color: #ff4d79;
    margin-bottom: 12px;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(255, 0, 64, 0.4);
}

.romantic-toast-message {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #ffcccc;
    white-space: pre-line;
    margin-bottom: 22px;
}

.romantic-toast-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.romantic-toast-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    padding: 12px 22px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.25s ease;
    border: none;
}

.romantic-toast-btn-primary {
    background: linear-gradient(135deg, #ff0040 0%, #8b0020 100%);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.45);
}

.romantic-toast-btn-primary:hover {
    transform: scale(1.04);
    box-shadow: 0 0 28px rgba(255, 0, 64, 0.6);
}

.romantic-toast-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: #ffcccc;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.romantic-toast-victory .romantic-toast-title {
    color: var(--gold);
    text-shadow: 0 0 24px rgba(255, 215, 0, 0.5);
}

.romantic-toast-success .romantic-toast-title {
    color: #ff8fab;
}

.romantic-toast-error .romantic-toast-title {
    color: #ff6b6b;
}

.romantic-toast-info .romantic-toast-title {
    color: #ffb3c6;
}

.romantic-toast-confirm .romantic-toast-title {
    color: var(--gold);
}

/* Bucket List Container Overhaul */
#bucket-list {
    max-height: 420px;
    overflow-y: auto;
    background: rgba(15, 2, 7, 0.75) !important;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 0, 85, 0.25);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.9), 0 10px 30px rgba(255, 0, 85, 0.05);
}

#bucket-list::-webkit-scrollbar {
    width: 6px;
}

#bucket-list::-webkit-scrollbar-track {
    background: transparent;
}

#bucket-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--gold) 100%);
    border-radius: 10px;
}

.dream-glass-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(25, 5, 12, 0.8), rgba(10, 2, 5, 0.9));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-left: 5px solid var(--primary);
    border-radius: 16px;
    padding: 18px 22px;
    margin-bottom: 15px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.dream-glass-card:hover {
    background: linear-gradient(135deg, rgba(255, 0, 64, 0.15), rgba(255, 215, 0, 0.05));
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 8px 25px rgba(255, 0, 85, 0.25), inset 0 0 15px rgba(255, 215, 0, 0.1);
    transform: scale(1.02) translateX(5px);
}

.dream-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.dream-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.3px;
}

.dream-meta {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    color: #ff99bb;
    opacity: 0.8;
    font-style: italic;
    letter-spacing: 0.5px;
}

.dream-actions {
    display: flex;
    gap: 14px;
    align-items: center;
}

.star-btn {
    color: var(--gold);
    font-size: 1.3rem;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    transition: transform 0.3s ease;
}

.star-btn:hover {
    transform: scale(1.3) rotate(15deg);
    color: #fff;
    text-shadow: 0 0 25px var(--gold), 0 0 10px var(--gold);
}

.dream-actions .btn-del {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.1rem;
}

.dream-actions .btn-del:hover {
    color: #ff4444;
    text-shadow: 0 0 15px #ff4444;
    transform: scale(1.15);
}

/* Dream Details Modal Container */
.dream-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 2, 6, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.dream-details-content {
    background: linear-gradient(135deg, rgba(30, 5, 15, 0.85), rgba(15, 2, 5, 0.95));
    border: 1px solid rgba(255, 0, 85, 0.3);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(255, 0, 85, 0.1);
    transform: translateY(0);
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal-btn:hover { color: #ff4444; }

.dream-details-title {
    font-family: 'Poppins', sans-serif;
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 2px 10px rgba(255, 0, 85, 0.5);
}

.dream-main-target { margin-bottom: 25px; text-align: center; }

.dream-details-label {
    display: block;
    color: #ff99bb;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-style: italic;
}

.dream-target-input, #sub-dream-date-in, .sub-edit-date {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 10px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    outline: none;
    text-align: center;
}

.dream-target-input { width: 100%; font-size: 1.1rem; }

/* Fix for calendar icon in input type month in webkit */
.dream-target-input::-webkit-calendar-picker-indicator,
#sub-dream-date-in::-webkit-calendar-picker-indicator,
.sub-edit-date::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Sub Dreams Section */
.sub-dreams-section {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 0, 85, 0.2);
    padding-top: 20px;
    margin-bottom: 20px;
}

.sub-dreams-title {
    color: var(--gold);
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.sub-dream-add-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#sub-dream-text-in {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}

.sub-dream-add-btn {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 8px;
    padding: 0 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.sub-dream-add-btn:hover {
    background: var(--gold);
    color: #000;
}

.sub-dreams-list {
    overflow-y: auto;
    padding-right: 5px;
    max-height: 300px;
}

.sub-dreams-list::-webkit-scrollbar { width: 4px; }
.sub-dreams-list::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

.sub-task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.sub-task-item.completed {
    opacity: 0.6;
    border-left-color: #4cd137;
    background: rgba(76, 209, 55, 0.05);
}

.sub-task-item.completed .sub-task-text { text-decoration: line-through; }

.sub-task-core { display: flex; align-items: center; gap: 12px; }

.sub-task-check { accent-color: var(--gold); transform: scale(1.3); cursor: pointer; }

.sub-task-info { display: flex; flex-direction: column; }

.sub-task-text { color: #fff; font-family: 'Poppins', sans-serif; font-size: 0.95rem; }

.sub-task-meta { color: #888; font-size: 0.7rem; font-style: italic; margin-top: 3px; }

.sub-task-actions { display: flex; gap: 8px; }

.sub-edit-btn, .sub-del-btn { background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.4); }
.sub-edit-btn:hover { color: var(--gold); }
.sub-del-btn:hover { color: #ff4444; }

.sub-edit-mode {
    display: flex; gap: 8px; width: 100%;
}
.sub-edit-input { flex-grow: 1; border-radius: 5px; background: rgba(0,0,0,0.5); border: 1px solid var(--gold); color:#fff; padding: 5px; }
.sub-save-btn, .sub-cancel-btn { border-radius: 5px; cursor: pointer; border:none; padding: 5px 10px; }
.sub-save-btn { background: var(--gold); color: #000; }
.sub-cancel-btn { background: rgba(255,255,255,0.1); color: #fff; }

.dream-save-btn {
    background: linear-gradient(135deg, #ff0040, #8b0020);
    color: #fff;
    border: none;
    padding: 14px 25px;
    border-radius: 99px;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.4);
    width: 100%;
    margin-top: 15px;
}

.dream-save-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(255, 0, 64, 0.6);
}

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

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

/* Phase 3: Celebration Modes */
body.celebration-dark-mode {
    filter: brightness(0.2) contrast(1.2);
    transition: filter 0.5s ease-in-out;
}

.dream-glass-card.achieved {
    background: linear-gradient(135deg, rgba(40, 30, 0, 0.8), rgba(20, 5, 10, 0.9));
    border-left: 5px solid var(--gold);
    border-color: rgba(255, 215, 0, 0.3);
    opacity: 0.85;
}

.dream-glass-card.achieved .dream-text {
    color: var(--gold);
}

/* Phase 4: Golden Gallery Frame */
.polaroid-item.gold-dream-frame {
    background: linear-gradient(135deg, #2a111a 0%, #1a050a 100%) !important;
    border: 2px solid var(--gold) !important;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 15px rgba(255, 215, 0, 0.2) !important;
}

.dream-badge-tag {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    text-align: center;
    padding: 10px 5px 5px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
/* =========================================
   ANDROID-STYLE PUSH NOTIFICATION
   ========================================= */
.system-push-notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(20, 5, 10, 0.95);
    border: 1px solid var(--primary);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999999;
    transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.system-push-notification.show { top: 20px; }

.push-icon { color: var(--primary); font-size: 1.5rem; }
.push-title { font-weight: bold; font-size: 0.9rem; color: #fff; }
.push-body { font-size: 0.8rem; color: #ffcccc; margin-top: 2px; }

/* =========================================
   HUB CARDS (LOBBY)
   ========================================= */
.hub-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 40px;
    width: 300px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.hub-card:hover {
    transform: scale(1.05);
}
.yt-hub-card {
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
    border: 1px solid rgba(255, 0, 0, 0.5);
}
.yt-hub-card:hover {
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
}
.sb-hub-card {
    box-shadow: 0 0 15px rgba(0, 238, 255, 0.3);
    border: 1px solid rgba(0, 238, 255, 0.5);
}
.sb-hub-card:hover {
    box-shadow: 0 0 30px rgba(0, 238, 255, 0.6);
}
.sb-hub-card .fas.fa-globe {
    color: #00eeff;
    text-shadow: 0 0 20px rgba(0, 238, 255, 0.5);
}