@tailwind base;
@tailwind components;
@tailwind utilities;


:root {
    --bg-dark: #08080f;
    --text-light: #f0eeff;
    --primary-purple: #7c3aed;
    --glow-purple: rgba(124, 58, 237, 0.4);
    --glow-blue: #0a1a3a;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
}
/* ============================================================
   BASE & BODY
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
    background: var(--bg-dark);
    color: var(--text-light);
}

/* ============================================================
   HERO SCREEN
   ============================================================ */

#screen-home { min-height: 100vh; width: 100%; }

.hero-wrapper {
    min-height: 100vh;
    background: radial-gradient(ellipse at 20% 30%, #1a0533 0%, #08080f 60%),
                radial-gradient(ellipse at 80% 70%, #0a1a3a 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.4;
    animation: blobFloat 10s ease-in-out infinite;
    pointer-events: none;
}
.blob-1 { width: 600px; height: 600px; background: radial-gradient(circle, #6d28d9, #4338ca); top: -150px; left: -180px; animation-delay: 0s; }
.blob-2 { width: 450px; height: 450px; background: radial-gradient(circle, #be185d, #7c3aed); bottom: -100px; right: -120px; animation-delay: 3.5s; }
.blob-3 { width: 350px; height: 350px; background: radial-gradient(circle, #0ea5e9, #6366f1); top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: 7s; }

@keyframes blobFloat {
    0%,100% { transform: translate(0,0) scale(1); }
    33%      { transform: translate(25px,-25px) scale(1.04); }
    66%      { transform: translate(-18px,18px) scale(0.96); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    animation: heroFadeIn 1s ease-out both;
}

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

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.75);
    padding: 0.45rem 1.3rem;
    border-radius: 50px;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.05;
    margin-bottom: 1.4rem;
    letter-spacing: -2.5px;
    text-shadow: 0 2px 40px rgba(0,0,0,0.4);
}

.hero-title-accent {
    background: linear-gradient(100deg, #a78bfa 0%, #60a5fa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.75;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.hero-stat { display: flex; flex-direction: column; align-items: center; }
.hero-stat-number { font-size: 2rem; font-weight: 800; color: #c4b5fd; }
.hero-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }
.hero-stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,0.12); }

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, rgba(124,58,237,0.9), rgba(79,70,229,0.9));
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.95rem 2.5rem;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(124,58,237,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    letter-spacing: 0.02em;
}
.hero-cta:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 48px rgba(124,58,237,0.65), inset 0 1px 0 rgba(255,255,255,0.2); }
.hero-cta:active { transform: scale(0.98); }

.hero-hint { margin-top: 1.2rem; font-size: 0.8rem; color: rgba(255,255,255,0.28); }

@media (max-width: 768px) {
    .hero-title { font-size: 3.2rem; letter-spacing: -1.5px; }
    .hero-subtitle { font-size: 1rem; }
}


/* ============================================================
   APP SCREEN – CHROME (header, sidebar)
   ============================================================ */

#screen-app {
    background: #08080f;
    min-height: 100vh;
}

/* Header */
#screen-app header {
    background: rgba(14,14,22,0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
}

/* Sidebar */
#sidebar {
    background: rgba(12,12,20,0.9) !important;
    border-right: 1px solid rgba(255,255,255,0.07) !important;
    backdrop-filter: blur(20px);
}

#sidebar h1 { color: rgba(255,255,255,0.85); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; margin-bottom: 0.75rem; }

/* Topics dropdown */
#topicsDropdown {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: rgba(255,255,255,0.85) !important;
    border-radius: 12px !important;
    padding: 0.6rem 0.75rem !important;
    font-size: 0.88rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
#topicsDropdown:focus { border-color: rgba(167,139,250,0.5) !important; }
#topicsDropdown option { background: #13131f; color: #f0eeff; }

/* Game category buttons */
#gamesList button {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: rgba(255,255,255,0.65);
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}
#gamesList button:hover, #gamesList button.active {
    background: rgba(124,58,237,0.25);
    border-color: rgba(124,58,237,0.5);
    color: #c4b5fd;
}

/* Search bar in header */
#screen-app header .flex-1 > div {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 50px !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#screen-app header .flex-1 > div:focus-within {
    border-color: rgba(167,139,250,0.45) !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
#searchInput { font-size: 0.88rem; }


/* ============================================================
   APP SCREEN – MAIN CONTENT AREA
   ============================================================ */

main.landing-container {
    background: transparent !important;
}
main.landing-container::before { display: none; }

/* Topic title */
#topicTitle {
    font-size: 1.6rem !important;
    font-weight: 800;
    color: rgba(255,255,255,0.9);
    letter-spacing: -0.5px;
    margin-bottom: 1.25rem;
}

/* Results count */
#resultsCount { color: rgba(255,255,255,0.35); font-size: 0.8rem; }

/* Tags pills */
#tagsList button {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    color: rgba(255,255,255,0.55);
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
}
#tagsList button:hover { background: rgba(124,58,237,0.2); border-color: rgba(124,58,237,0.4); color: #c4b5fd; }
#tagsList button.active { background: rgba(124,58,237,0.3); border-color: rgba(124,58,237,0.6); color: #ddd6fe; }


/* ============================================================
   LINK CARDS  – Apple liquid glass
   ============================================================ */

.link-card {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.09) !important;
    border-radius: 20px !important;
    padding: 1.1rem 1.25rem !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3) !important;
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.link-card:hover {
    transform: translateY(-5px) !important;
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.16) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06) !important;
}

.link-card h3 { color: rgba(255,255,255,0.92) !important; font-size: 0.95rem !important; font-weight: 700 !important; }
.link-card a  { color: rgba(167,139,250,0.8) !important; font-size: 0.75rem !important; }
.link-card p  { color: rgba(255,255,255,0.5) !important; font-size: 0.8rem !important; line-height: 1.55 !important; }

/* Coloured left border accent */
.link-card:has(.price-badge.free)     { border-left: 2px solid rgba(34,197,94,0.55) !important; }
.link-card:has(.price-badge.paid)     { border-left: 2px solid rgba(239,68,68,0.55) !important; }
.link-card:has(.price-badge.freemium) { border-left: 2px solid rgba(234,179,8,0.55) !important; }


/* ============================================================
   LANDING PAGE INSIDE APP
   ============================================================ */

.landing-content { position: relative; z-index: 1; text-align: center; max-width: 800px; animation: fadeInDown 0.8s ease-out; }
.landing-title { font-size: 3rem; font-weight: 800; color: rgba(255,255,255,0.9); margin-bottom: 0.75rem; letter-spacing: -1px; }
.landing-subtitle { font-size: 1.05rem; color: rgba(255,255,255,0.45); margin-bottom: 3rem; line-height: 1.65; }
.landing-page-content { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; padding: 2rem 0; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
    width: 100%;
}

.feature-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 22px;
    padding: 1.75rem 1.5rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out both;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
.feature-card:nth-child(1) { animation-delay: 0.15s; }
.feature-card:nth-child(2) { animation-delay: 0.3s; }
.feature-card:nth-child(3) { animation-delay: 0.45s; }
.feature-card:hover { transform: translateY(-6px); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.16); box-shadow: 0 16px 40px rgba(0,0,0,0.4); }

.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-title { font-size: 1.05rem; font-weight: 700; color: rgba(255,255,255,0.88); margin-bottom: 0.5rem; }
.feature-description { font-size: 0.85rem; color: rgba(255,255,255,0.45); line-height: 1.55; }

.stats-section { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2rem; width: 100%; }
.stat {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 1.25rem;
    color: white;
    animation: fadeInUp 1s ease-out both;
}
.stat:nth-child(1) { animation-delay: 0.3s; }
.stat:nth-child(2) { animation-delay: 0.5s; }
.stat:nth-child(3) { animation-delay: 0.7s; }
.stat-number { font-size: 2.2rem; font-weight: 800; display: block; color: #c4b5fd; }
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }

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

@media (max-width: 768px) {
    .landing-title { font-size: 2.2rem; }
    .features-grid { grid-template-columns: 1fr; }
    .stats-section { grid-template-columns: 1fr; gap: 0.75rem; }
}


/* ============================================================
   PRICE FILTER BUTTONS
   ============================================================ */

.price-filter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px;
    border-radius: 50px;
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: all 0.2s ease;
}
.price-filter:hover { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); }
.price-filter.active               { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.35); }
.price-filter.free.active          { background: rgba(34,197,94,0.18); color: #4ade80; border-color: rgba(34,197,94,0.45); }
.price-filter.paid.active          { background: rgba(239,68,68,0.18); color: #f87171; border-color: rgba(239,68,68,0.45); }
.price-filter.freemium.active      { background: rgba(234,179,8,0.18); color: #fbbf24; border-color: rgba(234,179,8,0.45); }


/* ============================================================
   PRICE BADGES
   ============================================================ */

.price-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}
.price-badge.free     { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.price-badge.paid     { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.price-badge.freemium { background: rgba(234,179,8,0.12); color: #fbbf24; border: 1px solid rgba(234,179,8,0.3); }


/* ============================================================
   SEARCH HIGHLIGHT
   ============================================================ */

.match-highlight {
    background: rgba(167,139,250,0.2);
    color: #e9d5ff;
    padding: 0 3px;
    border-radius: 4px;
}


/* ============================================================
   FOOTER
   ============================================================ */

footer {
    background: rgba(255,255,255,0.03) !important;
    border-top: 1px solid rgba(255,255,255,0.07) !important;
}


/* ============================================================
   THE VAULT
   ============================================================ */

.vault-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 22px;
    padding: 1.4rem 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}
.vault-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(124,58,237,0.06) 0%, transparent 60%);
    pointer-events: none;
}
.vault-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.075);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    border-color: rgba(124,58,237,0.25);
}

.vault-tag-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    color: rgba(255,255,255,0.5);
    padding: 0.3rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.vault-tag-btn:hover { background: rgba(124,58,237,0.2); border-color: rgba(124,58,237,0.4); color: #c4b5fd; }
.vault-tag-btn.active { background: rgba(124,58,237,0.3); border-color: rgba(124,58,237,0.55); color: #ddd6fe; }


/* ============================================================
   VAULT SUBJECT BUTTONS
   ============================================================ */


/* Vault category tabs */
.vc-tab-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    color: rgba(255,255,255,0.5);
    padding: 0.45rem 1.1rem;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.vc-tab-btn:hover { background: rgba(124,58,237,0.2); border-color: rgba(124,58,237,0.4); color: #c4b5fd; }
.vc-tab-btn.active { background: rgba(124,58,237,0.3); border-color: rgba(124,58,237,0.55); color: #ddd6fe; }


/* ============================================================
   VAULT COMPACT CARDS (image-first grid)
   ============================================================ */

.vault-card-compact {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}
.vault-card-compact:hover {
    transform: translateY(-5px);
    border-color: rgba(124,58,237,0.35);
    box-shadow: 0 14px 36px rgba(0,0,0,0.45);
}

.vault-card-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.vault-card-img-placeholder {
    height: 130px;
    background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(79,70,229,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.vault-card-info {
    padding: 0.85rem 1rem 1rem;
    flex: 1;
}

.vault-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    line-height: 1.3;
}


/* ============================================================
   UTILITY CLASSES (replaces repeated inline styles)
   ============================================================ */

/* Vault sidebar button */
.vault-sidebar-btn {
    margin-top: 1.25rem; width: 100%;
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem 0.85rem; border-radius: 12px;
    background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.3);
    color: #c4b5fd; font-size: 0.88rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.vault-sidebar-btn:hover { background: rgba(124,58,237,0.28); border-color: rgba(124,58,237,0.55); }

/* Back buttons (vault category / detail) */
.back-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50px; color: rgba(255,255,255,0.65); font-size: 0.83rem;
    padding: 0.45rem 1rem; cursor: pointer; margin-bottom: 2rem; transition: all 0.2s;
}
.back-btn:hover { background: rgba(255,255,255,0.13); color: #fff; }

/* Footer social links */
.footer-link {
    display: flex; align-items: center; gap: 0.4rem;
    color: rgba(255,255,255,0.55); text-decoration: none;
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
    padding: 0.35rem 0.75rem; border-radius: 999px; transition: all 0.2s;
}
.footer-link:hover { color: #fff; background: rgba(255,255,255,0.14); }

/* Section labels (Steps / Links headings in vault detail) */
.section-label {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: rgba(255,255,255,0.3); margin-bottom: 1rem;
}


/* ============================================================
   SCHOOL SUBJECT CARDS (2x vault card size)
   ============================================================ */

.subject-card {
    position: relative; /* for emoji badge positioning */
}

.subject-card-img {
    height: 200px !important; /* 2x the vault card 100px */
}

.subject-card-info {
    padding: 1rem 1.1rem 1.1rem !important;
}

.subject-card-title {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: rgba(255,255,255,0.92) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.2px;
}


/* ============================================================
   LANGUAGE FILTER BUTTONS & BADGES
   ============================================================ */

.lang-filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 11px;
    border-radius: 50px;
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: all 0.2s ease;
}
.lang-filter:hover {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
}
.lang-filter.active {
    background: rgba(56,189,248,0.18);
    color: #7dd3fc;
    border-color: rgba(56,189,248,0.4);
}

.lang-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    background: rgba(56,189,248,0.12);
    color: #7dd3fc;
    border: 1px solid rgba(56,189,248,0.28);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-loader {
    background: linear-gradient(90deg, #1e1e2e 25%, #2a2a3a 50%, #1e1e2e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}
