/* ===== CSS Variables ===== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.4);
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: rgba(0, 0, 0, 0.03);
    --bg-card-hover: rgba(0, 0, 0, 0.06);
    
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    
    --border-color: rgba(0, 0, 0, 0.1);
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
    will-change: transform;
    transform: translateZ(0);
}

/* Reduce animations on mobile for better performance */
@media (max-width: 768px) {
    .gradient-orb {
        animation-duration: 30s;
        filter: blur(60px);
        opacity: 0.2;
    }
}

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

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--gradient-secondary);
    bottom: -200px;
    right: -200px;
    animation-delay: 7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--gradient-accent);
    top: 50%;
    left: 50%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes glow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: var(--transition);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.8);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo i {
    font-size: 1.8rem;
    -webkit-text-fill-color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-direction: column;
    gap: 4px;
    padding: 0;
}

.mobile-menu-toggle i {
    display: block !important;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.mobile-menu-toggle i::before,
.mobile-menu-toggle i::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: var(--transition);
    left: 0;
}

.mobile-menu-toggle i::before {
    top: -7px;
}

.mobile-menu-toggle i::after {
    top: 7px;
}

.mobile-menu-toggle.active i {
    background: transparent !important;
}

.mobile-menu-toggle.active i::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active i::after {
    transform: rotate(-45deg);
    top: 0;
}

.mobile-menu-toggle:hover {
    background: var(--bg-card-hover);
    transform: scale(1.05);
}

.mobile-menu-toggle.active {
    background: var(--primary-color);
    color: white;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    transform: rotate(20deg);
}

/* ===== Hero Section ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease, glow 3s ease-in-out infinite;
    letter-spacing: -0.02em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    will-change: transform;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.2s both;
    line-height: 1.7;
}

/* ===== Download Card ===== */
.download-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    animation: fadeInUp 0.8s ease 0.4s both;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    will-change: transform;
    transform: translateZ(0);
}

.download-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-xl), 0 15px 50px rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.3);
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 20px;
    color: var(--text-secondary);
    font-size: 1.2rem;
    z-index: 1;
}

.url-input {
    width: 100%;
    padding: 18px 60px 18px 55px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

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

.paste-btn {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1;
}

.paste-btn:hover {
    background: var(--bg-card);
    color: var(--primary-color);
}

.download-btn-primary {
    padding: 18px 40px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    white-space: nowrap;
}

.download-btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 35px rgba(99, 102, 241, 0.7);
}

.download-btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

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

/* Download Another Option */
.download-another-option {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.download-another-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.download-another-label:hover {
    opacity: 0.8;
}

.download-another-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-card);
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.download-another-label input[type="checkbox"]:checked + .checkmark {
    background: var(--gradient-primary);
    border-color: transparent;
}

.download-another-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.label-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.label-text i {
    color: var(--primary-color);
}

.download-another-label input[type="checkbox"]:checked ~ .label-text {
    color: var(--text-primary);
}

.platform-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--success-color);
    font-weight: 500;
    padding: 10px 15px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    margin-top: 1rem;
    animation: slideIn 0.3s ease;
}

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

/* ===== Platforms Grid ===== */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.platform-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-8px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
}

.platform-card:active {
    transform: translateY(-3px) scale(1.02);
}

.platform-card i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.platform-card:nth-child(1) i { color: #ff0000; }
.platform-card:nth-child(2) i { color: #e4405f; }
.platform-card:nth-child(3) i { color: #000000; }
.platform-card:nth-child(4) i { color: #1da1f2; }
.platform-card:nth-child(5) i { color: #1877f2; }
.platform-card:nth-child(6) i { color: #1ab7ea; }

.platform-card span {
    display: block;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 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;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: calc(90vh - 140px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-tertiary);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.video-preview {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.preview-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.option-group label i {
    color: var(--primary-color);
}

.option-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-tertiary);
}

.option-buttons::-webkit-scrollbar {
    height: 6px;
}

.option-buttons::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.option-buttons::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.option-buttons::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.option-btn[data-quality="4K"] {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    font-weight: 700;
    border: none;
    position: relative;
}

.option-btn[data-quality="4K"]::before {
    content: '⭐';
    margin-right: 4px;
}

.option-btn[data-quality="4K"].active {
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
    transform: scale(1.05);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
    }
    50% {
        box-shadow: 0 4px 30px rgba(245, 158, 11, 0.8);
    }
}

.option-btn {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

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

.option-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.toggle-switch {
    display: flex;
    align-items: center;
}

.toggle-switch input {
    display: none;
}

.toggle-label {
    position: relative;
    width: 60px;
    height: 30px;
    background: var(--bg-card);
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--border-color);
}

.toggle-switch input:checked + .toggle-label {
    background: var(--gradient-primary);
    border-color: transparent;
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-label .toggle-slider {
    transform: translateX(30px);
}

.modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary,
.btn-another {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
}

.btn-another {
    background: var(--bg-card);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-another:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* ===== Features Section ===== */
.features-section {
    padding: 80px 20px;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== History Section ===== */
.history-section {
    padding: 80px 20px;
    position: relative;
    z-index: 1;
}

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

.btn-clear {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 500;
}

.btn-clear:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.history-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.history-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(5px);
}

.history-thumbnail {
    width: 120px;
    height: 68px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.history-info {
    flex: 1;
}

.history-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.history-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2rem;
}

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

.loader {
    display: flex;
    gap: 10px;
}

.loader-ring {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader-ring:nth-child(1) { animation-delay: -0.32s; }
.loader-ring:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 4000;
    display: none;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

.toast.show {
    display: flex;
}

/* ===== PWA Install Prompt ===== */
.install-prompt {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    z-index: 5000;
    padding: 15px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    display: none;
}

.install-prompt.show {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.install-prompt-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.install-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.install-text {
    flex: 1;
}

.install-text h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.install-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.install-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.install-btn {
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

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

.install-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.install-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

.toast-icon {
    font-size: 1.5rem;
}

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

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

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast-message {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-section {
        padding: 100px 20px 40px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-actions {
        gap: 0.75rem;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo i {
        font-size: 1.4rem;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    /* Mobile sidebar menu */
    .nav-links {
        position: fixed;
        top: 70px;
        right: 0;
        width: 280px;
        max-width: 85%;
        height: calc(100vh - 70px);
        background: var(--bg-secondary);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.5rem;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        display: flex !important;
    }
    
    .nav-links.active {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: flex !important;
    }
    
    .nav-links li {
        width: 100%;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem 1.25rem;
        border-radius: 10px;
        text-align: left;
        transition: var(--transition);
        display: block;
        font-size: 1rem;
        color: var(--text-primary);
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: var(--bg-card);
        color: var(--primary-color);
        transform: translateX(5px);
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .hero-section {
        padding: 90px 15px 30px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 10px;
    }
    
    .download-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .input-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .input-wrapper {
        width: 100%;
    }
    
    .url-input {
        padding: 16px 50px 16px 50px;
        font-size: 0.95rem;
    }
    
    .download-btn-primary {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }
    
    .platforms-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .platform-card {
        padding: 1rem;
    }
    
    .platform-card i {
        font-size: 2rem;
    }
    
    .platform-card span {
        font-size: 0.85rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .btn-clear {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(95vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    .modal-content {
        max-height: 95vh;
        height: auto;
    }
    
    .option-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        padding-bottom: 10px;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .option-buttons {
        gap: 0.5rem;
    }
    
    .option-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        flex: 1;
        min-width: calc(50% - 0.25rem);
    }
    
    .history-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 1rem;
    }
    
    .history-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    
    .history-actions {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .history-btn {
        flex: 1;
        max-width: 60px;
    }
    
    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        min-width: auto;
        width: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 80px 10px 20px;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .download-card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .url-input {
        padding: 14px 45px 14px 45px;
        font-size: 0.9rem;
    }
    
    .url-input::placeholder {
        font-size: 0.85rem;
    }
    
    .download-btn-primary {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .platform-card {
        padding: 0.75rem;
    }
    
    .platform-card i {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }
    
    .platform-card span {
        font-size: 0.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.25rem;
    }
    
    .modal-content {
        margin: 5px;
        border-radius: 12px;
    }
    
    .option-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: calc(33.333% - 0.33rem);
    }
    
    .history-item {
        padding: 0.75rem;
    }
    
    .history-title {
        font-size: 0.95rem;
    }
    
    .history-meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .platforms-grid {
        grid-template-columns: 1fr;
    }
    
    .option-btn {
        min-width: calc(50% - 0.25rem);
    }
}

/* ===== Touch Device Optimizations ===== */
@media (hover: none) and (pointer: coarse) {
    .download-btn-primary,
    .btn-primary,
    .btn-secondary,
    .option-btn,
    .platform-card,
    .feature-card {
        -webkit-tap-highlight-color: transparent;
    }
    
    .download-btn-primary:active,
    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.98);
    }
    
    .platform-card:active,
    .feature-card:active {
        transform: scale(0.98);
    }
}

/* ===== Landscape Mobile ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 80px 20px 30px;
    }
    
    .download-card {
        padding: 1.25rem;
    }
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-top: 1px solid var(--border-color);
    padding: 50px 20px 25px;
    margin-top: 80px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    text-align: center;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 2rem;
    -webkit-text-fill-color: var(--primary-color);
    animation: bounce 2s infinite;
}

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

.footer-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gradient-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.social-link:hover::before {
    width: 100%;
    height: 100%;
}

.social-link:hover {
    border-color: transparent;
    color: white;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.social-link i {
    position: relative;
    z-index: 1;
}

.footer-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: var(--transition);
    text-align: left;
}

.feature-badge:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-badge i {
    font-size: 2rem;
    color: var(--primary-color);
    min-width: 40px;
    text-align: center;
}

.feature-badge strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.feature-badge span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
}

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

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.footer-bottom .fa-heart {
    color: var(--error-color);
    animation: heartbeat 1.5s infinite;
    margin: 0 4px;
}

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

/* Footer Responsive */
@media (max-width: 768px) {
    .footer {
        padding: 40px 15px 20px;
    }
    
    .footer-logo {
        font-size: 1.5rem;
    }
    
    .footer-logo i {
        font-size: 1.75rem;
    }
    
    .footer-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .social-links {
        gap: 0.75rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .footer-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-badge {
        padding: 1rem;
    }
    
    .feature-badge i {
        font-size: 1.5rem;
        min-width: 35px;
    }
    
    .footer-bottom p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .footer-features {
        grid-template-columns: 1fr;
    }
    
    .feature-badge {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-badge i {
        margin-bottom: 0.5rem;
    }
}

/* ===== Enhanced Professional Styles ===== */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.download-card {
    position: relative;
    z-index: 1;
}

.download-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 22px;
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.download-card:hover::after {
    opacity: 0.3;
    filter: blur(10px);
}

.platform-card {
    position: relative;
    overflow: hidden;
}

.platform-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: var(--transition);
    border-radius: 50%;
}

.platform-card:hover::before {
    width: 200px;
    height: 200px;
}

.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::after {
    left: 100%;
}

/* Enhanced Button Styles */
.download-btn-primary {
    position: relative;
    overflow: hidden;
}

.download-btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.download-btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.download-btn-primary span,
.download-btn-primary i {
    position: relative;
    z-index: 1;
}

/* Professional Loading Animation */
.loader-ring {
    animation: bounce 1.4s infinite ease-in-out both;
    background: var(--gradient-primary);
}

/* Enhanced Modal */
.modal-content {
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    z-index: 1;
}

/* Smooth Scroll Indicator */
html {
    scroll-padding-top: 80px;
}

/* Professional Hover Effects */
.option-btn {
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.option-btn:hover::before {
    width: 200px;
    height: 200px;
}

.option-btn span {
    position: relative;
    z-index: 1;
}

/* ===== Accessibility ===== */
/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 8px 0;
    font-weight: 600;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Focus indicators - High contrast for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Remove default focus for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Keyboard navigation improvements */
button,
a,
input,
select,
textarea {
    cursor: pointer;
}

button:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.5);
        --text-secondary: #ffffff;
    }
    
    .download-card,
    .platform-card,
    .feature-card {
        border: 2px solid var(--border-color);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .gradient-orb,
    .background-animation {
        animation: none !important;
    }
    
    html {
        scroll-behavior: auto !important;
    }
}

/* Color contrast improvements */
.url-input:focus-visible {
    outline-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Ensure all interactive elements are keyboard accessible */
[role="button"],
[role="menuitem"],
[role="radio"] {
    cursor: pointer;
}

[role="button"]:focus-visible,
[role="menuitem"]:focus-visible,
[role="radio"]:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Modal accessibility */
[role="dialog"] {
    position: relative;
}

[role="dialog"][aria-hidden="true"] {
    display: none;
}

/* ===== Mobile Performance Optimizations ===== */
@media (max-width: 768px) {
    /* Hide heavy background animations on mobile */
    .gradient-orb,
    .background-animation {
        display: none !important;
    }
    
    /* Reduce backdrop filters on mobile */
    .navbar,
    .download-card,
    .modal-content {
        backdrop-filter: blur(10px);
    }
    
}

/* Critical rendering path optimization */
.hero-section,
.download-card,
.navbar {
    contain: layout style paint;
}


