/* Basic Design Tokens & CSS Variables */
:root {
    --bg-dark: #090d16;
    --card-bg: rgba(17, 24, 39, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Neon Gradients */
    --accent-red: #ff3366;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    
    --grad-primary: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-purple) 100%);
    --grad-secondary: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    --grad-glow: 0 0 20px rgba(139, 92, 246, 0.3);
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 2rem 1rem;
}

/* Ambient glow backgrounds */
.glow-bg-1 {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
    animation: float 20s ease-in-out infinite alternate;
}

.glow-bg-2 {
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
    animation: float 25s ease-in-out infinite alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 800px;
    z-index: 10;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.8rem;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(255, 51, 102, 0.3));
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.gradient-text {
    background: var(--grad-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-tag {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Main glass card */
.main-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    transition: var(--transition-smooth);
}

.main-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Search bar styling */
.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .search-container {
        flex-direction: column;
    }
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0 0.5rem 0 1.25rem;
    transition: var(--transition-smooth);
}

.input-wrapper:focus-within {
    border-color: var(--accent-purple);
    box-shadow: var(--grad-glow);
}

.input-yt-icon {
    font-size: 1.25rem;
    color: var(--accent-red);
    margin-right: 0.75rem;
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 1rem 0;
    width: 100%;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.icon-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.icon-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: scale(1.05);
}

/* Buttons */
.btn-primary {
    background: var(--grad-primary);
    border: none;
    outline: none;
    color: #white;
    color: white;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.2);
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 51, 102, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: var(--grad-secondary);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
    transform: translateY(-1px);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.btn-text:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.btn-block {
    width: 100%;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top: 2.5px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* Error Banner */
.error-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: #ef4444;
    font-size: 0.95rem;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Skeleton Loading state */
.skeleton-loader {
    display: flex;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 16px;
    animation: pulse 1.5s infinite ease-in-out;
}

@media (max-width: 600px) {
    .skeleton-loader {
        flex-direction: column;
    }
}

.skeleton-thumb {
    width: 180px;
    height: 101px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.skeleton-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

.skeleton-line {
    height: 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.skeleton-title {
    width: 80%;
    height: 20px;
}

.skeleton-channel {
    width: 40%;
}

.skeleton-meta {
    width: 25%;
}

.skeleton-tabs {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.skeleton-tab {
    width: 100px;
    height: 35px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Video Info Card styling */
.video-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
    animation: fadeInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.video-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .video-info {
        flex-direction: column;
    }
}

.thumbnail-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    width: 200px;
    height: 112px;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
    .thumbnail-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.thumbnail-wrapper:hover img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.video-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.uploader-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.verified-badge {
    color: var(--accent-cyan);
    font-size: 0.75rem;
}

.video-views {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-cyan);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--grad-secondary);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Formats Grid / Panels */
.format-panel {
    display: none;
}

.format-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.formats-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.format-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.format-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.format-info-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.format-badge {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
}

.format-badge.video {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.format-badge.audio {
    background: rgba(255, 51, 102, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.format-details-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.format-quality {
    font-weight: 600;
    font-size: 0.95rem;
}

.format-size-est {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.download-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* Features Grid */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.feature-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.25rem auto;
    font-size: 1.3rem;
}

.feature-icon-wrapper.cyan {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
}

.feature-icon-wrapper.purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

.feature-icon-wrapper.pink {
    background: rgba(255, 51, 102, 0.1);
    color: var(--accent-red);
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Footer styling */
footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 1rem 0;
}

.footer-link {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.footer-link:hover {
    color: var(--accent-purple);
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

/* Modals & Progress Overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 12, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.25s ease;
}

.modal-card {
    background: #0f1626;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 2rem;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.modal-headline {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-video-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Progress bar inside modal */
.progress-container {
    margin-bottom: 1.5rem;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar-fill {
    height: 100%;
    background: var(--grad-secondary);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.6);
    border-radius: 50px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
}

.progress-percentage {
    color: var(--accent-cyan);
}

.progress-speed {
    color: var(--text-secondary);
}

/* Detail Stats Grid inside Modal */
.detail-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
}

@media (max-width: 480px) {
    .detail-stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.text-glow {
    color: var(--accent-purple);
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

/* Modal states overrides */
.text-center {
    text-align: center;
}

.success-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.25rem auto;
}

.success-check-icon {
    font-size: 2.2rem;
    color: var(--accent-green);
}

.success-msg {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.failed-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.25rem auto;
}

.failed-x-icon {
    font-size: 2.2rem;
    color: #ef4444;
}

.failed-msg {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.mt-3 { margin-top: 1rem; }
.mt-2 { margin-top: 0.75rem; }
.mt-8 { margin-top: 2rem; }

/* Support Button in Header */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

@media (max-width: 480px) {
    .header-right {
        gap: 0.5rem;
    }
    #support-btn span {
        display: none;
    }
}

.btn-support {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: #f43f5e;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    transition: var(--transition-smooth);
}

.btn-support i {
    animation: heartbeat 1.5s infinite ease-in-out;
}

.btn-support:hover {
    background: #f43f5e;
    color: white;
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
    transform: translateY(-1px);
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Warning Banner for Playlists */
.warning-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: #f59e0b;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: fadeIn 0.4s ease;
}

.warning-icon {
    font-size: 1.1rem;
}

/* Abort Button in Modal */
.modal-footer-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.btn-cancel-action {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.btn-cancel-action:hover {
    background: #ef4444;
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Legal Cards/Modal Styles */
.legal-card {
    max-width: 600px !important;
}

.legal-body {
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding-right: 0.75rem;
    text-align: left;
}

/* Custom Scrollbar for Legal Body */
.legal-body::-webkit-scrollbar {
    width: 6px;
}

.legal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.legal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.legal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.legal-body h4 {
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
}

.legal-body p {
    margin-bottom: 0.75rem;
}

.legal-body ul {
    margin-bottom: 0.75rem;
    padding-left: 1.25rem;
}

.legal-body li {
    margin-bottom: 0.25rem;
}

/* Support Modal Styles (Minimalist Floating Layout) */
.support-qr-container {
    position: relative;
    width: 90%;
    max-width: 440px; /* Perfect desktop display size */
    display: inline-block;
    animation: zoomIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Ultra-smooth easeOutExpo */
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.support-qr-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
    transition: var(--transition-smooth);
}

.support-qr-img:hover {
    transform: scale(1.02);
}

.support-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(15, 22, 38, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.support-close-btn:hover {
    background: var(--accent-red);
    border-color: transparent;
    color: white;
    transform: scale(1.1) rotate(90deg);
}

@media (max-width: 540px) {
    .support-close-btn {
        top: -10px;
        right: -10px;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* Smooth Closing Transitions */
.modal-overlay.fade-out {
    animation: fadeOut 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-overlay.fade-out .support-qr-container {
    animation: zoomOut 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes zoomOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
}

/* Ad Placeholder Styles */
.ad-slot {
    background: rgba(15, 22, 38, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
    margin: 1.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ad-badge {
    position: absolute;
    top: 4px;
    left: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 90px;
    color: var(--text-muted);
}

.ad-placeholder-content i {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.25);
}

.ad-placeholder-content p {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Specific Slot Resizing */
.banner-main {
    min-height: 90px;
}

.banner-details {
    min-height: 90px;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.banner-modal {
    min-height: 70px;
    margin: 1.25rem 0 0 0;
    background: rgba(0, 0, 0, 0.2);
}
