/* ===== Algebra Course — Design System ===== */
:root {
    --alg-teal: #0d9488;
    --alg-blue: #2563eb;
    --alg-gradient: linear-gradient(135deg, #0d9488 0%, #2563eb 100%);
    --radius: 14px;
    --transition: 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ---- Keyframes ---- */
@keyframes slideUp {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes shimmer {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes floatOrb {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-30px) scale(1.05); }
}

/* ---- Navigation ---- */
.nav-glass {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(16px) saturate(1.6);
    -webkit-backdrop-filter: blur(16px) saturate(1.6);
    border-bottom: 1px solid rgba(226,232,240,0.7);
}
.nav-pill {
    padding: 6px 13px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    transition: all var(--transition);
    white-space: nowrap;
}
.nav-pill:hover { background: rgba(241,245,249,0.8); color: #1e293b; }
.nav-pill.active { background: var(--alg-gradient); color: #fff; box-shadow: 0 1px 4px rgba(13,148,136,0.3); }

/* ---- Glass Card ---- */
.glass-card {
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    border: 1px solid rgba(226,232,240,0.8);
    border-radius: var(--radius);
    padding: 20px;
    transition: all var(--transition);
}
.glass-card:hover {
    border-color: rgba(13,148,136,0.2);
    box-shadow: 0 8px 24px -8px rgba(13,148,136,0.08);
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 20px; border-radius: 12px;
    background: var(--alg-gradient); color: #fff;
    font-size: 14px; font-weight: 600;
    border: none; cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 2px 8px -2px rgba(13,148,136,0.3);
}
.btn-primary:hover { box-shadow: 0 4px 16px -4px rgba(13,148,136,0.4); transform: translateY(-1px); }
.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 20px; border-radius: 12px;
    background: rgba(255,255,255,0.8);
    color: #334155; font-size: 14px; font-weight: 600;
    border: 1px solid rgba(226,232,240,0.8);
    cursor: pointer; transition: all var(--transition);
}
.btn-secondary:hover { background: #fff; border-color: rgba(13,148,136,0.3); color: #0d9488; }

/* ---- Typography ---- */
.stat-num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.gradient-shimmer {
    background: linear-gradient(135deg, #0d9488 0%, #2563eb 40%, #0d9488 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s ease-in-out infinite;
}

/* ---- Grid dots ---- */
.grid-dots {
    background-image: radial-gradient(circle, #94a3b8 0.8px, transparent 0.8px);
    background-size: 32px 32px;
}

/* ---- Floating orbs ---- */
.float-orb { animation: floatOrb 8s ease-in-out infinite; }
.float-orb-slow { animation: floatOrb 12s ease-in-out infinite reverse; }

/* ---- Stagger animation ---- */
.card-stagger { opacity: 0; animation: slideUp 0.5s cubic-bezier(0.25,0.8,0.25,1) forwards; }

/* ===== Homepage Hero Extras ===== */
.hero-feature-card {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226,232,240,0.8);
    border-radius: 16px;
    padding: 28px 22px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}
.hero-feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--card-accent, var(--alg-gradient));
    opacity: 0;
    transition: opacity 0.3s;
}
.hero-feature-card:hover::before { opacity: 1; }
.hero-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(13,148,136,0.12);
    border-color: rgba(13,148,136,0.2);
}
.hero-feature-card .card-icon-ring {
    width: 56px; height: 56px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    transition: transform 0.3s;
}
.hero-feature-card:hover .card-icon-ring { transform: scale(1.1); }

/* ---- Module list ---- */
.module-row {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(226,232,240,0.6);
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
}
.module-row:hover {
    background: rgba(255,255,255,0.9);
    box-shadow: 0 4px 16px -4px rgba(13,148,136,0.1);
    transform: translateX(4px);
}

/* ---- Mobile responsive ---- */
@media (max-width: 1023px) {
    .nav-pill { padding: 5px 10px; font-size: 12px; }
    .hero-feature-card { padding: 20px 16px; }
}

/* ---- Safe area for iOS ---- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body { padding-bottom: env(safe-area-inset-bottom); }
}
