/* ================================================================
   UTD Games — Downloads Page (v2.0)
   Modern gaming aesthetic · Indigo/purple accents · Glassmorphism
   ================================================================ */

/* ── Page Background ── */
.downloads-body {
    min-height: 100vh;
    background: var(--bg-darker, #05080f);
    position: relative;
    color: var(--text-primary, #eef2ff);
    font-family: 'Poppins', 'Space Grotesk', sans-serif;
    overflow-x: hidden;
}

.downloads-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 900px 600px at 80% 10%, rgba(99,102,241,0.14), transparent 60%),
        radial-gradient(ellipse 1200px 800px at 20% 95%, rgba(168,85,247,0.10), transparent 65%),
        radial-gradient(ellipse 600px 400px at 50% 50%, rgba(34,211,238,0.04), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.downloads-bg-image {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(14px) brightness(.35) saturate(1.1);
    opacity: .55;
    z-index: 0;
    transform: scale(1.08);
}

.downloads-bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 50%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 50%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* ── Main Container ── */
.dl-container {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 140px 1.5rem 4rem;
}

/* ── Hero Section ── */
.dl-hero {
    text-align: center;
    margin-bottom: 3rem;
    animation: dlFadeDown .7s ease;
}

.dl-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .9rem;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.35);
    border-radius: 2rem;
    font-size: .72rem;
    font-weight: 600;
    color: #c7d2fe;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dl-hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary, #6366f1);
    box-shadow: 0 0 12px var(--accent-primary, #6366f1);
    animation: dlPulseDot 2s ease-in-out infinite;
}

.dl-hero-title {
    font-family: 'Orbitron', 'Russo One', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: .75rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #eef2ff 0%, #c7d2fe 40%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dl-hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary, #94a3b8);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Featured Card (Primary Launcher) ── */
.dl-featured {
    position: relative;
    padding: 2px;
    border-radius: 1.25rem;
    background: linear-gradient(135deg,
        rgba(99,102,241,0.55) 0%,
        rgba(168,85,247,0.45) 50%,
        rgba(99,102,241,0.35) 100%);
    margin-bottom: 2.5rem;
    animation: dlFadeUp .7s ease .1s backwards;
    transition: transform .3s ease;
}

.dl-featured::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 1.3rem;
    background: linear-gradient(135deg,
        rgba(99,102,241,0.8) 0%,
        rgba(168,85,247,0.6) 50%,
        rgba(34,211,238,0.5) 100%);
    filter: blur(18px);
    opacity: .55;
    z-index: -1;
    animation: dlGlowPulse 3.5s ease-in-out infinite;
}

.dl-featured:hover {
    transform: translateY(-4px);
}

.dl-featured-inner {
    background: linear-gradient(145deg,
        rgba(14, 21, 33, 0.96) 0%,
        rgba(17, 25, 40, 0.94) 100%);
    border-radius: calc(1.25rem - 2px);
    padding: 2rem 2.25rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.75rem;
    align-items: center;
}

.dl-featured-icon {
    width: 88px;
    height: 88px;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    box-shadow:
        0 12px 40px rgba(99,102,241,0.35),
        inset 0 1px 0 rgba(255,255,255,0.15);
}

.dl-featured-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 50%);
    pointer-events: none;
}

.dl-featured-icon svg {
    width: 42px;
    height: 42px;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    position: relative;
    z-index: 1;
}

.dl-featured-body { min-width: 0; }

.dl-featured-title {
    font-family: 'Orbitron', 'Russo One', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.dl-version-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .22rem .6rem;
    background: rgba(99,102,241,0.2);
    border: 1px solid rgba(99,102,241,0.45);
    border-radius: 6px;
    font-family: 'DM Mono', 'Space Grotesk', monospace;
    font-size: .78rem;
    font-weight: 600;
    color: #c7d2fe;
    letter-spacing: .02em;
    text-transform: none;
}

.dl-version-chip::before {
    content: 'v';
    opacity: .6;
    margin-right: -.1rem;
}

.dl-featured-meta {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: .82rem;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: .85rem;
}

.dl-featured-meta span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.dl-featured-meta svg {
    width: 14px;
    height: 14px;
    color: var(--accent-primary, #6366f1);
    flex-shrink: 0;
}

.dl-featured-notes {
    font-size: .85rem;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.6;
    padding: .75rem .9rem;
    background: rgba(0,0,0,0.25);
    border-left: 2px solid rgba(168,85,247,0.5);
    border-radius: 6px;
    white-space: pre-line;
    max-width: 560px;
}

.dl-featured-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .6rem;
    flex-shrink: 0;
}

.dl-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .95rem 1.85rem;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    border-radius: .85rem;
    border: 1px solid rgba(168,85,247,0.45);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all .25s ease;
    box-shadow:
        0 10px 30px rgba(99,102,241,0.45),
        0 0 0 1px rgba(99,102,241,0.25);
    animation: dlBtnGlow 3s ease-in-out infinite;
}

.dl-btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 50%);
    pointer-events: none;
}

.dl-btn-primary::after {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transition: left .6s ease;
}

.dl-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 40px rgba(99,102,241,0.6),
        0 0 0 1px rgba(168,85,247,0.55);
}

.dl-btn-primary:hover::after { left: 100%; }

.dl-btn-primary svg {
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 1;
}

.dl-btn-primary.disabled {
    background: linear-gradient(135deg, #3b3f52 0%, #2d2f40 100%);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
    opacity: .7;
    animation: none;
}

.dl-file-size {
    font-family: 'DM Mono', 'Space Grotesk', monospace;
    font-size: .72rem;
    color: var(--text-muted, #5b6b88);
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* ── Section Divider ── */
.dl-section-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0 1.25rem;
}

.dl-section-head::before,
.dl-section-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.25), transparent);
}

.dl-section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: .18em;
    white-space: nowrap;
}

/* ── Alt Downloads Grid ── */
.dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    animation: dlFadeUp .7s ease .2s backwards;
}

.dl-card {
    position: relative;
    padding: 1.25rem 1.4rem;
    background: linear-gradient(145deg,
        rgba(14, 21, 33, 0.85) 0%,
        rgba(17, 25, 40, 0.82) 100%);
    border: 1px solid rgba(99,102,241,0.12);
    border-radius: 1rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    transition: all .3s ease;
    overflow: hidden;
}

.dl-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.5), rgba(168,85,247,0.5), transparent);
    opacity: 0;
    transition: opacity .3s ease;
}

.dl-card:hover {
    border-color: rgba(99,102,241,0.4);
    transform: translateY(-3px);
    box-shadow:
        0 18px 42px rgba(0,0,0,0.5),
        0 0 0 1px rgba(99,102,241,0.2),
        0 0 32px rgba(99,102,241,0.15);
}

.dl-card:hover::before { opacity: 1; }

.dl-card-icon {
    width: 56px;
    height: 56px;
    border-radius: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
}

.dl-card-icon svg,
.dl-card-icon img {
    width: 32px;
    height: 32px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.dl-card-icon.icon-chrome  { background: linear-gradient(135deg, #ffcc00 0%, #e62e2e 100%); }
.dl-card-icon.icon-flash   { background: linear-gradient(135deg, #ffffff 0%, #e81c24 100%); }
.dl-card-icon.icon-android { background: linear-gradient(135deg, #3ddc84 0%, #0f9d58 100%); }
.dl-card-icon.icon-ios     { background: linear-gradient(135deg, #007aff 0%, #0051d0 100%); }

.dl-card-body { min-width: 0; display: flex; flex-direction: column; gap: .25rem; }

.dl-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

.dl-card-meta {
    font-size: .78rem;
    color: var(--text-secondary, #94a3b8);
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.dl-card-chip {
    display: inline-flex;
    padding: .15rem .5rem;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.35);
    border-radius: 4px;
    color: #34d399;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .03em;
}

.dl-card-chip.chip-warn {
    background: rgba(245,158,11,0.15);
    border-color: rgba(245,158,11,0.35);
    color: #fbbf24;
}

.dl-card-action {
    grid-column: 1 / -1;
    margin-top: .5rem;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
    align-items: center;
    padding-top: .75rem;
    border-top: 1px solid rgba(99,102,241,0.1);
}

.dl-card-size {
    font-family: 'DM Mono', 'Space Grotesk', monospace;
    font-size: .72rem;
    color: var(--text-muted, #5b6b88);
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1rem;
    background: rgba(99,102,241,0.12);
    color: #c7d2fe;
    font-weight: 600;
    font-size: .82rem;
    border-radius: .55rem;
    border: 1px solid rgba(99,102,241,0.3);
    text-decoration: none;
    cursor: pointer;
    transition: all .2s ease;
}

.dl-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.dl-btn:hover {
    background: rgba(99,102,241,0.22);
    border-color: rgba(99,102,241,0.55);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99,102,241,0.25);
}

.dl-btn.btn-ios {
    background: rgba(0,122,255,0.15);
    border-color: rgba(0,122,255,0.35);
    color: #60a5fa;
}
.dl-btn.btn-ios:hover {
    background: rgba(0,122,255,0.3);
    border-color: rgba(0,122,255,0.55);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,122,255,0.35);
}

.dl-btn.btn-android {
    background: rgba(16,185,129,0.12);
    border-color: rgba(16,185,129,0.35);
    color: #34d399;
}
.dl-btn.btn-android:hover {
    background: rgba(16,185,129,0.25);
    border-color: rgba(16,185,129,0.55);
    color: #fff;
    box-shadow: 0 6px 18px rgba(16,185,129,0.35);
}

/* ── Helper Note ── */
.dl-note {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(145deg, rgba(14,21,33,0.7), rgba(17,25,40,0.6));
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: .85rem;
    font-size: .8rem;
    color: var(--text-secondary, #94a3b8);
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
}

.dl-note svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary, #6366f1);
    flex-shrink: 0;
}

/* ── Animations ── */
@keyframes dlFadeDown {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes dlPulseDot {
    0%,100% { box-shadow: 0 0 12px rgba(99,102,241,0.8); opacity: 1; }
    50%     { box-shadow: 0 0 22px rgba(99,102,241,1); opacity: .7; }
}

@keyframes dlGlowPulse {
    0%,100% { opacity: .45; }
    50%     { opacity: .75; }
}

@keyframes dlBtnGlow {
    0%,100% { box-shadow: 0 10px 30px rgba(99,102,241,0.45), 0 0 0 1px rgba(99,102,241,0.25); }
    50%     { box-shadow: 0 14px 40px rgba(99,102,241,0.7),  0 0 0 1px rgba(168,85,247,0.4); }
}

/* ── Responsive ── */
@media (max-width: 860px) {
    .dl-container { padding: 110px 1rem 3rem; }

    .dl-featured-inner {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem 1.25rem;
        gap: 1.25rem;
    }
    .dl-featured-icon { margin: 0 auto; }
    .dl-featured-title { justify-content: center; }
    .dl-featured-meta { justify-content: center; }
    .dl-featured-notes { text-align: left; max-width: 100%; }
    .dl-featured-action { align-items: stretch; }
    .dl-btn-primary { justify-content: center; }
}

@media (max-width: 480px) {
    .dl-hero-title { font-size: 1.8rem; }
    .dl-grid { grid-template-columns: 1fr; }
    .dl-featured-title { font-size: 1.3rem; }
}
