:root {
            --primary: #1a5632;
            --primary-light: #2d8a4e;
            --primary-dark: #0e3a20;
            --accent: #c0392b;
            --gold: #d4a017;
            --gold-light: #f4d03f;
            --bg: #faf8f5;
            --bg-card: #ffffff;
            --text: #2c3e50;
            --text-light: #5d6d7e;
            --border: #e8e0d8;
            --success: #27ae60;
            --warning: #f39c12;
            --shadow: 0 2px 12px rgba(0,0,0,0.08);
            --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
            --radius: 12px;
            --transition: all 0.3s ease;
        }
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Open Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

        /* Loading */
        #loadingOverlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.3); z-index: 99999; justify-content: center; align-items: center; }
        #loadingOverlay .loading-spinner { width: 48px; height: 48px; border: 4px solid #fff; border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* Auth Overlay */
        #authOverlay { display: flex; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, #0e3a20 0%, #1a5632 40%, #2d8a4e 100%); z-index: 9999; justify-content: center; align-items: center; overflow-y: auto; padding: 20px; }
        #authOverlay.auth-fade-out { animation: authFadeOut 0.4s ease forwards; }
        @keyframes authFadeOut { to { opacity: 0; transform: scale(1.02); } }
        .auth-container { background: white; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); width: 100%; max-width: 440px; overflow: hidden; }
        .auth-header { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); padding: 30px; text-align: center; color: white; }
        .auth-header .auth-logo img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.3); }
        .auth-header h2 { margin: 10px 0 0; font-family: 'Merriweather', serif; font-size: 1.3rem; }
        .auth-header p { margin: 5px 0 0; opacity: 0.8; font-size: 0.85rem; }
        .auth-tabs { display: flex; border-bottom: 2px solid var(--border); }
        .auth-tab { flex: 1; padding: 14px; text-align: center; cursor: pointer; font-weight: 600; color: var(--text-light); background: none; border: none; font-size: 0.95rem; transition: var(--transition); }
        .auth-tab.active { color: var(--primary); border-bottom: 3px solid var(--primary); margin-bottom: -2px; }
        .auth-form { padding: 25px 30px; }
        .auth-field { margin-bottom: 16px; }
        .auth-field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
        .auth-field input { width: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: 10px; font-size: 0.95rem; transition: var(--transition); box-sizing: border-box; font-family: 'Open Sans', sans-serif; }
        .auth-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,50,0.1); }
        .auth-submit { width: 100%; padding: 14px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border: none; border-radius: 10px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: var(--transition); font-family: 'Open Sans', sans-serif; }
        .auth-submit:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(26,86,50,0.3); }
        .auth-error { color: var(--accent); font-size: 0.85rem; text-align: center; min-height: 20px; margin-bottom: 10px; font-weight: 600; }

        /* Photo Request */
        #photoRequestOverlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 9998; justify-content: center; align-items: center; padding: 20px; }
        .photo-request-box { background: white; border-radius: 20px; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; }
        .photo-request-header { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); padding: 24px; text-align: center; color: white; }
        .photo-request-body { padding: 24px; text-align: center; }
        .photo-request-preview { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 16px; background: #e8e0d8; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 3px solid var(--border); }
        .photo-request-btns { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
        .photo-request-btns button { padding: 10px 24px; border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 0.9rem; border: none; }
        .btn-photo-save { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }
        .btn-photo-skip { background: #e8e0d8; color: var(--text-light); }

        /* Header */
        .landing-header {
            background: linear-gradient(135deg, var(--primary-dark), var(--primary));
            color: white;
            padding: 30px 24px;
            text-align: center;
        }
        .landing-header img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.3); margin-bottom: 10px; }
        .landing-header h1 { font-family: 'Merriweather', serif; font-size: 1.6rem; margin-bottom: 4px; }
        .landing-header p { opacity: 0.8; font-size: 0.9rem; }
        .header-user-bar {
            display: flex; justify-content: flex-end; align-items: center; gap: 10px;
            padding: 10px 24px; background: var(--primary-dark);
        }
        .header-user-bar span { color: rgba(255,255,255,0.8); font-size: 0.85rem; }
        .header-user-bar .user-photo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
        .header-user-bar button, .header-user-bar a {
            padding: 5px 14px; border-radius: 16px; font-size: 0.78rem; font-weight: 700;
            cursor: pointer; border: none; text-decoration: none; color: white;
        }
        .btn-admin-link { background: rgba(212,160,23,0.9); color: #1a1a1a !important; }
        .btn-guide-link { background: rgba(255,255,255,0.15); }
        .btn-logout-landing { background: rgba(192,57,43,0.8); }

        /* Main Content */
        .landing-main { max-width: 900px; margin: 0 auto; padding: 30px 24px 60px; }

        .courses-section-title {
            font-family: 'Merriweather', serif;
            font-size: 1.3rem;
            color: var(--primary);
            margin-bottom: 16px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--border);
        }

        .courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

        .course-card {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: var(--shadow);
            cursor: pointer;
            transition: var(--transition);
        }
        .course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
        .course-card.available { cursor: default; }
        .course-card.available:hover { transform: none; box-shadow: var(--shadow); }

        .course-card-header {
            padding: 24px 20px;
            text-align: center;
            color: white;
            min-height: 120px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .course-icon { font-size: 36px; margin-bottom: 8px; }
        .course-card-header h3 { font-family: 'Merriweather', serif; font-size: 1.15rem; margin: 0; }
        .course-code { opacity: 0.7; font-size: 0.8rem; margin-top: 4px; }

        .course-card-body { padding: 16px 20px; text-align: center; }
        .course-card-body p { font-size: 0.88rem; color: var(--text-light); margin-bottom: 8px; }

        .btn-enter-course {
            display: inline-block; padding: 10px 28px;
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            color: white; border: none; border-radius: 8px;
            font-weight: 700; font-size: 0.9rem; cursor: pointer;
            transition: var(--transition);
        }
        .btn-enter-course:hover { box-shadow: 0 4px 15px rgba(26,86,50,0.3); }

        .enroll-hint { font-size: 0.82rem; color: var(--text-light); font-style: italic; }
        .enroll-form { display: flex; gap: 8px; margin-top: 8px; }
        .enroll-input {
            flex: 1; padding: 8px 12px; border: 2px solid var(--border);
            border-radius: 8px; font-size: 0.85rem;
        }
        .enroll-input:focus { outline: none; border-color: var(--primary); }
        .btn-enroll {
            padding: 8px 16px; background: var(--gold); color: #1a1a1a;
            border: none; border-radius: 8px; font-weight: 700; font-size: 0.82rem; cursor: pointer;
            white-space: nowrap;
        }

        /* Forgot Password */
        .forgot-link { text-align: center; margin-top: 12px; font-size: 0.85rem; }
        .forgot-link a { color: var(--primary); text-decoration: none; font-weight: 600; }
        .forgot-link a:hover { text-decoration: underline; }
        .forgot-title { font-family: 'Merriweather', serif; font-size: 1.1rem; color: var(--primary); text-align: center; margin-bottom: 6px; }
        .forgot-desc { font-size: 0.85rem; color: var(--text-light); text-align: center; margin-bottom: 18px; }
        #resetCode { text-align: center; font-size: 1.3rem; letter-spacing: 6px; font-weight: 700; }

        .no-courses { text-align: center; padding: 40px; color: var(--text-light); }

        footer { text-align: center; padding: 20px; color: var(--text-light); font-size: 0.8rem; border-top: 1px solid var(--border); margin-top: 40px; }

        @media (max-width: 600px) {
            .courses-grid { grid-template-columns: 1fr; }
            .landing-header h1 { font-size: 1.3rem; }
            .header-user-bar { flex-wrap: wrap; justify-content: center; }
        }
