:root {
    --bg: #0b0f14;
    --bg-elev: #0f141b;
    --card: #121821;
    --muted: #8b9bb0;
    --text: #e6edf6;
    --accent: #5dd6c9;
    --accent-2: #9a7bff;
    --ring: #2c3a4c;
    --ok: #58d38c;
    --warn: #ffd066;
    --danger: #ff6b6b;
    --shadow: 0 10px 25px rgba(0,0,0,.35), 0 6px 12px rgba(0,0,0,.25);
    --radius-xl: 18px;
    --radius-2xl: 26px;
}

/* Light Mode Variables */
:root[data-theme="light"] {
    --bg: #f8fafc;
    --bg-elev: #ffffff;
    --card: #ffffff;
    --muted: #64748b;
    --text: #1e293b;
    --accent: #0d9488;
    --accent-2: #7c3aed;
    --ring: #e2e8f0;
    --ok: #059669;
    --warn: #d97706;
    --danger: #dc2626;
    --shadow: 0 10px 25px rgba(0,0,0,.08), 0 6px 12px rgba(0,0,0,.05);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    background: radial-gradient(1200px 800px at 10% -20%, rgba(93,214,201,.18), transparent 40%),
                radial-gradient(1000px 600px at 110% -10%, rgba(154,123,255,.14), transparent 45%),
                var(--bg);
    color: var(--text);
    line-height: 1.55;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light mode background adjustments */
:root[data-theme="light"] body {
    background: radial-gradient(1200px 800px at 10% -20%, rgba(13,148,136,.08), transparent 40%),
                radial-gradient(1000px 600px at 110% -10%, rgba(124,58,237,.06), transparent 45%),
                var(--bg);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-elev);
    border: 1px solid var(--ring);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
}

.theme-toggle i {
    font-size: 16px;
}

/* Navbar adjustments for theme toggle */
.navbar {
    position: relative;
}

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

.hero {
    position: relative;
    padding: clamp(28px, 5vw, 64px) 18px 24px;
    display: grid;
    gap: 20px;
    place-items: center;
    text-align: center;
    overflow: hidden;
}

.glow {
    position: absolute;
    inset: -10% -20% auto -20%;
    height: 360px;
    background: conic-gradient(from 180deg at 50% 50%, var(--accent), var(--accent-2), var(--accent));
    filter: blur(70px) saturate(130%);
    opacity: .18;
    animation: spin 28s linear infinite;
    pointer-events: none;
}

:root[data-theme="light"] .glow {
    opacity: .12;
}

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

.title {
    font-weight: 800;
    font-size: clamp(28px, 4.6vw, 56px);
    letter-spacing: -0.02em;
    margin: 16px 0 6px;
}

.subtitle {
    color: var(--muted);
    max-width: 900px;
    margin: 0 auto;
    font-size: clamp(14px, 2.2vw, 18px);
}

.toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
    background: linear-gradient(180deg, rgba(11,15,20,.85), rgba(11,15,20,.60));
    border-bottom: 1px solid var(--ring);
}

:root[data-theme="light"] .toolbar {
    background: linear-gradient(180deg, rgba(248,250,252,.85), rgba(248,250,252,.60));
}

.toolbar-inner {
    max-width: 1150px;
    margin: 0 auto;
    padding: 12px 16px;
    display: grid;
    gap: 12px;
    align-items: center;
    grid-template-columns: 1fr auto;
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--ring);
    background: rgba(255,255,255,.02);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform .15s ease, background .2s ease, border-color .2s ease;
    user-select: none;
}

:root[data-theme="light"] .chip {
    background: rgba(0,0,0,.02);
}

.chip:hover {
    transform: translateY(-1px) scale(1.02);
    border-color: rgba(93,214,201,.45);
}

:root[data-theme="light"] .chip:hover {
    border-color: rgba(13,148,136,.45);
}

.chip.active {
    background: linear-gradient(180deg, rgba(93,214,201,.20), rgba(154,123,255,.18));
    border-color: rgba(93,214,201,.55);
}

:root[data-theme="light"] .chip.active {
    background: linear-gradient(180deg, rgba(13,148,136,.15), rgba(124,58,237,.12));
    border-color: rgba(13,148,136,.55);
}

.search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--ring);
    border-radius: 12px;
    min-width: 260px;
    box-shadow: var(--shadow);
}

.search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    width: 200px;
    font-size: 14px;
}

/* Grid */
.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 22px 16px 80px;
}

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Card */
.card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)), var(--card);
    border: 1px solid var(--ring);
    box-shadow: var(--shadow);
    transform: translateY(10px) scale(.98);
    opacity: 0;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, opacity .6s ease;
}

:root[data-theme="light"] .card {
    background: linear-gradient(180deg, rgba(0,0,0,.01), rgba(0,0,0,.005)), var(--card);
}

.card.revealed {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 32px rgba(0,0,0,.45), 0 8px 16px rgba(0,0,0,.35);
    border-color: rgba(93,214,201,.65);
}

:root[data-theme="light"] .card:hover {
    box-shadow: 0 16px 32px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.1);
    border-color: rgba(13,148,136,.65);
}

.card-header {
    padding: 18px 18px 8px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(93,214,201,.15), rgba(154,123,255,.15));
    border: 1px solid var(--ring);
}

:root[data-theme="light"] .logo {
    background: linear-gradient(135deg, rgba(13,148,136,.15), rgba(124,58,237,.15));
}

.name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.tag {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--ring);
    color: var(--muted);
}

.card-body {
    padding: 0 18px 18px;
    color: #c9d8ec;
}

:root[data-theme="light"] .card-body {
    color: #475569;
}

.meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.meta .pill {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--ring);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    color: var(--muted);
}

:root[data-theme="light"] .meta .pill {
    background: rgba(0,0,0,.03);
}

.meta strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    margin-bottom: 2px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 18px 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--ring);
    background: linear-gradient(180deg, rgba(93,214,201,.16), rgba(154,123,255,.12));
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, filter .2s ease, border-color .2s ease;
    box-shadow: var(--shadow);
}

:root[data-theme="light"] .btn {
    background: linear-gradient(180deg, rgba(13,148,136,.12), rgba(124,58,237,.08));
}

.btn:hover {
    transform: translateY(-1px);
    border-color: rgba(93,214,201,.55);
}

:root[data-theme="light"] .btn:hover {
    border-color: rgba(13,148,136,.55);
}

.ext {
    font-size: 12px;
    color: var(--muted);
}


/* ===== FOOTER STYLES ===== */
footer {
    background: #111827;
    color: #fff;
    padding: 2rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col h3 {
    margin-bottom: 1rem;
    color: #0077b6;
    font-size: 1.2rem;
}

.footer-col a {
    display: block;
    color: #d1d5db;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: #0077b6;
}

.footer-col p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-icons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #0077b6;
}

.footer-credit {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .social-icons {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .footer-col p {
        text-align: center;
        justify-content: center;
    }
}
