/* ========================================
   YCOTES FLASHCARDS - MAIN STYLES
   Premium Golden Theme
   ======================================== */

:root {
    /* Primary Colors - Premium Gold */
    --primary-gold: #D4AF37;
    --primary-dark: #B8941E;
    --primary-light: #E5C158;
    --secondary-amber: #FFA500;
    --accent-bronze: #CD7F32;

    /* Light Mode */
    --bg-primary: #FFFBF0;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #FFF8E7;
    --bg-card: #FFFFFF;
    --text-primary: #1F1F1F;
    --text-secondary: #545454;
    --text-tertiary: #767676;
    --border-color: #E5DCC5;
    --shadow-sm: 0 2px 8px rgba(184, 148, 30, 0.1);
    --shadow-md: 0 4px 12px rgba(184, 148, 30, 0.15);
    --shadow-lg: 0 8px 24px rgba(184, 148, 30, 0.2);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);

    /* Typography */
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
}

/* Dark Mode */
[data-theme="dark"] {
    --primary-gold: #FFD700;
    --primary-dark: #D4AF37;
    --primary-light: #FFED4E;

    --bg-primary: #0A0A0A;
    --bg-secondary: #111111;
    --bg-tertiary: #1A1A1A;
    --bg-card: #141414;
    --text-primary: #FFFFFF;
    --text-secondary: #E5E7EB;
    --text-tertiary: #9CA3AF;
    --border-color: rgba(255, 215, 0, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 30px rgba(255, 215, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.logo-text span {
    color: var(--primary-gold);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-gold);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--primary-gold);
    box-shadow: var(--shadow-gold);
    transform: rotate(15deg);
}

/* User Profile in Nav */
.user-profile-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-greeting {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.btn-logout {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.btn-nav-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--primary-gold), var(--secondary-amber));
    color: #000;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-nav-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 50vh;
    padding: 120px 5% 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 165, 0, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-gold), var(--secondary-amber));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.2);
    }
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-top: 1rem;
}

.breadcrumb a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: opacity 0.3s;
}

.breadcrumb a:hover {
    opacity: 0.8;
}

.breadcrumb span {
    color: var(--text-tertiary);
}

/* ========================================
   FILTER SECTION
   ======================================== */
.filter-section {
    padding: 2rem 5%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 72px;
    z-index: 100;
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
}

.filter-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--primary-gold);
    outline: none;
    box-shadow: var(--shadow-sm);
}

/* ========================================
   SUBJECTS GRID
   ======================================== */
.subjects-section {
    padding: 4rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-header h2 span {
    color: var(--primary-gold);
}

.section-header p {
    color: var(--text-secondary);
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.subject-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-gold), var(--secondary-amber));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.subject-card:hover::before {
    transform: scaleX(1);
}

.subject-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-gold);
}

.subject-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(255, 165, 0, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.subject-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.subject-code {
    font-size: 0.85rem;
    color: var(--primary-gold);
    font-weight: 600;
    margin-bottom: 1rem;
}

.subject-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.meta-badge i {
    color: var(--primary-gold);
}

.subject-progress {
    margin-top: 1rem;
}

.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-gold), var(--secondary-amber));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-align: right;
}

/* ========================================
   GO BUTTON
   ======================================== */
.go-btn-group {
    min-width: 120px !important;
    max-width: 150px !important;
}

.go-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-gold), var(--secondary-amber));
    color: #000;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.go-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.go-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
}

/* ========================================
   ENHANCED SUBJECT CARDS
   ======================================== */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-top .subject-icon {
    margin-bottom: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.ready {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.coming-soon {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary-gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.subject-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-badge.highlight {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(255, 165, 0, 0.15));
    color: var(--primary-gold);
    font-weight: 600;
}

/* Empty State Styles */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(255, 165, 0, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon i {
    font-size: 2.5rem;
    color: var(--primary-gold);
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* ========================================
   FOOTER (Enhanced with Navigation)
   ======================================== */
.footer,
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 0;
}

.footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 5%;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.footer-brand-section {
    max-width: 300px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.footer-brand img {
    height: 48px;
    width: 48px;
}

.footer-brand .brand-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.footer-brand .brand-tagline {
    font-size: 0.8rem;
    color: var(--primary-gold);
    display: block;
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.6rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-gold);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin: 0;
}

.footer-bottom a {
    color: var(--primary-gold);
    text-decoration: none;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--primary-gold);
}

/* Ad Container Styles */
.ad-container {
    margin: 2rem 0;
    text-align: center;
}

.ad-header {
    margin: 1rem 0;
}

.ad-inline {
    margin: 2rem auto;
    max-width: 728px;
}

.ad-between-units {
    margin: 1.5rem 0;
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-brand-section {
        max-width: none;
    }

    .footer-nav {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-nav {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   AI CHATBOT BUTTON
   ======================================== */
.chatbot-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-gold), var(--secondary-amber));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-gold);
    z-index: 1000;
    transition: all 0.3s ease;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
}

.chatbot-trigger i {
    font-size: 1.5rem;
    color: #000;
}

.chatbot-trigger .pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-gold);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .hero {
        padding: 100px 1rem 40px;
    }

    .filter-section {
        padding: 1.5rem 1rem;
    }

    .filter-container {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        max-width: none;
    }

    .subjects-section {
        padding: 2rem 1rem;
    }

    .subjects-grid {
        grid-template-columns: 1fr;
    }

    .chatbot-trigger {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

/* ========================================
   LOADING STATES
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-card) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   UTILITIES
   ======================================== */
.text-gold {
    color: var(--primary-gold);
}

.bg-gold {
    background: linear-gradient(135deg, var(--primary-gold), var(--secondary-amber));
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}