/* Splash screen styles.
   Renders before MudBlazor mounts, so --mud-palette-* vars aren't yet defined.
   Colors here must match AthenaTheme.PaletteLight / PaletteDark — keep in sync. */

:root {
    /* Light-mode tokens — must match AthenaTheme.PaletteLight */
    --athena-splash-bg: #F8FAFC;          /* PaletteLight.Background */
    --athena-splash-surface: #FFFFFF;     /* PaletteLight.Surface / AppbarBackground */
    --athena-splash-border: #E2E8F0;      /* PaletteLight.LinesDefault */
    --athena-splash-border-strong: #CBD5E1; /* PaletteLight.LinesInputs */
    --athena-splash-skeleton: #E2E8F0;
    --athena-splash-rail: #0F172A;        /* PaletteLight.DrawerBackground */
    --athena-splash-spinner: #0A6EBD;     /* PaletteLight.Primary */
    --athena-splash-spinner-track: rgba(10, 110, 189, 0.15);
    --athena-splash-caption: #6b7280;
    --athena-splash-shimmer: rgba(255, 255, 255, 0.6);
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark-mode tokens — must match AthenaTheme.PaletteDark */
        --athena-splash-bg: #0F172A;        /* PaletteDark.Background */
        --athena-splash-surface: #1E293B;   /* PaletteDark.Surface / AppbarBackground */
        --athena-splash-border: #334155;    /* PaletteDark.LinesDefault */
        --athena-splash-border-strong: #334155;
        --athena-splash-skeleton: #334155;
        --athena-splash-caption: #94A3B8;
        --athena-splash-shimmer: rgba(255, 255, 255, 0.05);
    }
}

html, body { height: 100%; margin: 0; }

body {
    background: var(--mud-palette-background, var(--athena-splash-bg));
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#app { position: relative; min-height: 100vh; }

.athena-splash-rail {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 64px;
    background: var(--athena-splash-rail);
    z-index: 2;
}

.athena-splash-rail-header {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.athena-splash-rail-logo {
    width: 32px;
    height: 32px;
    display: block;
}

.athena-splash-appbar {
    position: fixed;
    top: 0; left: 64px; right: 0;
    height: 48px;
    background: var(--athena-splash-surface);
    border-bottom: 1px solid var(--athena-splash-border-strong);
    z-index: 2;
}

.athena-splash-main {
    position: absolute;
    top: 48px; left: 64px; right: 0; bottom: 0;
    background: var(--athena-splash-bg);
    overflow: hidden;
}

.athena-splash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 24px;
}

.athena-splash-card {
    background: var(--athena-splash-surface);
    border: 1px solid var(--athena-splash-border);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.athena-splash-skeleton {
    background: var(--athena-splash-skeleton);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.athena-splash-skeleton::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg,
        transparent 0%,
        var(--athena-splash-shimmer) 50%,
        transparent 100%);
    animation: athena-splash-shimmer 1.6s linear 0.5s infinite;
}

.athena-splash-skel-title    { width: 60%; height: 16px; }
.athena-splash-skel-line-90  { width: 90%; height: 12px; }
.athena-splash-skel-line-75  { width: 75%; height: 12px; }
.athena-splash-skel-line-60  { width: 60%; height: 12px; }
.athena-splash-skel-line-40  { width: 40%; height: 12px; }
.athena-splash-skel-graphic  { width: 100%; height: 80px; border-radius: 6px; }

.athena-splash-overlay {
    position: absolute;
    top: 48px; left: 64px; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.athena-splash-spinner {
    width: 72px;
    height: 72px;
    border: 6px solid var(--athena-splash-spinner-track);
    border-top-color: var(--athena-splash-spinner);
    border-radius: 50%;
    animation: athena-splash-spin 1s linear infinite;
}

.athena-splash-caption {
    margin-top: 20px;
    color: var(--athena-splash-caption);
    font-size: 14px;
    letter-spacing: 0.02em;
}

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

@keyframes athena-splash-shimmer {
    0%   { transform: translateX(-100%); }
    60%  { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}
