:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --error-color: #ef4444;
    --success-color: #22c55e;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

body.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --primary-light: #312e81;
}

* {
    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;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

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

.language-switcher {
    flex: 0 0 auto;
}

.lang-dropdown {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-dropdown:hover {
    border-color: var(--primary-color);
}

.logo-title {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-start;
}

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

.logo-img {
    width: auto;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    display: block;
}

.logo-text {
    display: none;
}

.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.facebook-downloader-headline {
    flex: 0 0 auto;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}

.facebook-downloader-headline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: var(--shadow-md);
}

.facebook-downloader-headline:active {
    transform: translateX(-50%) translateY(0);
}

.stars-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: var(--radius-full);
    color: #1e293b;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: var(--shadow-md);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: var(--shadow-md), 0 0 0 0 rgba(251, 191, 36, 0.4); }
    50% { box-shadow: var(--shadow-md), 0 0 20px 5px rgba(251, 191, 36, 0.2); }
}

.stars-badge i {
    color: #1e293b;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.platform-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.platform-nav::-webkit-scrollbar {
    display: none;
}

.platform-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

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

.platform-btn i {
    font-size: 1rem;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.features-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.badge i {
    color: var(--secondary-color);
}

.download-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin: 2rem 0;
}

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

.input-wrapper {
    flex: 1;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.url-input {
    width: 100%;
    padding: 1rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

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

.clear-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

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

.download-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.modern-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-spinner svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    animation: pulse 2s ease-in-out infinite;
}

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

.error-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: var(--radius-md);
    color: var(--error-color);
}

.error-container i {
    font-size: 1.5rem;
}

/* Modern 2026 Video Card Layout */
.video-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
    animation: slideUpFade 0.4s ease-out;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

.video-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.video-card:hover {
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.video-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

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

.video-preview:hover img {
    transform: scale(1.02);
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
    color: white;
    font-size: 3rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-preview:hover .video-overlay {
    opacity: 1;
}

.video-platform-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #1877F2;
    border-radius: 50%;
    color: white;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.video-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.video-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.meta-item i {
    font-size: 0.75rem;
    color: #6366f1;
}

.meta-separator {
    color: var(--text-muted);
}

.video-description {
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    border-left: 3px solid var(--primary-color);
    display: none;
}

.video-description p {
    margin: 0;
}

/* Quality Selection Section */
.quality-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.quality-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quality-label i {
    color: #6366f1;
    font-size: 0.875rem;
}

.format-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.format-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.625rem 0.75rem;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}


.format-option:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.format-option.selected {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}


.quality-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.4rem;
    background: transparent;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-right: 0.25rem;
}

.format-option.selected .quality-badge {
    background: rgba(255, 255, 255, 0.2);
}

/* Download Button - Modern 2026 Style */
.start-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.75rem;
    width: 100%;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.start-download-btn:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

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

.start-download-btn:disabled {
    background: linear-gradient(135deg, var(--text-muted) 0%, var(--text-secondary) 100%);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.start-download-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.start-download-btn:hover i {
    transform: translateY(2px);
}

.download-progress {
    padding: 1.5rem;
}

.progress-bar-container {
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    width: 0%;
}

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

.how-it-works {
    padding: 4rem 0;
    text-align: center;
}

.how-it-works h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

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

.step {
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.step h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

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

.supported-platforms {
    padding: 4rem 0;
    text-align: center;
}

.supported-platforms h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.platform-card {
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
    cursor: pointer;
}

.platform-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(var(--accent-color), 0.2);
}

.platform-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.platform-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 1.5rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 1.75rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
}

.footer-links h4,
.footer-features h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-features p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.footer-features i {
    color: var(--secondary-color);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--text-secondary);
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.stars {
    color: #fbbf24;
}

@media (min-width: 1440px) {
    .main-content {
        max-width: 1400px;
    }
    
    .header-content {
        max-width: 1400px;
    }
    
    .footer-content,
    .footer-bottom {
        max-width: 1400px;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .platforms-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .main-content {
        padding: 1.5rem 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .how-it-works,
    .supported-platforms {
        padding: 3rem 0;
    }

    .steps {
        gap: 1.5rem;
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Tablet-specific header adjustments */
    .header-content {
        padding: 0.875rem 1rem;
    }

    .facebook-downloader-headline {
        font-size: 1.25rem;
        padding: 0.375rem 1rem;
    }

    /* Video card adjustments for tablet */
    .video-card {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .video-preview {
        aspect-ratio: 16/9;
        max-height: 280px;
    }

    /* FAQ section tablet optimization */
    .faq-section {
        padding: 3rem 1rem;
    }
}

/* iPad and tablet-specific optimizations (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .platform-nav {
        gap: 0.5rem;
        padding: 0.875rem 1rem;
    }

    .platform-btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .step {
        padding: 1.75rem;
    }

    .platform-card {
        padding: 1.75rem;
    }

    /* Ensure footer stays clean on tablets */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* About page tablet adjustments */
    .page-content {
        padding: 2.5rem !important;
        margin: 1.5rem 0 !important;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
        overflow-x: hidden;
    }

    .header-left {
        order: 1;
        flex: 0 0 auto;
        justify-content: flex-start;
        align-items: center;
        gap: 0.5rem;
    }

    .language-switcher {
        order: 0;
        flex: 0 0 auto;
    }

    .logo-title {
        order: 1;
        flex: 0 0 auto;
        justify-content: flex-start;
    }

    .logo-text {
        font-size: 1rem;
    }

    .lang-dropdown {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
        max-width: 90px;
    }

    .facebook-downloader-headline {
        order: 2;
        flex: 1 1 auto;
        font-size: 0.875rem;
        margin-bottom: 0;
        position: static;
        transform: none;
        left: auto;
        padding: 0.35rem 0.5rem;
        text-decoration: none;
        display: inline-block;
        text-align: center;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .facebook-downloader-headline:hover {
        transform: translateY(-1px);
    }

    .facebook-downloader-headline:active {
        transform: translateY(0);
    }

    .logo-img {
        height: 28px;
    }

    .header-right {
        order: 3;
        flex: 0 0 auto;
    }

    .stars-badge {
        display: none;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .platform-nav {
        justify-content: center;
        padding: 0.625rem 0.75rem;
        gap: 0.375rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .platform-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        scroll-snap-align: start;
        flex-shrink: 0;
    }

    .main-content {
        padding: 0.875rem;
    }

    .hero {
        padding: 1.25rem 0;
    }

    .hero h1 {
        font-size: 1.625rem;
        line-height: 1.25;
        padding: 0 0.25rem;
    }

    .hero-subtitle {
        font-size: 0.9375rem;
        padding: 0 0.25rem;
        line-height: 1.5;
    }

    .features-badges {
        gap: 0.5rem;
    }

    .badge {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    .download-section {
        padding: 1rem;
        margin: 0.875rem 0;
        border-radius: var(--radius-lg);
    }

    .url-input-container {
        flex-direction: column;
        gap: 0.625rem;
    }

    .url-input {
        padding: 0.875rem 2.25rem;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: var(--radius-md);
    }

    .input-icon {
        left: 0.875rem;
        font-size: 0.9375rem;
    }

    .clear-btn {
        right: 0.875rem;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
        min-height: 48px; /* Better touch target */
    }

    .video-info {
        padding: 0;
        max-width: 100%;
    }

    .video-card {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
        border-radius: var(--radius-lg);
    }

    .video-preview {
        max-height: 240px;
        aspect-ratio: 16/9;
        border-radius: var(--radius-md);
    }

    .video-title {
        font-size: 1.0625rem;
        line-height: 1.35;
    }

    .video-meta {
        font-size: 0.8125rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .meta-separator {
        display: none;
    }

    .video-description {
        font-size: 0.8125rem;
        padding: 0.75rem;
    }

    .quality-section {
        gap: 0.625rem;
    }

    .quality-label {
        font-size: 0.8125rem;
    }

    .format-options {
        gap: 0.375rem;
    }

    .format-option {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
        min-height: 40px;
    }

    .start-download-btn {
        width: 100%;
        min-width: unset;
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }

    .stars-badge {
        display: none;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }

    .how-it-works,
    .supported-platforms {
        padding: 2rem 0;
    }

    .how-it-works h2,
    .supported-platforms h2 {
        font-size: 1.375rem;
        margin-bottom: 1.5rem;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .step {
        padding: 1.25rem;
    }

    .step-icon {
        width: 56px;
        height: 56px;
        font-size: 1.375rem;
        margin-bottom: 0.875rem;
    }

    .step h3 {
        font-size: 1.0625rem;
    }

    .step p {
        font-size: 0.875rem;
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .platform-card {
        padding: 1rem;
    }

    .platform-card i {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .platform-card h3 {
        font-size: 1rem;
    }

    .platform-card p {
        font-size: 0.75rem;
    }

    .faq-section {
        padding: 1.5rem 0.75rem;
    }

    .faq-section h2 {
        font-size: 1.375rem;
        margin-bottom: 1.5rem;
    }

    .faq-item summary {
        padding: 1rem;
    }

    .faq-item summary h3 {
        font-size: 0.9375rem;
        line-height: 1.4;
    }

    .faq-content {
        padding: 0.75rem 1rem;
    }

    .faq-content p {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    .faq-image {
        max-width: 100%;
    }

    .footer {
        padding: 1.5rem 0.75rem 1.25rem;
        margin-top: 1.5rem;
    }

    .footer-content {
        gap: 1.5rem;
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-logo {
        font-size: 1.25rem;
    }

    .footer-brand p {
        font-size: 0.875rem;
    }

    .social-links {
        justify-content: center;
    }

    .footer-links h4,
    .footer-features h4 {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
    }

    .footer-links a {
        font-size: 0.875rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.625rem;
        margin-top: 1.5rem;
        padding-top: 1.25rem;
    }

    .footer-bottom p {
        font-size: 0.8125rem;
    }

    /* Header nav for subpages */
    .header-nav {
        gap: 0.25rem;
    }

    .header-nav a {
        font-size: 0.8125rem;
        padding: 0.375rem 0.5rem;
        margin-right: 0.25rem !important;
    }

    /* Simple footer mobile */
    .simple-footer {
        padding: 1.25rem 0.75rem !important;
        font-size: 0.8125rem !important;
    }

    .simple-footer nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }

    .simple-footer a {
        margin: 0 0.25rem !important;
    }

    /* Breadcrumb mobile */
    .breadcrumb {
        padding: 0 0.75rem !important;
        margin: 0.75rem auto !important;
    }

    .breadcrumb ol {
        font-size: 0.8125rem;
    }

    /* Page content mobile */
    .page-content {
        padding: 1.25rem !important;
        margin: 0.75rem 0 !important;
        border-radius: var(--radius-lg) !important;
    }

    .page-content h1 {
        font-size: 1.375rem;
        margin-bottom: 1rem;
    }

    .page-content h2 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }

    .page-content p,
    .page-content li {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    /* Loading container mobile */
    .loading-container {
        padding: 1.5rem 1rem;
    }

    .modern-spinner svg {
        width: 48px;
        height: 48px;
    }

    .loading-text {
        font-size: 0.875rem;
    }

    /* Error container mobile */
    .error-container {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .error-container i {
        font-size: 1.25rem;
    }

    /* Download progress mobile */
    .download-progress {
        padding: 1rem;
    }

    .progress-bar-container {
        height: 10px;
    }

    .progress-text {
        font-size: 0.875rem;
    }
}

@media (max-width: 600px) {
    .lang-dropdown {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
        max-width: 100px;
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
    }

    .platform-btn span {
        display: none;
    }

    .platform-btn {
        padding: 0.5rem 0.625rem;
        border-radius: var(--radius-md);
        min-height: 44px;
        min-width: 44px;
    }

    .platform-btn i {
        font-size: 1.125rem;
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }

    .platform-card {
        padding: 0.875rem;
    }

    .platform-card i {
        font-size: 1.75rem;
        margin-bottom: 0.625rem;
    }

    .platform-card h3 {
        font-size: 0.9375rem;
    }

    .platform-card p {
        font-size: 0.6875rem;
    }

    /* Better button sizing for small screens */
    .download-btn,
    .start-download-btn {
        min-height: 48px;
        font-size: 0.875rem;
    }

    .url-input {
        font-size: 16px; /* Prevent iOS zoom */
    }

    /* Smaller footer text */
    .footer-bottom p {
        font-size: 0.75rem;
    }

    .rating-display {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.5rem 0.625rem;
    }

    .logo-img {
        height: 30px;
    }

    .logo-text {
        font-size: 1.125rem;
    }

    .facebook-downloader-headline {
        font-size: 1rem;
        padding: 0.35rem 0.75rem;
    }

    .header-nav a {
        font-size: 0.75rem;
        padding: 0.25rem 0.375rem;
    }

    .hero {
        padding: 1rem 0;
    }

    .hero h1 {
        font-size: 1.375rem;
    }

    .hero-subtitle {
        font-size: 0.8125rem;
    }

    .badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.6875rem;
    }

    .badge i {
        font-size: 0.6875rem;
    }

    .download-section {
        padding: 0.875rem;
        border-radius: var(--radius-md);
    }

    .url-input {
        padding: 0.75rem 2rem;
        font-size: 16px;
        border-radius: var(--radius-md);
    }

    .input-icon {
        left: 0.75rem;
        font-size: 0.875rem;
    }

    .clear-btn {
        right: 0.75rem;
    }

    .download-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        border-radius: var(--radius-md);
    }

    .step h3 {
        font-size: 0.9375rem;
    }

    .step p {
        font-size: 0.8125rem;
    }

    .faq-item summary {
        padding: 0.875rem;
    }

    .faq-item summary h3 {
        font-size: 0.875rem;
    }

    .faq-content {
        padding: 0.625rem 0.875rem;
    }

    .faq-content p {
        font-size: 0.8125rem;
    }

    .footer-links h4,
    .footer-features h4 {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 360px) {
    .header-content {
        padding: 0.4rem 0.5rem;
    }

    .logo-img {
        height: 26px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .lang-dropdown {
        padding: 0.25rem 0.375rem;
        font-size: 0.6875rem;
        max-width: 85px;
    }

    .theme-toggle {
        width: 34px;
        height: 34px;
        font-size: 0.9375rem;
    }

    .platform-nav {
        padding: 0.4rem 0.5rem;
        gap: 0.25rem;
    }

    .platform-btn {
        padding: 0.4rem;
        min-height: 40px;
        min-width: 40px;
    }

    .platform-btn i {
        font-size: 0.9375rem;
    }

    .hero h1 {
        font-size: 1.25rem;
    }

    .hero-subtitle {
        font-size: 0.75rem;
    }

    .features-badges {
        gap: 0.35rem;
    }

    .badge {
        padding: 0.2rem 0.375rem;
        font-size: 0.625rem;
        gap: 0.2rem;
    }

    .download-section {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }

    .url-input {
        padding: 0.625rem 1.75rem;
        font-size: 16px;
    }

    .input-icon {
        left: 0.625rem;
        font-size: 0.8125rem;
    }

    .clear-btn {
        right: 0.625rem;
    }

    .download-btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    .video-card {
        padding: 0.75rem;
    }

    .video-preview {
        max-height: 180px;
    }

    .video-title {
        font-size: 0.9375rem;
    }

    .format-options {
        gap: 0.25rem;
    }

    .format-option {
        padding: 0.375rem 0.5rem;
        font-size: 0.6875rem;
    }

    .start-download-btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    .platforms-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .platform-card {
        padding: 0.625rem;
    }

    .platform-card i {
        font-size: 1.5rem;
        margin-bottom: 0.375rem;
    }

    .platform-card h3 {
        font-size: 0.8125rem;
        margin-bottom: 0.2rem;
    }

    .platform-card p {
        font-size: 0.625rem;
    }

    .step {
        padding: 1rem;
    }

    .step-icon {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    }

    .step h3 {
        font-size: 0.875rem;
    }

    .step p {
        font-size: 0.75rem;
    }

    .faq-item summary {
        padding: 0.75rem;
    }

    .faq-item summary h3 {
        font-size: 0.8125rem;
    }

    .faq-content {
        padding: 0.5rem 0.75rem;
    }

    .footer {
        padding: 1rem 0.5rem;
    }

    .footer-logo {
        font-size: 1.125rem;
    }

    .footer-bottom p {
        font-size: 0.6875rem;
    }
}

/* iPad Pro specific optimizations (1024px in portrait) */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
    .main-content {
        padding: 1.5rem;
    }

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

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .platform-card {
        padding: 1.5rem;
    }

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

    .step {
        padding: 1.5rem;
    }

    .video-card {
        max-width: 600px;
    }

    .faq-section {
        padding: 3rem 1.5rem;
    }
}

/* iPad Pro landscape (1366px) */
@media only screen and (min-device-width: 1024px) and (max-device-width: 1366px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
    .main-content {
        padding: 2rem 1.5rem;
    }

    .video-card {
        grid-template-columns: 300px 1fr;
    }

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

/* General touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .step:hover,
    .platform-card:hover,
    .faq-item:hover {
        transform: none;
    }

    .download-btn:hover {
        transform: none;
    }

    .platform-btn,
    .download-btn,
    .start-download-btn,
    .format-option,
    .theme-toggle,
    .lang-dropdown {
        min-height: 44px;
    }

    .faq-item summary {
        min-height: 48px;
    }

    /* Larger touch targets for mobile */
    .social-links a {
        min-width: 44px;
        min-height: 44px;
    }

    .footer-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .clear-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@supports (-webkit-touch-callout: none) {
    .url-input {
        font-size: 16px;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        padding: 0.75rem 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        margin-bottom: 1rem;
    }
    
    .features-badges {
        margin-bottom: 0;
    }
    
    .download-section {
        margin: 0.75rem 0;
    }
}

/* Accessibility - Visually Hidden */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--text-primary);
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-item summary {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary h3 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.faq-content {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.faq-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: block;
    box-shadow: var(--shadow-md);
}

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

.faq-item p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.faq-item[open] {
    background: var(--bg-tertiary);
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    z-index: 1000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Header navigation for subpages */
.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-nav a {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.header-nav a:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

/* Breadcrumb styling */
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb a {
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}


/* Print styles */
@media print {
    .header,
    .footer,
    .platform-nav,
    .theme-toggle,
    .social-links {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .main-content {
        max-width: 100%;
        padding: 0;
    }
}
