/* ═══════════════════════════════════════════════
   Muzi Apps — H5 Download Page Styles
   ═══════════════════════════════════════════════ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f172a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-card-hover: rgba(255, 255, 255, 0.16);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-start: #0891b2;
    --accent-end: #2563eb;
    --accent-glow: rgba(8, 145, 178, 0.25);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ─── Animated Background Orbs ──────────────── */
.bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.2;
    animation: float 25s ease-in-out infinite;
}

.orb-1 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, #0e7490, transparent 70%);
    top: -100px;
    right: -80px;
    animation-delay: 0s;
}

.orb-2 {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, #1d4ed8, transparent 70%);
    bottom: 15%;
    left: -100px;
    animation-delay: -9s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #0891b2, transparent 70%);
    top: 45%;
    right: 15%;
    animation-delay: -16s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 35px) scale(1.02); }
}

/* ─── Header ────────────────────────────────── */
.header {
    position: relative;
    z-index: 1;
    padding: 48px 20px 32px;
    text-align: center;
}

.header-inner {
    max-width: 480px;
    margin: 0 auto;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    box-shadow: 0 6px 24px var(--accent-glow);
    margin-bottom: 16px;
}

.logo-mark svg {
    width: 30px;
    height: 30px;
}

.site-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.site-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ─── Main Content ──────────────────────────── */
.main {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* ─── Loading State ─────────────────────────── */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent-start);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ─── App List ──────────────────────────────── */
.app-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ─── App Card ──────────────────────────────── */
.app-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    animation: cardIn 0.5s ease forwards;
}

.app-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

@keyframes cardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-logo {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #334155);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.app-info {
    flex: 1;
    min-width: 0;
}

.app-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-download-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.app-download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 18px var(--accent-glow);
}

.app-download-btn:active {
    transform: scale(0.97);
}

/* ─── Empty State ───────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 80px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ─── Footer ────────────────────────────────── */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 24px 16px 40px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ─── Responsive ────────────────────────────── */
@media (min-width: 768px) {
    .header {
        padding-top: 64px;
    }

    .main {
        max-width: 560px;
    }

    .site-title {
        font-size: 2rem;
    }

    .app-card {
        padding: 20px;
    }

    .app-logo {
        width: 64px;
        height: 64px;
    }
}

@media (min-width: 1024px) {
    .main {
        max-width: 640px;
    }
}
