/* ============================================
   BENZ DOWNLOAD-PORTAL — Styles
   ============================================ */

/* ── RESET & VARIABLEN ─────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --accent: #df6f25;
    --accent-dark: #b9551a;
    --success: #22c55e;
    --success-dark: #16a34a;
    --error: #ef4444;
    --glass-bg: rgba(12, 13, 18, 0.84);
    --glass-border: rgba(255, 255, 255, 0.11);
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100vw; }

body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    background-color: #0a0a0f;
}
.portal-legal-footer {
    width: 100%;
    flex-shrink: 0;
    opacity: 0.86;
}

.mono { font-family: 'JetBrains Mono', monospace; }

/* ── CUSTOM SCROLLBAR ──────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(234, 179, 8, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(234, 179, 8, 0.5);
}

/* ── PAGE TRANSITION ───────────────────────── */
.page-loader {
    position: fixed;
    inset: 0;
    background: #0a0a0f;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-ring {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(234, 179, 8, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ── BACKGROUND ────────────────────────────── */
.bg-image {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -3;
    transition: transform 0.1s ease-out;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(160deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.65) 100%);
    z-index: -2;
}
.is-authenticated-page .bg-overlay {
    background:
        radial-gradient(circle at center, rgba(0,0,0,0.34) 0%, rgba(0,0,0,0.62) 46%, rgba(0,0,0,0.78) 100%),
        linear-gradient(160deg, rgba(0,0,0,0.76) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.78) 100%);
}

/* ── AURORA OVERLAY ────────────────────────── */
.aurora-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(234,179,8,0.08), transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(168,85,247,0.06), transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 80%, rgba(34,197,94,0.05), transparent 50%);
    animation: auroraShift 15s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}

@keyframes auroraShift {
    0% {
        background:
            radial-gradient(ellipse 80% 50% at 20% 40%, rgba(234,179,8,0.08), transparent 50%),
            radial-gradient(ellipse 60% 40% at 80% 60%, rgba(168,85,247,0.06), transparent 50%),
            radial-gradient(ellipse 50% 30% at 50% 80%, rgba(34,197,94,0.05), transparent 50%);
    }
    50% {
        background:
            radial-gradient(ellipse 70% 60% at 70% 30%, rgba(234,179,8,0.1), transparent 50%),
            radial-gradient(ellipse 50% 50% at 30% 70%, rgba(168,85,247,0.08), transparent 50%),
            radial-gradient(ellipse 60% 40% at 60% 50%, rgba(34,197,94,0.06), transparent 50%);
    }
    100% {
        background:
            radial-gradient(ellipse 60% 40% at 40% 60%, rgba(234,179,8,0.12), transparent 50%),
            radial-gradient(ellipse 80% 50% at 60% 40%, rgba(168,85,247,0.07), transparent 50%),
            radial-gradient(ellipse 40% 60% at 80% 70%, rgba(34,197,94,0.08), transparent 50%);
    }
}

/* ── NOISE TEXTURE ─────────────────────────── */
.noise-overlay {
    position: fixed;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none !important;
    z-index: 1;
    user-select: none;
}

/* ── CANVAS PARTICLES ──────────────────────── */
#particle-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.58;
}

/* ── GLASS CARD ────────────────────────────── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 25px 50px -12px rgba(0,0,0,0.8),
        0 0 0 1px rgba(255,255,255,0.05),
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 0 80px -20px rgba(234,179,8,0.15);
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(234,179,8,0.2), transparent 40%, transparent 60%, rgba(168,85,247,0.15));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.glass-card:hover::before { opacity: 1; }
.download-shell {
    background: rgba(9, 10, 15, 0.91);
    border-color: rgba(255,255,255,0.14);
    box-shadow:
        0 30px 70px -24px rgba(0,0,0,0.95),
        0 0 0 1px rgba(255,255,255,0.06),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ── ICON CONTAINER ────────────────────────── */
.icon-container { position: relative; }
.icon-container::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(234,179,8,0.3), transparent 50%) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ringRotate 10s linear infinite;
}
@keyframes ringRotate { to { transform: rotate(360deg); } }

/* ── GRADIENT TEXT ──────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text-success {
    background: linear-gradient(135deg, #22c55e 0%, #4ade80 50%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── INPUT FIELD ───────────────────────────── */
.input-field {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s var(--transition);
}
.input-field:focus {
    background: rgba(0,0,0,0.7);
    border-color: rgba(234,179,8,0.6);
    box-shadow: 0 0 0 4px rgba(234,179,8,0.12), 0 0 30px rgba(234,179,8,0.15), inset 0 0 20px rgba(234,179,8,0.03);
    outline: none;
}
.input-field::placeholder { color: rgba(156,163,175,0.5); }

.input-wrapper { position: relative; }
.input-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    opacity: 0;
    background: linear-gradient(135deg, rgba(234,179,8,0.4), rgba(234,179,8,0.1));
    filter: blur(20px);
    transition: opacity 0.3s ease;
    z-index: -1;
}
.input-wrapper:focus-within::after { opacity: 0.5; }

/* ── BUTTONS ───────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, #df6f25 0%, #b9551a 50%, #df6f25 100%);
    background-size: 200% 200%;
    transition: all 0.3s var(--transition);
    position: relative;
    overflow: hidden;
    animation: gradientShift 3s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px -12px rgba(223,111,37,0.6), 0 0 30px rgba(223,111,37,0.2);
}
.btn-primary:active:not(:disabled) { transform: translateY(-1px) scale(1.01); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; animation: none; }
.btn-primary:focus-visible { outline: 2px solid #df6f25; outline-offset: 3px; }

.btn-download {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #22c55e 100%);
    background-size: 200% 200%;
    transition: all 0.3s var(--transition);
    position: relative;
    overflow: hidden;
}
.btn-download::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}
.btn-download:hover::before { left: 100%; }
.btn-download:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px -12px rgba(34,197,94,0.6), 0 0 30px rgba(34,197,94,0.2);
}
.btn-download:active { transform: translateY(-1px) scale(1.01); }
.btn-download:focus-visible { outline: 2px solid #22c55e; outline-offset: 3px; }
.btn-download svg { transition: transform 0.3s ease; }
.btn-download:hover svg { animation: downloadBounce 0.6s ease infinite; }

@keyframes downloadBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* ── ZIP BUTTON ────────────────────────────── */
.btn-zip {
    background: rgba(223,111,37,0.11);
    border: 1px solid rgba(223,111,37,0.32);
    color: rgba(255,215,188,0.92);
    transition: all 0.3s ease;
}
.btn-zip:hover {
    background: rgba(223,111,37,0.2);
    border-color: rgba(223,111,37,0.5);
    color: #fff2e8;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(223,111,37,0.4);
}
.btn-zip span { color: rgba(255,215,188,0.62); }

/* ── CAPS WARNING ──────────────────────────── */
.caps-warning {
    background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(251,191,36,0.05));
    border: 1px solid rgba(251,191,36,0.3);
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── ERROR MESSAGE ─────────────────────────── */
.error-message {
    background: linear-gradient(135deg, rgba(239,68,68,0.12) 0%, rgba(239,68,68,0.05) 100%);
    border: 1px solid rgba(239,68,68,0.25);
    position: relative;
    overflow: hidden;
}
.error-message::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

/* ── PASSWORD TOGGLE ───────────────────────── */
.password-toggle { transition: all 0.2s ease; }
.password-toggle:hover { color: rgba(234,179,8,0.8); }
.password-toggle:focus-visible {
    outline: 2px solid rgba(234,179,8,0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── SPINNER ───────────────────────────────── */
.spinner {
    width: 20px; height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
}

/* ── FILE BADGE ────────────────────────────── */
.file-badge {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
}
.file-badge:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

/* ── DOWNLOAD ITEMS ────────────────────────── */
.download-item {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
    background: rgba(255,255,255,0.075);
    border: 1px solid rgba(255,255,255,0.13);
    transition: all 0.2s ease;
}
.download-item:hover {
    transform: translateX(3px);
    background: rgba(255,255,255,0.105);
    box-shadow: 0 12px 28px -16px rgba(223,111,37,0.34), inset 0 0 15px rgba(223,111,37,0.03);
}
.download-item-inner { min-height: 76px; }
.download-meta-strip {
    color: rgba(229,231,235,0.66);
    font-size: 0.8125rem;
    line-height: 1.4;
}
.download-meta-dot { color: rgba(229,231,235,0.22); }
.download-type-badge,
.file-type-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
}
.download-type-badge {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(229,231,235,0.72);
}
.download-file-title {
    color: rgba(255,255,255,0.94);
    font-size: 0.96rem;
    font-weight: 650;
    line-height: 1.35;
    transition: color 0.2s ease;
}
.download-item:hover .download-file-title { color: #fff4eb; }
.file-meta-row { flex-wrap: wrap; }
.file-size-text {
    color: rgba(209,213,219,0.66);
    font-size: 0.78rem;
}
.sha-button {
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.07);
    color: rgba(209,213,219,0.46);
    cursor: pointer;
    font-size: 0.64rem;
    transition: color 0.2s ease, background 0.2s ease;
}
.sha-button:hover {
    background: rgba(255,255,255,0.09);
    color: rgba(255,255,255,0.72);
}
.preview-action {
    background: rgba(255,255,255,0.075);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(231,236,244,0.82);
}
.preview-action:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.18);
    color: #fff;
}
.preview-action-secondary { color: rgba(209,213,219,0.74); }
.download-action {
    background: rgba(223,111,37,0.13);
    border: 1px solid rgba(223,111,37,0.18);
}
.download-action svg { color: #f08a3c; }
.download-action:hover {
    background: #df6f25;
    border-color: #df6f25;
    transform: translateY(-1px);
}
.download-action:hover svg { color: white; }
.youtube-row:hover { border-color: rgba(239,68,68,0.28); }
.download-item:nth-child(1) { animation-delay: 0.05s; }
.download-item:nth-child(2) { animation-delay: 0.1s; }
.download-item:nth-child(3) { animation-delay: 0.15s; }
.download-item:nth-child(4) { animation-delay: 0.2s; }
.download-item:nth-child(5) { animation-delay: 0.25s; }
.download-item:nth-child(6) { animation-delay: 0.3s; }

/* ── LOCKOUT ───────────────────────────────── */
.lockout-warning {
    background: linear-gradient(135deg, rgba(239,68,68,0.15) 0%, rgba(239,68,68,0.05) 100%);
    border: 1px solid rgba(239,68,68,0.3);
}

/* ── PREVIEW BUTTON ────────────────────────── */
.btn-preview {
    background: rgba(234,179,8,0.1);
    border: 1px solid rgba(234,179,8,0.25);
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-preview:hover {
    background: rgba(234,179,8,0.25);
    border-color: rgba(234,179,8,0.5);
    transform: scale(1.05);
}

/* ── AUDIO PLAYER (INLINE) ─────────────────── */
.audio-player {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 10px;
    animation: slideDown 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 12px;
}

.audio-play-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.audio-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(234,179,8,0.4);
}
.audio-play-btn svg { width: 16px; height: 16px; fill: #000; }

.audio-progress-wrap {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.audio-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}
.audio-progress-bar::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(234,179,8,0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.audio-progress-wrap:hover .audio-progress-bar::after { opacity: 1; }

.audio-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    min-width: 75px;
    text-align: right;
}

.audio-volume {
    width: 60px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}
.audio-volume-bar {
    height: 100%;
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
    width: 80%;
}

/* ── VIDEO PLAYER MODAL ────────────────────── */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    will-change: opacity;
}
.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.95);
}

.video-container {
    position: relative;
    width: 98vw;
    max-width: 98vw;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 120px rgba(234,179,8,0.08);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.2s var(--transition);
    will-change: transform;
}
.video-modal.active .video-container {
    transform: scale(1) translateY(0);
}

.video-container video {
    width: 100%;
    display: block;
    max-height: 96vh;
    object-fit: contain;
    background: #000;
    outline: none;
}

/* Video Close Button */
.video-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}
.video-close:hover {
    background: rgba(239,68,68,0.6);
    transform: scale(1.1) rotate(90deg);
}

/* Video Big Play Button Overlay */
.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: opacity 0.3s ease;
}
.video-play-overlay.hidden { opacity: 0; pointer-events: none; }

.video-play-big {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(234,179,8,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 60px rgba(234,179,8,0.5);
    transition: all 0.3s ease;
}
.video-play-big:hover {
    transform: scale(1.1);
    box-shadow: 0 0 80px rgba(234,179,8,0.7);
}
.video-play-big svg { width: 32px; height: 32px; fill: #000; margin-left: 4px; }

/* Video Controls Bar */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    padding: 12px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 6;
}
.video-container:hover .video-controls,
.video-controls.visible { opacity: 1; }

.video-controls button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 4px;
}
.video-controls button:hover { color: var(--accent); transform: scale(1.15); }
.video-controls button svg { width: 22px; height: 22px; }

/* Video Seekbar */
.video-seekbar {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: visible;
}
.video-seekbar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    border-radius: 3px;
    width: 0%;
    position: relative;
}
.video-seekbar-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(234,179,8,0.6);
    transition: transform 0.2s ease;
}
.video-seekbar:hover .video-seekbar-fill::after {
    transform: translateY(-50%) scale(1);
}

.video-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
}

/* Video Fullscreen */
.video-container:fullscreen,
.video-container:-webkit-full-screen {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    background: #000;
}
.video-container:fullscreen video,
.video-container:-webkit-full-screen video {
    max-height: 100vh !important;
    max-height: 100dvh !important;
    height: 100% !important;
    width: 100% !important;
    object-fit: contain !important;
}
.video-container:fullscreen .video-close,
.video-container:-webkit-full-screen .video-close {
    display: none;
}
.video-container:fullscreen .video-controls,
.video-container:-webkit-full-screen .video-controls {
    padding: 16px 24px;
}
.video-container:fullscreen .video-play-big,
.video-container:-webkit-full-screen .video-play-big {
    width: 100px;
    height: 100px;
}
.video-container:fullscreen .video-play-big svg,
.video-container:-webkit-full-screen .video-play-big svg {
    width: 44px;
    height: 44px;
}

/* Video Volume */
.video-volume-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.video-volume-slider {
    width: 70px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}
.video-volume-fill {
    height: 100%;
    background: rgba(255,255,255,0.6);
    border-radius: 2px;
    width: 80%;
}

/* ── TOAST NOTIFICATIONS ───────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: rgba(15,15,20,0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    animation: toastIn 0.4s var(--transition) forwards;
    max-width: 340px;
}
.toast.removing {
    animation: toastOut 0.3s ease forwards;
}
.toast-icon {
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.toast-icon.success { background: rgba(34,197,94,0.2); color: #22c55e; }
.toast-icon.info    { background: rgba(234,179,8,0.2); color: #eab308; }
.toast-icon.error   { background: rgba(239,68,68,0.2); color: #ef4444; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to   { opacity: 0; transform: translateX(40px) scale(0.95); }
}

/* ── TYPEWRITER CURSOR ─────────────────────── */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: currentColor;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.8s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ── DOWNLOAD COUNTER BADGE ────────────────── */
.counter-badge {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}
.counter-badge svg { width: 10px; height: 10px; }
.download-item:hover .counter-badge {
    background: rgba(34,197,94,0.1);
    border-color: rgba(34,197,94,0.2);
    color: rgba(34,197,94,0.6);
}

/* ── LOGOUT BUTTON ─────────────────────────── */
.btn-logout {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
}
.btn-logout:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.3);
    color: #ef4444;
}

/* ── KEYBOARD HINT ─────────────────────────── */
.kbd-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: rgba(255,255,255,0.46);
}
@media (max-width: 640px) {
    .kbd-hint { display: none; }
}
.kbd {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
}

/* ── READABILITY POLISH ────────────────────── */
.project-login-kicker {
    margin-bottom: 0.5rem;
    color: rgba(250,204,21,0.82);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.project-login-title {
    margin-bottom: 0.75rem;
    font-size: clamp(1.65rem, 2.4vw, 2.25rem);
    line-height: 1.15;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.project-login-copy {
    color: rgba(229,231,235,0.78);
    font-size: 1rem;
    line-height: 1.65;
}
.download-summary,
.project-footer-note {
    color: rgba(209,213,219,0.62);
    font-size: 0.8125rem;
    line-height: 1.5;
}
.project-footer-note {
    color: rgba(209,213,219,0.54);
}
.project-secure-note {
    flex-wrap: wrap;
    color: rgba(209,213,219,0.6);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* ── ANIMATIONS ────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); filter: blur(10px); }
    to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 25px rgba(34,197,94,0.35), 0 15px 40px -12px rgba(34,197,94,0.4); }
    50%      { box-shadow: 0 0 45px rgba(34,197,94,0.5), 0 15px 40px -12px rgba(34,197,94,0.6); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes successPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.animate-fade-in   { animation: fadeInUp 0.6s var(--transition) forwards; }
.animate-pulse-glow { animation: pulse-glow 2.5s ease-in-out infinite; }
.animate-shake     { animation: shake 0.5s var(--transition); }
.animate-success   { animation: successPop 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards; }
.animate-spin      { animation: spin 1s linear infinite; }
.animate-icon-pulse { animation: iconPulse 2s ease-in-out infinite; }

/* ── RESPONSIVE ────────────────────────────── */
@media (max-width: 640px) {
    /* Touch targets */
    .touch-target { min-height: 48px; }
    
    /* Body padding */
    body { padding: 10px !important; }
    
    /* Glass card */
    body > .glass-card,
    body > main > .glass-card { border-radius: 16px !important; }
    
    /* Download items — gut lesbar auf Mobile */
    .download-item .flex { gap: 10px !important; padding: 12px !important; }
    .download-item h3 { font-size: 14px !important; white-space: normal !important; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    
    /* File icons — alle Größen abfangen */
    .download-item .flex-shrink-0[class*="w-8"],
    .download-item .flex-shrink-0[class*="w-9"],
    .download-item .flex-shrink-0[class*="w-10"],
    .download-item .flex-shrink-0[class*="w-11"] { width: 42px !important; height: 42px !important; min-width: 42px !important; border-radius: 12px !important; }
    .download-item .flex-shrink-0[class*="w-8"] svg,
    .download-item .flex-shrink-0[class*="w-9"] svg,
    .download-item .flex-shrink-0[class*="w-10"] svg,
    .download-item .flex-shrink-0[class*="w-11"] svg { width: 20px !important; height: 20px !important; }
    .download-item .flex-shrink-0[class*="w-8"] img,
    .download-item .flex-shrink-0[class*="w-9"] img,
    .download-item .flex-shrink-0[class*="w-10"] img,
    .download-item .flex-shrink-0[class*="w-11"] img { width: 42px !important; height: 42px !important; }
    
    /* Download button */
    .download-item a.rounded-full { width: 42px !important; height: 42px !important; min-width: 42px !important; }
    .download-item a.rounded-full svg { width: 20px !important; height: 20px !important; }
    
    /* Preview buttons — Icon-only auf Mobile aber größer */
    .download-item button[data-video-preview],
    .download-item button[data-audio-preview],
    .download-item button[data-image-preview] {
        padding: 8px !important;
        font-size: 0 !important;
        gap: 0 !important;
        border-radius: 10px !important;
    }
    .download-item button[data-video-preview] svg,
    .download-item button[data-audio-preview] svg,
    .download-item button[data-image-preview] svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    /* Extension badge + file size */
    .download-item .flex-grow .flex span { font-size: 11px !important; }
    
    /* Audio player */
    .audio-player { flex-wrap: wrap; gap: 8px; }
    .audio-volume { display: none; }
    .audio-time { min-width: auto; font-size: 11px; }
    
    /* Video modal */
    .video-container { width: 100% !important; border-radius: 12px !important; }
    .video-container video { max-height: 50vh !important; }
    .video-close { width: 40px !important; height: 40px !important; top: 10px !important; right: 10px !important; }
    .video-close svg { width: 22px !important; height: 22px !important; }
    .video-controls { padding: 10px 12px !important; gap: 8px !important; }
    .video-controls button svg { width: 20px !important; height: 20px !important; }
    .video-volume-wrap { display: none; }
    .video-time { font-size: 11px !important; }
    .video-play-big { width: 64px !important; height: 64px !important; }
    .video-play-big svg { width: 28px !important; height: 28px !important; }
    .video-ctrl-pip { display: none !important; }
    
    /* Fullscreen muss mobile-Limits aufheben */
    .video-container:fullscreen video,
    .video-container:-webkit-full-screen video {
        max-height: 100vh !important;
        max-height: 100dvh !important;
        height: 100% !important;
        width: 100% !important;
    }
    .video-container:fullscreen,
    .video-container:-webkit-full-screen {
        border-radius: 0 !important;
    }
    
    /* Toast */
    .toast-container { bottom: 12px; right: 12px; left: 12px; }
    .toast { max-width: 100%; font-size: 13px; padding: 12px 16px; }
    
    /* Icon container (Login-Seite Lock-Icon) */
    .icon-container { width: 60px !important; height: 60px !important; }
    .icon-container svg { width: 28px !important; height: 28px !important; }
    
    /* ZIP download */
    .btn-zip { font-size: 13px !important; padding: 10px 14px !important; }
    
    /* Login form */
    .input-field { font-size: 16px !important; } /* Prevents iOS zoom on focus */
    
    /* Image modal */
    #image-modal img { max-height: 75vh !important; }
    #image-modal-title { font-size: 13px !important; }
    
    /* Download-Liste Abstände */
    .space-y-3 > .download-item + .download-item { margin-top: 10px; }
}

/* Small phones */
@media (max-width: 380px) {
    body { padding: 6px !important; }
    .download-item .flex { padding: 10px !important; gap: 8px !important; }
    .download-item h3 { font-size: 13px !important; }
}

/* ── LANDING PAGE MOBILE ──────────────────── */
@media (max-width: 640px) {
    .hero-glow { width: 280px !important; height: 280px !important; top: -60px !important; }
    .feature-icon { width: 40px !important; height: 40px !important; border-radius: 10px !important; }
    .feature-icon svg { width: 18px !important; height: 18px !important; }
    .landing-card { padding: 16px !important; border-radius: 12px !important; }
    .float-anim img { height: 64px !important; }
}

/* ── IMAGE MODAL MOBILE ───────────────────── */
@media (max-width: 640px) {
    #image-modal .absolute.inset-0.flex { padding: 8px !important; }
    #image-modal img { border-radius: 8px !important; }
    #image-modal button.absolute { width: 36px !important; height: 36px !important; top: 8px !important; right: 8px !important; }
    #image-modal button.absolute svg { width: 20px !important; height: 20px !important; }
    #image-modal-title { font-size: 11px !important; top: 10px !important; left: 10px !important; max-width: 60% !important; }
}

/* ── ACCESSIBILITY ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .aurora-overlay, #particle-canvas { display: none !important; }
    .glass-card { animation: none !important; }
    .page-loader { display: none !important; }
}

/* ── DARK MODE EXTRA ───────────────────────── */
@media (prefers-color-scheme: dark) {
    .glass-card { background: rgba(10,10,15,0.85); }
}
