/* ==========================================
   AMANE - Social Media Downloader
   Modern Glassmorphism Design
   ========================================== */

/* ===== CSS Reset & Variables ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --primary-glow: rgba(124, 58, 237, 0.4);
    
    /* Accent Colors */
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    
    /* Background */
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: rgba(18, 18, 42, 0.8);
    --bg-card-solid: #1a1a35;
    --bg-input: rgba(15, 15, 30, 0.9);
    
    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);
    
    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--primary-glow);
    
    /* Radius */
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Base Styles ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ===== Animated Background ===== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

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

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-cyan);
    top: 50%;
    right: -10%;
    animation-delay: -7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-pink);
    bottom: -10%;
    left: 30%;
    animation-delay: -14s;
}

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

.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

/* ===== Particle Canvas ===== */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 780px;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg), 0 0 100px rgba(124, 58, 237, 0.05);
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 2;
    transition: var(--transition-base);
}

.container:hover {
    border-color: var(--border-medium);
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
}

.logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
    animation: iconPulse 3s infinite;
}

@keyframes iconPulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
    }
    50% {
        box-shadow: 0 8px 40px rgba(124, 58, 237, 0.5);
    }
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -1px;
    line-height: 1;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-badge {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 1px;
    animation: badgeGlow 2s infinite;
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(236, 72, 153, 0.3); }
    50% { box-shadow: 0 0 20px rgba(236, 72, 153, 0.6); }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: -0.2px;
}

/* ===== Input Section ===== */
.input-section {
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-subtle);
    position: relative;
    transition: var(--transition-base);
}

.input-section:focus-within {
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.08);
}

.url-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    padding: 4px 4px 4px 16px;
    border: 2px solid var(--border-medium);
    transition: var(--transition-base);
    gap: 4px;
}

.url-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.input-icon-left {
    color: var(--text-muted);
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: var(--transition-base);
}

.url-input-wrapper:focus-within .input-icon-left {
    color: var(--primary-light);
}

.url-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 0.95rem;
    padding: 12px 4px;
    outline: none;
    font-family: inherit;
    min-width: 0;
    letter-spacing: -0.2px;
}

.url-input-wrapper input::placeholder {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 400;
}

.url-input-wrapper input:focus::placeholder {
    color: rgba(100, 116, 139, 0.5);
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 12px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: var(--radius-xs);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.icon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.icon-btn:active {
    transform: scale(0.95);
}

.clear-btn {
    opacity: 0.3;
    pointer-events: none;
    transition: var(--transition-base);
}

.clear-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.clear-btn.visible:hover {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

/* Platform Chips */
.platform-chips {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: default;
    transition: var(--transition-base);
    border: 1px solid transparent;
}

.tiktok-chip {
    background: rgba(255, 0, 80, 0.1);
    color: #ff0050;
    border-color: rgba(255, 0, 80, 0.2);
}

.tiktok-chip:hover {
    background: rgba(255, 0, 80, 0.15);
    border-color: rgba(255, 0, 80, 0.4);
    box-shadow: 0 0 20px rgba(255, 0, 80, 0.15);
}

.instagram-chip {
    background: rgba(225, 48, 108, 0.1);
    color: #e1306c;
    border-color: rgba(225, 48, 108, 0.2);
}

.instagram-chip:hover {
    background: rgba(225, 48, 108, 0.15);
    border-color: rgba(225, 48, 108, 0.4);
    box-shadow: 0 0 20px rgba(225, 48, 108, 0.15);
}

/* Download Button */
.download-btn {
    width: 100%;
    margin-top: 16px;
    padding: 15px 24px;
    background: linear-gradient(135deg, var(--primary), #6d28d9, var(--primary-dark));
    background-size: 200% 200%;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.2px;
    animation: gradientShift 3s ease infinite;
    font-family: inherit;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(124, 58, 237, 0.4);
}

.download-btn:active {
    transform: translateY(0) scale(0.98);
}

.download-btn.loading {
    pointer-events: none;
}

.download-btn.loading .btn-content {
    visibility: hidden;
}

.download-btn.loading .btn-loading {
    display: flex;
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.dot-pulse {
    display: flex;
    gap: 6px;
}

.dot-pulse::before,
.dot-pulse::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: dotPulse 1.2s infinite ease-in-out;
}

.dot-pulse::after {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.2); }
}

/* API Status */
.api-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.status-text {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ===== Status Message ===== */
.status-message {
    text-align: center;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 0.88rem;
    display: none;
    animation: slideInDown 0.4s var(--transition-spring);
    letter-spacing: -0.2px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.status-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ===== Result Section ===== */
.result-section {
    display: none;
    animation: fadeSlideUp 0.6s var(--transition-spring);
}

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

.result-section.active {
    display: block;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-item i {
    font-size: 0.9rem;
}

.stat-item span {
    color: #fff;
    font-weight: 700;
}

.stat-item:first-child i { color: var(--primary-light); }
.stat-item:nth-child(2) i { color: var(--accent-orange); }
.stat-item:last-child i { color: var(--accent-green); }

/* ===== Media Container ===== */
.media-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 20px;
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.video-wrapper:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.video-wrapper video {
    width: 100%;
    max-height: 480px;
    display: block;
    background: #000;
}

.video-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(124, 58, 237, 0.9);
    color: #fff;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

/* Audio Wrapper */
.audio-wrapper {
    background: var(--bg-card-solid);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition-base);
}

.audio-wrapper:hover {
    border-color: var(--border-medium);
}

.audio-icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25);
    animation: audioPulse 3s infinite;
}

@keyframes audioPulse {
    0%, 100% { box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25); }
    50% { box-shadow: 0 8px 30px rgba(249, 115, 22, 0.4); }
}

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

.audio-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 2px;
    letter-spacing: -0.2px;
}

.audio-meta {
    color: var(--text-muted);
    font-size: 0.73rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.audio-wrapper audio {
    flex-shrink: 0;
    max-width: 240px;
    height: 40px;
    border-radius: var(--radius-xs);
}

/* Photo Slideshow */
.photo-slideshow {
    position: relative;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md);
}

.photo-slides-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-slide {
    min-width: 100%;
    position: relative;
}

.photo-slide img {
    width: 100%;
    height: 420px;
    object-fit: contain;
    background: #000;
}

.photo-counter {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    letter-spacing: 0.3px;
}

.slide-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
}

.photo-slideshow:hover .slide-nav-btn {
    opacity: 1;
}

.slide-nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
}

.slide-nav-btn.prev { left: 12px; }
.slide-nav-btn.next { right: 12px; }

.slide-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: var(--bg-card-solid);
}

.slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-strong);
    cursor: pointer;
    transition: var(--transition-base);
}

.slide-dot:hover {
    background: var(--text-muted);
}

.slide-dot.active {
    background: var(--primary);
    width: 32px;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.6);
}

/* No Media */
.no-media {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.no-media i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    opacity: 0.5;
}

.no-media p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.no-media span {
    font-size: 0.8rem;
}

/* ===== Download Actions ===== */
.download-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.action-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-group-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 13px 22px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    letter-spacing: -0.2px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.action-btn:active {
    transform: scale(0.96);
}

.action-btn.btn-video {
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    color: #fff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.action-btn.btn-video:hover {
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
    transform: translateY(-1px);
}

.action-btn.btn-video-sd {
    background: linear-gradient(135deg, #475569, #334155);
    color: #fff;
}

.action-btn.btn-video-sd:hover {
    box-shadow: 0 8px 25px rgba(71, 85, 105, 0.4);
    transform: translateY(-1px);
}

.action-btn.btn-audio {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.action-btn.btn-audio:hover {
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
    transform: translateY(-1px);
}

.action-btn.btn-photo {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.action-btn.btn-photo:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.action-btn.btn-photo-current {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: #fff;
}

.action-btn.btn-photo-current:hover {
    box-shadow: 0 8px 25px rgba(8, 145, 178, 0.5);
    transform: translateY(-1px);
}

.action-btn.btn-copy {
    background: transparent;
    color: #fff;
    border: 1.5px solid var(--border-strong);
    flex: 0 0 auto;
}

.action-btn.btn-copy:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--text-muted);
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.loading-overlay.active {
    display: flex;
}

.loader-content {
    text-align: center;
}

.loader-ring {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    position: relative;
}

.loader-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

.loader-ring::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--accent-cyan);
    animation: spin 1.5s linear infinite reverse;
}

.ring-inner {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.15);
    animation: innerPulse 1.5s ease infinite;
}

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

@keyframes innerPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

.loader-text {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.3px;
}

.loader-subtext {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 6px;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card-solid);
    color: #fff;
    padding: 14px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 10000;
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-lg);
    transition: transform 0.4s var(--transition-spring);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    letter-spacing: -0.2px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.4);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.4);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.footer-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-content p span {
    color: var(--primary-light);
    font-weight: 600;
}

.footer .disclaimer {
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .container {
        padding: 28px 20px;
        border-radius: var(--radius-lg);
        margin-top: 10px;
    }
    
    .logo-text h1 {
        font-size: 1.6rem;
    }
    
    .logo-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    
    .input-section {
        padding: 18px;
    }
    
    .url-input-wrapper input {
        font-size: 0.85rem;
        padding: 10px 2px;
    }
    
    .download-btn {
        font-size: 0.9rem;
        padding: 14px 20px;
    }
    
    .video-wrapper video {
        max-height: 320px;
    }
    
    .photo-slide img {
        height: 300px;
    }
    
    .audio-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }
    
    .audio-wrapper audio {
        max-width: 100%;
        width: 100%;
    }
    
    .action-btn {
        padding: 11px 16px;
        font-size: 0.82rem;
        flex: 1;
        justify-content: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .stats-bar {
        gap: 8px;
        padding: 10px 14px;
    }
    
    .stat-item {
        font-size: 0.72rem;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 20px 14px;
    }
    
    .logo-text h1 {
        font-size: 1.4rem;
    }
    
    .url-input-wrapper {
        padding: 2px 2px 2px 12px;
    }
    
    .url-input-wrapper input {
        font-size: 0.8rem;
    }
    
    .platform-chips {
        gap: 6px;
    }
    
    .chip {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}