/* ====== CSS Variables & Reset ====== */
:root {
    /* DARK MODE (Default) */
    --primary: #00f2ea;
    --primary-dark: #00c2bb;
    --secondary: #00a8ff;
    /* Blue instead of Purple */
    --accent: #00f2ea;
    /* Cyan instead of Pink */

    --bg-dark: #0b1120;
    /* Deep Blue/Slate */
    --bg-card: rgba(30, 41, 59, 0.7);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border: rgba(255, 255, 255, 0.1);

    --youtube: #ff0000;
    --tiktok: #00f2ea;

    --success: #00d4aa;
    --error: #ff4757;

    --gradient-1: linear-gradient(135deg, #00f2ea 0%, #00a8ff 100%);
    --gradient-glow: linear-gradient(135deg, rgba(0, 242, 234, 0.3) 0%, rgba(0, 168, 255, 0.3) 100%);

    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 242, 234, 0.15);

    --spot-1: rgba(112, 0, 255, 0.15);
    --spot-2: rgba(0, 242, 234, 0.15);
    --bg-center: rgba(112, 0, 255, 0.1);
    --bg-header: rgba(10, 10, 15, 0.8);

    --arrow-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    --radius: 20px;
    --radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="light"] {
    --primary: #007aff;
    --primary-dark: #0066d6;
    --secondary: #00c6ff;
    --accent: #5856d6;

    --bg-dark: #f5f7fa;
    /* Clean Grey-White background */
    --bg-card: #ffffff;
    /* White card */

    --text-primary: #1e293b;
    /* Slate 800 */
    --text-secondary: #475569;
    /* Slate 600 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --border: #e2e8f0;
    /* Slate 200 */

    --gradient-1: linear-gradient(135deg, #007aff 0%, #00c6ff 100%);
    --gradient-glow: linear-gradient(135deg, rgba(0, 122, 255, 0.2) 0%, rgba(0, 198, 255, 0.2) 100%);

    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
    --shadow-glow: 0 0 15px rgba(0, 122, 255, 0.15);

    --shadow-glow: 0 0 15px rgba(0, 122, 255, 0.15);

    --spot-1: rgba(0, 122, 255, 0.08);
    --spot-2: rgba(0, 198, 255, 0.08);
    --bg-center: rgba(0, 122, 255, 0.05);
    --bg-header: rgba(255, 255, 255, 0.85);

    --arrow-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    /* Override Glass Card for Light Mode */
}

/* Glass Card override for Light Mode needs specific handling in .glass-card via CSS variable usage or separate rule */
[data-theme="light"] .glass-card {
    background: #ffffff !important;
    backdrop-filter: none;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .input-wrapper {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

[data-theme="light"] .format-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .feature-card {
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, var(--spot-1), transparent 25%),
        radial-gradient(circle at 85% 30%, var(--spot-2), transparent 25%);
    background-attachment: fixed;
    transition: background 0.3s ease;
}

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

.bg-gradient {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at center, var(--bg-center) 0%, transparent 60%);
    animation: rotateBg 20s linear infinite;
}

@keyframes rotateBg {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

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

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(50px, -50px) rotate(90deg);
    }

    50% {
        transform: translate(0, 50px) rotate(180deg);
    }

    75% {
        transform: translate(-50px, 0) rotate(270deg);
    }
}

/* ====== Container ====== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ====== Header ====== */
.header {
    padding: 20px 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-dark);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ====== Theme Toggle ====== */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    width: auto;
    /* Auto width */
    height: 38px;
    padding: 0 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Gap text icon */
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
    margin-left: auto;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.theme-text {
    font-size: 0.9rem;
    font-weight: 600;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* ====== Main Content ====== */
.main {
    padding: 60px 0;
}

/* ====== Hero Section ====== */
.hero {
    text-align: center;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    transition: opacity 0.5s ease;
}

[data-theme="light"] .stats-badge {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
}

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

#total-downloads {
    color: var(--primary);
    font-weight: 700;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
}

/* ====== Promo Banner ====== */
.promo-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 24px 32px;
    background: linear-gradient(135deg, rgba(0, 242, 234, 0.15) 0%, rgba(0, 168, 255, 0.15) 100%);
    border: 2px solid rgba(0, 242, 234, 0.3);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 242, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 242, 234, 0.5);
    }
}

.promo-icon {
    font-size: 3rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.promo-content {
    flex: 1;
}

.promo-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--text-primary);
}

.promo-content p {
    font-size: 1rem;
    margin: 0;
    color: var(--text-secondary);
}

.promo-btn {
    padding: 14px 28px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 242, 234, 0.4);
}

/* ====== Glass Card ====== */
.glass-card {
    background: rgba(25, 25, 40, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* ====== Download Container ====== */
.download-container {
    max-width: 700px;
    margin: 0 auto 80px;
}

/* ====== Tab Buttons ====== */
.tab-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Pulse animation for inactive tabs */
.tab-btn:not(.active) {
    animation: tab-pulse 2s ease-in-out infinite;
}

@keyframes tab-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 242, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 242, 234, 0);
    }
}

/* Ripple effect on click */
.tab-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.tab-btn:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--gradient-1);
    color: var(--bg-dark);
    animation: none;
    box-shadow: 0 4px 15px rgba(0, 242, 234, 0.4);
}

.tab-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.tab-btn:hover .tab-icon {
    transform: scale(1.1);
}

.tab-btn.active .tab-icon {
    animation: icon-bounce 0.5s ease;
}

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

/* ====== Tab Content ====== */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* ====== Download Card ====== */
.download-card {
    padding: 32px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.platform-badge {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-badge.youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.platform-badge.tiktok {
    background: linear-gradient(135deg, #00f2ea 0%, #ff0050 100%);
}

.platform-badge svg {
    width: 28px;
    height: 28px;
    color: white;
}

.card-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ====== Input Group ====== */
.input-group {
    margin-bottom: 24px;
}

.input-wrapper {
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 6px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 242, 234, 0.15);
    background: rgba(0, 0, 0, 0.3);
}

.url-input {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.url-input:focus {
    outline: none;
}

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

.paste-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.paste-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* ====== Quality Selector ====== */
.quality-select {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    /* Space for arrow */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: var(--arrow-icon);
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    transition: var(--transition);
}

.quality-select:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

.quality-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.1);
}

.quality-select option {
    background: #1e1e2e;
    /* Dark fallback */
    color: white;
}

[data-theme="light"] .quality-select {
    background-color: #f1f5f9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

[data-theme="light"] .quality-select:hover {
    background-color: #e2e8f0;
}

[data-theme="light"] .quality-select option {
    background: #ffffff;
    color: var(--text-primary);
}

.video-preview {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.video-preview img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.preview-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ====== Format Selector ====== */
.format-selector {
    margin-bottom: 24px;
}

.format-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.format-options {
    display: flex;
    gap: 12px;
}

.format-option {
    flex: 1;
    cursor: pointer;
}

.format-option input {
    display: none;
}

.format-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.format-card span {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

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

.format-option:hover .format-card {
    border-color: var(--primary);
    background: rgba(0, 212, 170, 0.05);
}

.format-option input:checked+.format-card {
    border-color: var(--primary);
    background: rgba(0, 212, 170, 0.1);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.2);
}

/* ====== Quality Selector ====== */
.quality-selector {
    margin-bottom: 24px;
}

.quality-select {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
}

.quality-select:hover {
    border-color: var(--primary);
}

.quality-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.1);
}

.quality-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
    padding: 12px;
}

/* ====== Download Button ====== */
.download-btn {
    width: 100%;
    padding: 18px 32px;
    background: var(--gradient-1);
    border: none;
    border-radius: var(--radius);
    color: var(--bg-dark);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 212, 170, 0.3);
}

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

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.download-btn.tiktok-btn {
    background: linear-gradient(135deg, #00f2ea 0%, #00d4aa 100%);
}

/* ====== Progress Container ====== */
.progress-container {
    margin-top: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ====== Download Complete ====== */
.download-complete {
    margin-top: 24px;
    padding: 24px;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    text-align: center;
}

.download-complete p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
}

.save-btn {
    padding: 14px 32px;
    background: var(--gradient-1);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--bg-dark);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 170, 0.3);
}

/* ====== Features Section ====== */
.features {
    margin-top: 80px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 32px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ====== Gallery ====== */
.format-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
}

.gallery-container {
    margin: 20px 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.select-all-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.select-all-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item.selected {
    border-color: var(--primary);
}

.gallery-item.selected img {
    transform: scale(0.95);
}

.gallery-overlay {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.gallery-item.selected .gallery-overlay {
    background: var(--primary);
    border-color: var(--primary);
}

.check-icon {
    display: none;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.gallery-item.selected .check-icon {
    display: block;
}

/* Scrollbar for gallery */
.gallery-grid::-webkit-scrollbar {
    width: 6px;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}


/* ====== Footer ====== */
.footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* ====== Toast Notifications ====== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ====== Info Sections ====== */
.info-section {
    margin-bottom: 60px;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.step-card {
    padding: 32px 24px;
    position: relative;
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    color: white;
    /* Clean text color */
    font-weight: 800;
    font-size: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-glow);
}

.step-card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.step-card p {
    color: var(--text-secondary);
}

/* FAQ Grid */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    text-align: left;
}

.faq-item {
    padding: 24px;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .faq-item:hover {
    background: #f8fafc;
}

.faq-item h4 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.faq-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ====== Footer ====== */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 60px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

[data-theme="light"] .footer {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.footer-seo {
    margin-top: 8px !important;
    font-size: 0.85rem !important;
    opacity: 0.7;
    max-width: 600px;
}

/* SEO Content Section */
.seo-content {
    margin-top: 60px;
}

/* AI Summary Styles */
.ai-summary-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.ai-summary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.ai-summary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ai-summary-box {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--primary);
}

.summary-icon {
    font-size: 1.3rem;
}

.summary-title {
    font-size: 1rem;
}

.ai-summary-box p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
    font-size: 0.95rem;
}

[data-theme="light"] .ai-summary-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
}

.seo-text {
    padding: 40px;
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
}

.seo-text h3 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.seo-text h4 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.seo-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1rem;
}

.seo-text ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.seo-text ul li {
    color: var(--text-secondary);
    padding: 8px 0;
    font-size: 1rem;
    line-height: 1.6;
}

.seo-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .seo-text {
        padding: 30px 20px;
    }
    
    .seo-text h3 {
        font-size: 1.5rem;
    }
    
    .seo-text h4 {
        font-size: 1.2rem;
    }
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--primary);
}

.contact-link svg {
    opacity: 0.8;
}

@media (max-width: 480px) {
    .footer-content {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 10px;
    }
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .header .container {
        /* Keep logo and toggle inline */
        flex-direction: row;
        justify-content: space-between;
        gap: 12px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .download-card {
        padding: 24px;
    }

    .format-options {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .video-preview {
        flex-direction: column;
        text-align: center;
    }

    .video-preview img {
        margin-right: 0;
        margin-bottom: 16px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Promo Banner Mobile */
    .promo-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 16px;
    }
    
    .promo-content h3 {
        font-size: 1.1rem;
    }
    
    .promo-content p {
        font-size: 0.9rem;
    }
    
    .promo-btn {
        width: 100%;
    }

    /* Tabs Stacked */
    .tab-switcher {
        flex-direction: row;
        /* Keep row but scrollable if needed */
        overflow-x: auto;
        justify-content: flex-start;
    }

    .tab-btn {
        flex: 1;
        white-space: nowrap;
        padding: 10px;
        font-size: 0.9rem;
    }

    /* Input Stacked */
    .input-wrapper {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 12px;
    }

    .url-input {
        width: 100%;
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 14px 16px;
    }

    .paste-btn {
        width: 100%;
        height: 48px;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-sm);
    }

    [data-theme="light"] .url-input {
        background: #f1f5f9;
        border-color: #e2e8f0;
    }

    [data-theme="light"] .paste-btn {
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
    }

    /* Format Options Stacked */
    .format-option .format-card {
        padding: 12px;
    }

    /* Gallery 2 Cols */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .select-all-btn {
        width: 100%;
        text-align: center;
    }

    /* Large Touch Targets */
    .download-btn {
        padding: 16px;
    }
}