:root {
            --text-color: #1a1a1a;
            --text-shadow: none;
            --glass-bg: rgba(255, 255, 255, 0.7);
            --glass-blur: blur(10px);
            --glass-border: 1px solid rgba(0, 0, 0, 0.1);
            --primary-color: #007aff;
            --bg-image: none;
            --bg-color: #f0f2f5;
            --focus-font: 'Inter', sans-serif;
        }
        
        /* Sunny Day Theme (Default) */
        body.theme-sunny {
            --text-color: #2c3e50;
            --text-shadow: none;
            --glass-bg: rgba(255, 255, 255, 0.6);
            --glass-blur: blur(8px);
            --glass-border: 1px solid rgba(0, 0, 0, 0.05);
            --primary-color: #f39c12;
            --bg-image: none;
            --bg-color: #87CEEB;
            --focus-font: 'Inter', sans-serif;
        }
        
        /* Sunny Day Dark Mode */
        body.theme-sunny-dark {
            --text-color: #e0e0e0;
            --text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
            --glass-bg: rgba(20, 20, 30, 0.7);
            --glass-blur: blur(5px);
            --glass-border: 1px solid rgba(255, 100, 100, 0.2);
            --primary-color: #e74c3c;
            --bg-image: linear-gradient(to bottom, #000000, #2c1a2b, #4a1a3a);
            --bg-color: #121212;
            --focus-font: 'Nosifier', sans-serif;
        }
        
        /* Cyberpunk City Theme */
        body.theme-cyberpunk {
            --text-color: #00ffff;
            --text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff;
            --glass-bg: rgba(10, 20, 40, 0.5);
            --glass-blur: blur(4px);
            --glass-border: 1px solid rgba(0, 255, 255, 0.3);
            --primary-color: #ff00ff;
            --bg-image: none;
            --bg-color: #0a0a1a;
            --focus-font: 'Roboto Mono', monospace;
        }

        /* Minimal Theme */
        body.theme-minimal {
            --text-color: #000000;
            --text-shadow: none;
            --glass-bg: rgba(255, 255, 255, 1);
            --glass-blur: none;
            --glass-border: 1px solid #e0e0e0;
            --primary-color: #000000;
            --bg-image: none;
            --bg-color: #ffffff;
            --focus-font: 'Inter', sans-serif;
        }

        /* Minimal Dark Mode */
        body.theme-minimal-dark {
            --text-color: #ffffff;
            --text-shadow: none;
            --glass-bg: rgba(0, 0, 0, 0.7);
            --glass-blur: none;
            --glass-border: 1px solid #333;
            --primary-color: #ffffff;
            --bg-image: none;
            --bg-color: #1a1a1a;
            --focus-font: 'Inter', sans-serif;
        }

        /* Gamer Day Theme */
        body.theme-gamer {
            --text-color: #00ff00;
            --text-shadow: 0 0 5px #00ff00;
            --glass-bg: rgba(0, 50, 0, 0.7);
            --glass-blur: blur(3px);
            --glass-border: 1px solid #00ff00;
            --primary-color: #ff00ff;
            --bg-image: url('https://4kwallpapers.com/images/walls/thumbs_2t/3950.png');
            --bg-color: #1a1a1a;
            --focus-font: 'Press Start 2P', cursive;
            background-size: cover;
            background-position: center center;
        }

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

        body {
            font-family: 'Inter', sans-serif;
            color: var(--text-color);
            background: var(--bg-color) var(--bg-image);
            background-size: cover;
            background-position: center center;
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            text-shadow: var(--text-shadow);
            transition: background 0.5s ease, color 0.5s ease;
        }
        
        #background-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            display: none; /* Hidden by default */
        }
        
        body.theme-cyberpunk #background-canvas {
            display: block;
        }

        .main-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; position: relative; z-index: 2; }

        /* Search Bar */
        .search-container { width: 100%; max-width: 550px; position: absolute; top: 20px; }
        #search-form { position: relative; }
        #search-input { width: 100%; padding: 15px 20px 15px 50px; border: none; border-radius: 50px; font-size: 1rem; color: var(--text-color); background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: var(--glass-border); outline: none; transition: background-color 0.3s ease, box-shadow 0.3s ease; }
        #search-input::placeholder { color: var(--text-color); opacity: 0.7; }
        .search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-color); opacity: 0.7; }
        
        /* Clock & Greeting */
        #clock-container h1 { font-size: 7rem; font-weight: 600; letter-spacing: -4px; }
        #greeting-container { position: relative; }
        #greeting-container h2 { font-size: 2.5rem; font-weight: 500; margin-top: -10px; }

        /* Focus */
        #focus-container { margin-top: 30px; text-align: center; }
        #focus-container h3 { font-size: 1.2rem; font-weight: 400; }
        .focus-input, .focus-display { font-family: var(--focus-font); }
        .focus-input { background: none; border: none; border-bottom: 2px solid var(--text-color); color: var(--text-color); font-size: 1.5rem; font-weight: 500; text-align: center; width: 100%; max-width: 500px; padding: 5px; outline: none; margin-top: 10px; }
        .focus-display { font-size: 1.5rem; font-weight: 500; margin-top: 10px; display: none; align-items: center; gap: 15px; }
        #focus-display label { cursor: pointer; }
        #focus-checkbox { width: 20px; height: 20px; cursor: pointer; accent-color: var(--primary-color); }
        #focus-checkbox:checked + label { text-decoration: line-through; opacity: 0.6; }
        #edit-focus-btn, #ai-chat-btn { background: none; border: none; color: var(--text-color); cursor: pointer; font-size: 1.2rem; opacity: 0.7; transition: opacity 0.2s, transform 0.2s; }
        #ai-chat-btn { font-size: 1.5rem; }
        #edit-focus-btn:hover, #ai-chat-btn:hover { opacity: 1; transform: scale(1.1); }

        /* Footer */
        .footer { display: flex; justify-content: space-between; align-items: flex-end; padding: 25px 35px; width: 100%; position: relative; z-index: 2;}
        .footer-left, .footer-right { display: flex; align-items: center; gap: 20px; }
        .footer-center { text-align: center; max-width: 600px; position: absolute; left: 50%; transform: translateX(-50%); bottom: 25px; }
        #settings-btn, #dnd-btn, #sound-btn { background: none; border: none; color: var(--text-color); font-size: 1.2rem; cursor: pointer; opacity: 0.7; transition: opacity 0.2s, transform 0.2s; }
        #settings-btn:hover, #dnd-btn:hover, #sound-btn:hover { opacity: 1; }
        #settings-btn:hover { transform: rotate(45deg); }
        #quote-container { font-weight: 500; font-size: 1rem; }
        #quote-author { font-size: 0.9rem; margin-top: 5px; font-style: italic; opacity: 0.8; }
        #weather-container a, #session-time-container { color: var(--text-color); text-decoration: none; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
        
        /* Modals */
        .modal { position: fixed; bottom: 25px; right: 35px; width: 100%; max-width: 400px; background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border-radius: 15px; border: var(--glass-border); display: flex; flex-direction: column; z-index: 1000; transform: translateY(20px) scale(0.95); opacity: 0; pointer-events: none; transition: transform 0.3s ease, opacity 0.3s ease; }
        .modal.visible { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
        .modal-header { padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; }
        body.theme-minimal .modal-header { border-bottom: 1px solid #eee; }
        .modal-header h3 { font-size: 1.2rem; font-weight: 600;}
        .modal-close-btn { background: none; border: none; color: var(--text-color); font-size: 1.5rem; cursor: pointer; opacity: 0.7; }
        .modal-close-btn:hover { opacity: 1; }
        
        /* Chat Modal */
        #chat-modal { height: 500px; }
        .chat-history { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
        .chat-message { padding: 10px 15px; border-radius: 18px; max-width: 80%; line-height: 1.4; font-size: 0.95rem; }
        .chat-message.user { background: var(--primary-color); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
        body.theme-minimal .chat-message.user { color: #fff; }
        .chat-message.ai { background: rgba(120, 120, 120, 0.25); align-self: flex-start; border-bottom-left-radius: 4px; }
        body.theme-minimal .chat-message.ai { background: #f0f0f0; }
        .chat-input-area { display: flex; padding: 15px; border-top: 1px solid rgba(255,255,255,0.1); }
        body.theme-minimal .chat-input-area { border-top: 1px solid #eee; }
        #chat-input { flex: 1; background: none; border: none; color: var(--text-color); font-size: 1rem; outline: none; }
        #chat-send-btn { background: none; border: none; color: var(--text-color); font-size: 1.2rem; cursor: pointer; margin-left: 10px; }
        
        /* Settings Modal */
        #settings-modal { bottom: 95px; }
        .settings-content { padding: 20px; }
        .settings-section { margin-bottom: 20px; }
        .settings-section:last-child { margin-bottom: 0; }
        .settings-section h4 { font-weight: 600; margin-bottom: 10px; opacity: 0.8; }
        .theme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
        .option-btn { padding: 10px; border: 2px solid var(--glass-border); border-radius: 8px; background-color: var(--glass-bg); color: var(--text-color); cursor: pointer; text-align: center; transition: background-color 0.2s, border-color 0.2s; text-decoration: none; }
        .option-btn:hover { border-color: var(--primary-color); }
        .option-btn.active { border-color: var(--primary-color); background-color: var(--primary-color); }
        body.theme-minimal .option-btn.active { color: #fff; }
        .about-link i { margin-left: 8px; font-size: 0.8em; }
        .form-group { margin-bottom: 10px; }
        .form-group label { display: block; margin-bottom: 5px; font-size: 0.9rem; opacity: 0.9; }
        .form-group input { width: 100%; padding: 8px; border-radius: 5px; border: var(--glass-border); background: rgba(0,0,0,0.2); color: var(--text-color); }
        body.theme-minimal .form-group input { background: #f0f0f0; }

        /* Reminder Modal */
        #reminder-modal .modal-header h3 { font-size: 1.5rem; }
        #reminder-modal .modal-content { text-align: center; }
        #reminder-message { font-size: 1.1rem; margin-bottom: 20px; line-height: 1.6; }
        #reminder-ok-btn { background: var(--primary-color); color: var(--text-color); border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 1rem; }
        body.theme-minimal #reminder-ok-btn { color: #fff; }


        /* --- THEME ANIMATIONS --- */
        .animation-container { position: fixed; top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            pointer-events: none; /* Revert to none */
        }
        .anim-item { position: absolute; }
        .anim-item.sun { /* No specific styling here as it's removed */ }
        
        @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
        
        /* Gamer Day Theme */
        body.theme-gamer {
            --text-color: #00ff00;
            --text-shadow: 0 0 5px #00ff00;
            --glass-bg: rgba(0, 50, 0, 0.7);
            --glass-blur: blur(3px);
            --glass-border: 1px solid #00ff00;
            --primary-color: #ff00ff;
            --bg-image: url('https://4kwallpapers.com/images/walls/thumbs_2t/3950.png');
            --bg-color: #1a1a1a;
            --focus-font: 'Press Start 2P', cursive;
            background-size: cover;
            background-position: center center;
        }

        #theme-toggle-btn {
            position: absolute;
            top: 20px;
            right: 35px;
            background: none;
            border: none;
            font-size: 2.5rem; /* Larger icon */
            cursor: pointer;
            z-index: 10; /* Ensure it's above other elements */
            color: var(--text-color); /* Use theme's text color */
            transition: transform 0.2s ease-in-out;
        }

        #theme-toggle-btn:hover {
            transform: scale(1.1);
        }