/* ── Graduation Walk Animation (GradFlow) ───────────── */

/* ── Dashboard theme (matches landing page) ──────────── */
[data-bs-theme="dark"] body {
    background: #1a2332;
    color: #e2e8f0;
    font-family: 'Inter', system-ui, sans-serif;
}
[data-bs-theme="dark"] .navbar {
    background: linear-gradient(135deg, rgba(26,54,93,0.95), rgba(44,82,130,0.9)) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
[data-bs-theme="dark"] footer {
    border-color: rgba(255,255,255,0.06) !important;
    color: rgba(255,255,255,0.35) !important;
}
[data-bs-theme="dark"] footer small { color: rgba(255,255,255,0.35) !important; }

/* Glass cards */
[data-bs-theme="dark"] .card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    color: #e2e8f0;
}
[data-bs-theme="dark"] .card-title {
    color: #b8860b !important;
}
[data-bs-theme="dark"] .card a {
    color: rgba(255,255,255,0.7);
}
[data-bs-theme="dark"] .card a:hover {
    color: #b8860b;
}
[data-bs-theme="dark"] .card i[class*="text-"] {
    color: rgba(184,134,11,0.7) !important;
}
[data-bs-theme="dark"] .card .text-body {
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"] .text-muted {
    color: rgba(255,255,255,0.5) !important;
}

/* Glass nav buttons */
[data-bs-theme="dark"] .btn-glass {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.75);
    backdrop-filter: blur(8px);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}
[data-bs-theme="dark"] .btn-glass:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(184,134,11,0.4);
    color: #b8860b;
}
[data-bs-theme="dark"] .btn-glass:focus {
    box-shadow: 0 0 0 2px rgba(184,134,11,0.25);
}

/* Glass play button (gold accent) */
[data-bs-theme="dark"] .btn-play {
    background: linear-gradient(135deg, #1a365d, #2c5282);
    border: 1px solid rgba(184,134,11,0.3);
    color: #b8860b;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}
[data-bs-theme="dark"] .btn-play:hover {
    background: linear-gradient(135deg, #2c5282, #1a365d);
    border-color: rgba(184,134,11,0.5);
    color: #d4a017;
    box-shadow: 0 0 16px rgba(184,134,11,0.15);
}

/* Glass control buttons */
[data-bs-theme="dark"] .grad-controls .btn-outline-secondary {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}
[data-bs-theme="dark"] .grad-controls .btn-outline-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #e2e8f0;
}

/* Glass select */
[data-bs-theme="dark"] .grad-controls .form-select-sm {
    background-color: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.75);
}

/* Page heading */
[data-bs-theme="dark"] .anim-header h4 {
    color: #e2e8f0;
    font-weight: 600;
}
[data-bs-theme="dark"] .anim-header h4 i {
    color: #b8860b;
}

/* Speed label */
[data-bs-theme="dark"] .grad-controls {
    color: rgba(255,255,255,0.5);
}

/* ── Canvas wrap ─────────────────────────────────────── */
.grad-canvas-wrap {
    background: #141c28;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    padding: .5rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    aspect-ratio: 16 / 9;
    transition: background 0.3s, border-color 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.grad-canvas-wrap:fullscreen {
    padding: 0;
    border: none;
    border-radius: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.grad-canvas-wrap:fullscreen canvas {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain;
}
[data-bs-theme="light"] .grad-canvas-wrap {
    background: #e8e6e1;
    border-color: #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
[data-bs-theme="dark"] .grad-canvas-wrap {
    border-color: rgba(255,255,255,0.08);
}

/* Light-mode fallbacks for glass buttons */
[data-bs-theme="light"] .btn-glass {
    background: rgba(0,0,0,0.04);
    border: 1px solid #dee2e6;
    color: #1a365d;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}
[data-bs-theme="light"] .btn-glass:hover {
    background: rgba(0,48,135,0.08);
    border-color: #1a365d;
    color: #1a365d;
}
[data-bs-theme="light"] .btn-play {
    background: linear-gradient(135deg, #1a365d, #2c5282);
    border: 1px solid #1a365d;
    color: #fff;
    border-radius: 0.5rem;
}
[data-bs-theme="light"] .btn-play:hover {
    background: linear-gradient(135deg, #2c5282, #1a365d);
    color: #fff;
}
#grad-canvas {
    display: block;
    border-radius: .375rem;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Legend dots */
.grad-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.grad-dot-waiting { background: #3d6b5c; }
.grad-dot-walking { background: hsl(165, 70%, 55%); }
.grad-dot-stage { background: #6ee7b7; }

[data-bs-theme="light"] .grad-dot-waiting { background: #7a9e90; }
[data-bs-theme="light"] .grad-dot-walking { background: #003087; }
[data-bs-theme="light"] .grad-dot-stage { background: #003087; }

/* ── Controls toolbar responsive ───────────────────── */
.grad-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
}

/* ── Mobile adjustments ────────────────────────────── */
@media (max-width: 767.98px) {
    .grad-controls .btn { font-size: .75rem; padding: .25rem .5rem; }
    .grad-controls .form-select-sm { font-size: .75rem; }
}
