/**
 * Social Downloader Theme - Main Styles
 * Mobile-First Responsive Design
 */

/* ==========================================
   CSS VARIABLES
   ========================================== */
   /* ==========================================
   FONTS
   ========================================== */
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Vazir for Persian/Arabic */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-dark: #1f2937;
    
    /* Text - Improved contrast for WCAG AA compliance */
    --text-primary: #111827;
    --text-secondary: #4b5563; /* Changed from #6b7280 for better contrast */
    --text-tertiary: #6b7280;   /* Changed from #9ca3af for better contrast */
    
    /* Border */
    --border: #e5e7eb;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    
    /* Transitions */
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
body.dark-mode {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --border: #374151;
    --bg-dark: #0f172a;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background var(--transition), color var(--transition);
}

/* ==========================================
   HEADER
   ========================================== */
.site-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    gap: var(--space-md);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity var(--transition);
}

.site-logo:hover {
    opacity: 0.8;
}

.site-logo svg {
    color: var(--primary);
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    align-items: center;
    gap: var(--space-xs);
}

.desktop-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
}

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

.desktop-nav a.active {
    /* Glassmorphism effect - Apple style */
    background: rgba(99, 102, 241, 0.15); /* Primary color with low opacity */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.desktop-nav a.active:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.desktop-nav a svg {
    flex-shrink: 0;
    transition: fill var(--transition);
}

.desktop-nav a.active svg {
    fill: var(--primary);
    opacity: 0.9;
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
    }
}

/* More Dropdown */
.nav-more {
    position: relative;
}

.more-btn {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.more-btn:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.more-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
}

.nav-more:hover .more-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.more-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background var(--transition);
}

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

.more-menu a.active {
    /* Glassmorphism effect - Apple style */
    background: rgba(99, 102, 241, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary);
    font-weight: 600;
}

.more-menu a.active:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

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

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

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
}

.language-switcher:hover .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background var(--transition);
}

.lang-menu a:hover,
.lang-menu a.active {
    background: var(--bg-secondary);
    color: var(--primary);
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    transform: translateX(-100%);
    transition: transform var(--transition);
    overflow-y: auto;
    z-index: 999;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-nav {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.mobile-nav a {
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition);
}

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

@media (min-width: 1024px) {
    .mobile-menu {
        display: none;
    }
}

/* ==========================================
   CONTAINER
   ========================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: var(--space-xl) 0;
}

/* Animated Gradient for Homepage Hero Section - Using Button Colors */
.home .hero-section {
    background: linear-gradient(-45deg, #6366f1, #4f46e5, #6366f1, #4f46e5, #6366f1, #4f46e5);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

/* Optional: Add a subtle overlay for better text readability */
.home .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 1;
}

.home .hero-section .container {
    position: relative;
    z-index: 2;
}

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

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.95; /* Improved contrast - changed from 0.9 */
    margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* ==========================================
   DOWNLOAD FORM
   ========================================== */
.download-section {
    padding: var(--space-xl) 0;
}

.download-form-wrapper {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl);
    margin-top: calc(-1 * var(--space-xl));
    position: relative;
    z-index: 10;
}

.download-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition);
}

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

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    transition: all var(--transition);
    text-decoration: none;
}

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

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

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

.btn svg {
    width: 20px;
    height: 20px;
}

@media (min-width: 768px) {
    .download-form {
        flex-direction: row;
        align-items: stretch;
    }
    
    .form-input {
        flex: 1;
    }
}

/* Platform Icons */
.platform-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.platform-icons span {
    white-space: nowrap;
}

.platform-icons svg {
    flex-shrink: 0;
}

/* Results Wrapper */
.results-wrapper {
    background: var(--bg-primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-top: var(--space-lg);
}

.result-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.result-thumbnail {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--radius-md);
    margin: 0 auto var(--space-md);
    display: block;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.download-options h4 {
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

.download-options .btn {
    width: 100%;
}

/* Alert Styles */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: white;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid;
    transition: opacity 0.3s;
}

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

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

/* ==========================================
   FEATURES SECTION
   ========================================== */
.features-section {
    padding: var(--space-xl) 0;
    background: var(--bg-secondary);
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: var(--space-lg);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-card {
    background: var(--bg-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

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

/* ==========================================
   HOW IT WORKS SECTION
   ========================================== */
.how-section {
    padding: var(--space-xl) 0;
    background: var(--bg-primary);
}

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

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-lg);
    }
}

.step-card {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    transition: transform var(--transition), box-shadow var(--transition);
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

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

/* ==========================================
   FAQ SECTION - ACCORDION
   ========================================== */
.faq-section {
    padding: var(--space-xl) 0;
    background: var(--bg-secondary);
}

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

.faq-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .faq-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.faq-item {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    padding: var(--space-md);
    background: none;
    border: none;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    transition: color var(--transition);
}

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

.faq-question span {
    flex: 1;
}

.faq-icon {
    flex-shrink: 0;
    transition: transform var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 var(--space-md) var(--space-md);
}

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

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-tertiary);
    padding: var(--space-xl) 0 var(--space-md);
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-widget h4 {
    color: white;
    margin-bottom: var(--space-sm);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition);
}

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

.footer-bottom {
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.875rem;
}

/* ==========================================
   UTILITIES
   ========================================== */
.text-center { text-align: center; }
.hidden { display: none; }

/* ==========================================
   LOADING & ALERTS
   ========================================== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#loading-overlay.active {
    display: flex;
    opacity: 1;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    animation: rotator 1.4s linear infinite;
}

@keyframes rotator {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(270deg); }
}

.path {
    stroke-dasharray: 187;
    stroke-dashoffset: 0;
    transform-origin: center;
    animation: dash 1.4s ease-in-out infinite, colors 5.6s ease-in-out infinite;
    stroke: #fff;
}

@keyframes dash {
    0% { stroke-dashoffset: 187; }
    50% {
        stroke-dashoffset: 46.75;
        transform: rotate(135deg);
    }
    100% {
        stroke-dashoffset: 187;
        transform: rotate(450deg);
    }
}

@keyframes colors {
    0%, 100% { stroke: #6366f1; }
    25% { stroke: #818cf8; }
    50% { stroke: #4f46e5; }
    75% { stroke: #ec4899; }
}

.loading-text {
    margin-top: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

.spin-icon {
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Legacy support */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

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

.loader {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto var(--space-sm);
}

/* ==========================================
   BACK TO TOP BUTTON
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* ==========================================
   COOKIE CONSENT BANNER
   ========================================== */
.cookie-consent-banner {
    position: fixed;
    bottom: var(--space-md);
    left: var(--space-md);
    max-width: 400px;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    z-index: 1000000001;
    animation: slideInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes slideInUp {
    from {
        transform: translateY(120%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(120%);
        opacity: 0;
    }
}

.cookie-consent-content {
    padding: 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    position: relative;
}

.cookie-consent-text {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-primary);
    font-weight: 400;
}

.cookie-consent-text p {
    margin: 0;
    padding: 0;
}

.cookie-consent-link {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.cookie-consent-link:hover {
    color: var(--primary-dark);
    text-decoration-thickness: 2px;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.625rem;
    margin-top: 0.25rem;
}

.cookie-consent-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    text-transform: capitalize;
    letter-spacing: 0.01em;
}

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

.cookie-consent-btn:hover::before {
    width: 300px;
    height: 300px;
}

.cookie-consent-accept {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.cookie-consent-accept:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.cookie-consent-accept:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.2);
}

.cookie-consent-decline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.cookie-consent-decline:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

.cookie-consent-decline:active {
    transform: translateY(0);
}

/* Mobile: Center and smaller */
@media (max-width: 768px) {
    .cookie-consent-banner {
        left: 50% !important;
        right: auto !important;
        bottom: 85px !important; /* بالاتر از منوی موبایلی (70px + 15px margin) */
        transform: translateX(-50%) !important;
        max-width: calc(100% - var(--space-md) * 2) !important;
        width: calc(100% - var(--space-md) * 2) !important;
        border-radius: 12px;
    }
    
    .cookie-consent-content {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .cookie-consent-text {
        font-size: 0.75rem;
        line-height: 1.5;
    }
    
    .cookie-consent-buttons {
        gap: 0.5rem;
        flex-direction: column;
    }
    
    .cookie-consent-btn {
        font-size: 0.8125rem;
        padding: 0.625rem 1rem;
        width: 100%;
    }
}

/* Ensure it doesn't overlap with back-to-top button */
@media (min-width: 769px) {
    .cookie-consent-banner {
        bottom: var(--space-md);
        left: var(--space-md);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background: var(--bg-primary);
        border-color: var(--border-color);
    }
    
    .cookie-consent-decline {
        background: transparent;
        border-color: var(--border-color);
    }
    
    .cookie-consent-decline:hover {
        background: var(--bg-secondary);
        border-color: var(--text-secondary);
    }
}

/* ==========================================
   PASTE BUTTON INSIDE INPUT
   ========================================== */
.input-wrapper {
    position: relative;
    flex: 1;
}

.input-wrapper .form-input {
    padding-right: 3.5rem;
}

.paste-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

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

.paste-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* ==========================================
   HEADER BUTTONS - EQUAL SIZE
   ========================================== */
.lang-btn,
.theme-toggle {
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.lang-btn:hover,
.theme-toggle:hover {
    border-color: var(--primary);
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 767px) {
    html {
        font-size: 14px;
    }
    
    .hero-section {
        padding: var(--space-sm) 0;
    }
    .hero-subtitle { margin-bottom: var(--space-sm); }
    
    .download-form-wrapper {
        padding: var(--space-md);
        margin-top: calc(-1 * var(--space-lg));
    }
    
    .download-form {
        flex-direction: column;
    }
    
    .input-wrapper {
        width: 100%;
    }
    
    .back-to-top {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 44px;
        height: 44px;
        margin-bottom: 70px;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: var(--space-sm) var(--space-md);
    }
    
    .step-card {
        padding: var(--space-md);
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .lang-btn,
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
}
/* ==========================================
   RESULT MEDIA STYLES - Fix Large Size Issue
   ========================================== */

/* ظرف والد را تنظیم می‌کند تا نسبت ابعاد را حفظ کند */
.results-wrapper {
    display: block;
}

.result-video-wrapper {
    margin: var(--space-md) 0;
    width: 100%;
    position: relative; 
    padding-top: 56.25%; /* Default 16:9 - fixed for desktop, will be updated by JS on mobile */
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-tertiary);
    max-height: 500px;
}

/* For portrait videos on mobile */
@media (max-width: 768px) {
    .result-video-wrapper.portrait-video {
        max-width: 400px !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-top: 177.78% !important; /* 9:16 for portrait */
        max-height: 70vh; /* Limit height to 70% of viewport height */
    }
    
    .result-video-wrapper.landscape-video {
        padding-top: 56.25% !important; /* 16:9 for landscape */
        max-height: 50vh;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .result-video-wrapper.portrait-video {
        max-width: 90% !important;
        max-height: 60vh;
    }
}

/* پلیر ویدیو را مجبور می‌کند که کاملاً ظرف والد خود را پر کند */
.result-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* مطمئن می‌شود ویدیو متناسب با کادر نمایش داده شود */
}

/* برای تصاویر بندانگشتی که به جای پلیر ویدیو نمایش داده می‌شوند */
.result-thumbnail {
    width: 100%;
    max-height: 400px; /* حداکثر ارتفاع مناسب برای تصاویر */
    object-fit: contain;
    border-radius: var(--radius-lg);
    margin: var(--space-md) 0;
    display: block; 
}
/* ==========================================
   FINAL ORDER FIX - Ensures natural flow 
   ========================================== */

/* مطمئن می‌شود که ظرف اصلی، ترتیب flex/grid را لغو کرده و از بلوک‌های استاندارد استفاده کند */
.results-wrapper {
    display: block !important; 
    /* اگر در جای دیگری display: flex/grid تنظیم شده باشد، آن را لغو می‌کند */
}

/* تضمین می‌کند که همه عناصر فرزند (عنوان، مدیا، کپشن، دانلود) به صورت بلوکی نمایش داده شوند */
.results-wrapper > * {
    display: block !important; 
    margin: var(--space-md) 0; /* اضافه کردن حاشیه بین بلوک‌ها */
}

/* استثنا برای album grid - باید grid بماند */
.results-wrapper > .result-album-grid {
    display: grid !important;
}

/* برای دکمه‌های دانلود، مجدداً نمایش فلکس را فعال می‌کنیم تا کنار هم قرار بگیرند */
.download-options {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
}

/* استثنا برای پلیر ویدیو، برای حفظ نسبت تصویر */
.result-video-wrapper {
    display: block !important;
    position: relative; 
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}
/* ==========================================
   SINGLE IMAGE - Thumbnail کوچک
   ========================================== */
.result-single-image {
    position: relative;
    display: inline-block;
    margin: var(--space-md) 0;
    max-width: 100%;
}

.result-thumbnail-small {
    width: 200px;
    height: 200px;
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Limit image size on mobile */
@media (max-width: 768px) {
    .result-thumbnail-small {
        max-width: 100%;
        max-height: 60vh;
        width: auto;
        height: auto;
    }
}

.image-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ==========================================
   ALBUM GRID - چندتایی
   ========================================== */
.result-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-sm);
    margin: var(--space-md) 0;
}

@media (min-width: 1200px) {
    .result-album-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .result-album-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }
}

@media (max-width: 767px) {
    .result-album-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    .platform-icons span{display:none;}
    .platform-icons svg {width: 15px;}
}

.album-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-xs);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.album-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.album-item-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
}

.album-item-image img,
.album-item-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.album-video-thumbnail {
    cursor: pointer;
}

.album-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
    transition: opacity var(--transition), background var(--transition);
    pointer-events: auto;
    cursor: pointer;
    z-index: 2;
}

.album-item-video:hover .album-video-overlay {
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.album-video-overlay svg {
    color: white;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.album-download-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.album-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
}

/* دکمه Download All */
.download-all-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.download-all-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
}


/* ==========================================
   AD SECTION (Advertisement Banner)
   ========================================== */
.ad-section {
    padding: 0 0 5rem 0;
    text-align: center;
}

.platform-ad-section {
    padding: 0 0 5rem 0;
    text-align: center;
}

.ad-placeholder {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary); /* Improved contrast - changed from #888 */
    border-radius: var(--radius-lg);
    margin: 0 auto;
    max-width: 100%;
}

.platform-ad-section .ad-placeholder {
    padding: 3rem;
    color: var(--text-secondary); /* Improved contrast - changed from text-tertiary */
    /* margin: 1rem 0; */
}

.ad-placeholder p {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-primary); /* Improved contrast */
}

.ad-placeholder small {
    font-size: 0.9rem;
    display: block;
    color: var(--text-secondary); /* Improved contrast */
}

/* ==========================================
   SEO CONTENT SECTION
   ========================================== */
.platform-seo-content {
    padding: 4rem 0;
}

.seo-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.seo-content h2,
.seo-content .seo-main-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.seo-content h3:not(.seo-main-title) {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.seo-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.seo-content ul {
    padding-left: 2rem;
    margin: 1rem 0;
}

.seo-content li {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.seo-content li strong {
    color: var(--primary);
}

/* ==========================================
   RELATED TOOLS SECTION
   ========================================== */
.related-tools {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.related-tools h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.tool-card {
    background: var(--bg-primary);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    border: 2px solid transparent;
    transition: all var(--transition);
    display: block;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
    text-decoration: none;
}

.tool-card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.tool-card h3 {
    font-size: 1.125rem;
    margin: 0;
    color: var(--text-primary);
}

.tool-card:hover h3 {
    color: var(--primary);
}

/* ==========================================
   PLATFORM-SPECIFIC STYLES
   ========================================== */

/* Instagram Brand Colors - Optimized for composited animations */
.instagram-page .hero-section {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    background-size: 400% 400%;
    animation: instagramGradientShift 15s ease infinite;
    will-change: background-position; /* Optimize for composited animation */
    transform: translateZ(0); /* Force GPU acceleration */
}

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

.instagram-page .btn-primary {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.instagram-page .btn-primary:hover {
    background: linear-gradient(45deg, #e0852a 0%, #d55e2b 25%, #c91d32 50%, #b81f55 75%, #a91577 100%);
}

.instagram-page .form-input:focus {
    border-color: #E4405F;
    box-shadow: 0 0 0 4px rgba(228, 64, 95, 0.1);
}

.instagram-page .step-number {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.instagram-page .feature-card:hover {
    border-color: #E4405F;
}

.instagram-page h2 {
    color: #E4405F;
}

.instagram-page .seo-content h3 {
    color: #833AB4;
}

.instagram-page .seo-content li strong {
    color: #E4405F;
}

.instagram-page .related-tools h2 {
    color: #E4405F;
}

.instagram-page .tool-card:hover {
    border-color: #E4405F;
    box-shadow: 0 8px 20px rgba(228, 64, 95, 0.15);
}

.instagram-page .tool-card:hover h3 {
    color: #E4405F;
}

.instagram-page #loading-overlay .path {
    animation: dash 1.4s ease-in-out infinite, instagram-colors 5.6s ease-in-out infinite;
}

@keyframes instagram-colors {
    0%, 100% { stroke: #E4405F; }
    25% { stroke: #f09433; }
    50% { stroke: #bc1888; }
    75% { stroke: #dc2743; }
}

/* TikTok Brand Colors */
.tiktok-page .hero-section {
    background: #000;
}

.tiktok-page .hero-title {
    text-shadow: 
        -2px 0 #FE2C55, /* Red */
        2px 0 #25F4EE; /* Blue */
}

.tiktok-page .btn-primary {
    background: #000;
    box-shadow: -2px 0 0 #FE2C55, 2px 0 0 #25F4EE;
}

.tiktok-page .btn-primary:hover {
    background: linear-gradient(45deg, #FE2C55, #000, #25F4EE);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.tiktok-page .form-input:focus {
    border-color: #FE2C55;
    box-shadow: 0 0 0 4px rgba(254, 44, 85, 0.1);
}

.tiktok-page .step-number {
    background: #000;
}

.tiktok-page .feature-card:hover {
    border-color: #FE2C55;
}

.tiktok-page h2 {
    color: #FE2C55; /* Red */
}

.tiktok-page .seo-content h3 {
    color: #25F4EE; /* Blue */
}

.tiktok-page .related-tools h2 {
    color: #FE2C55;
}

.tiktok-page .tool-card:hover {
    border-color: #FE2C55; 
    box-shadow: 0 8px 20px rgba(254, 44, 85, 0.15);
}

.tiktok-page .tool-card:hover h3 {
    color: #FE2C55;
}

.tiktok-page #loading-overlay .path {
    animation: dash 1.4s ease-in-out infinite, tiktok-colors 5.6s ease-in-out infinite;
}

@keyframes tiktok-colors {
    0%, 100% { stroke: #FE2C55; }
    25% { stroke: #25F4EE; }
    50% { stroke: #FE2C55; }
    75% { stroke: #000; }
}

/* Facebook Brand Colors */
.facebook-page .hero-section {
    background: #1877F2; /* Facebook Blue */
}

.facebook-page .btn-primary {
    background: #1877F2;
}

.facebook-page .btn-primary:hover {
    background: #166fe5;
}

.facebook-page .form-input:focus {
    border-color: #1877F2;
    box-shadow: 0 0 0 4px rgba(24, 119, 242, 0.1);
}

.facebook-page .step-number {
    background: #1877F2;
}

.facebook-page .feature-card:hover {
    border-color: #1877F2;
}

.facebook-page h2 {
    color: #1877F2;
}

.facebook-page .seo-content h3 {
    color: #3b5998; /* Darker Facebook Blue */
}

.facebook-page .seo-content li strong {
    color: #1877F2;
}

.facebook-page .related-tools h2 {
    color: #1877F2;
}

.facebook-page .tool-card:hover {
    border-color: #1877F2;
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.15);
}

.facebook-page .tool-card:hover h3 {
    color: #1877F2;
}

/* YouTube Brand Colors */
.youtube-page .hero-section {
    background: #FF0000;
}

.youtube-page .btn-primary {
    background: #FF0000;
}

.youtube-page .btn-primary:hover {
    background: #e60000;
}

.youtube-page .form-input:focus {
    border-color: #FF0000;
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.1);
}

.youtube-page .step-number {
    background: #FF0000;
}

.youtube-page .feature-card:hover {
    border-color: #FF0000;
}

.youtube-page h2 {
    color: #FF0000;
}

.youtube-page .seo-content h3 {
    color: #282828; /* Darker secondary color */
}

.youtube-page .seo-content li strong {
    color: #FF0000;
}

.youtube-page .related-tools h2 {
    color: #FF0000;
}

.youtube-page .tool-card:hover {
    border-color: #FF0000;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.15);
}

.youtube-page .tool-card:hover h3 {
    color: #FF0000;
}

/* YouTube Attention Box (برای سرویس موقتاً غیرفعال) */
.attention-box {
    background: #fff3cd; /* Light yellow background */
    border: 1px solid #ffeeba;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin: 2rem 0;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.attention-box p {
    color: #856404; /* Dark yellow text */
    font-weight: 600;
    margin: 0;
}

.attention-box a {
    color: #0056b3; /* Blue for links */
    text-decoration: underline;
}

/* YouTube Unavailable Message */
.unavailable-message {
    background: #f8d7da; /* Light red background */
    border: 2px dashed #f5c6cb;
    padding: 30px;
    border-radius: var(--radius-md);
    color: #721c24; /* Dark red text */
    margin-top: 20px;
    text-align: center;
}

.unavailable-message h2 {
    color: #721c24 !important; /* Overriding YouTube red */
    margin-top: 0;
    font-size: 1.75rem;
}

.unavailable-message p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Twitter/X Brand Colors */
.twitter-page .hero-section {
    background: #000000; /* X Black */
    color: white;
}

.twitter-page .btn-primary {
    background: #000000;
    border: 2px solid #1DA1F2; /* Use Twitter Blue as accent */
    color: white;
}

.twitter-page .btn-primary:hover {
    background: #1DA1F2; /* Twitter Blue */
    border-color: #000000;
}

.twitter-page .form-input:focus {
    border-color: #1DA1F2;
    box-shadow: 0 0 0 4px rgba(29, 161, 242, 0.1);
}

.twitter-page .step-number {
    background: #1DA1F2; /* Twitter Blue */
}

.twitter-page .feature-card:hover {
    border-color: #1DA1F2;
}

.twitter-page h2 {
    color: #1DA1F2;
}

.twitter-page .seo-content h3 {
    color: #000000;
}

.twitter-page .seo-content li strong {
    color: #1DA1F2;
}

.twitter-page .related-tools h2 {
    color: #1DA1F2;
}

.twitter-page .tool-card:hover {
    border-color: #1DA1F2;
    box-shadow: 0 8px 20px rgba(29, 161, 242, 0.15);
}

.twitter-page .tool-card:hover h3 {
    color: #1DA1F2;
}

/* LinkedIn Brand Colors */
.linkedin-page .hero-section {
    background: #0077B5; /* LinkedIn Blue */
}

.linkedin-page .btn-primary {
    background: #0077B5;
}

.linkedin-page .btn-primary:hover {
    background: #005885;
}

.linkedin-page .form-input:focus {
    border-color: #0077B5;
    box-shadow: 0 0 0 4px rgba(0, 119, 181, 0.1);
}

.linkedin-page .step-number {
    background: #0077B5;
}

.linkedin-page .feature-card:hover {
    border-color: #0077B5;
}

.linkedin-page h2 {
    color: #0077B5;
}

.linkedin-page .seo-content h3 {
    color: #005885; /* Darker LinkedIn Blue */
}

.linkedin-page .seo-content li strong {
    color: #0077B5;
}

.linkedin-page .related-tools h2 {
    color: #0077B5;
}

.linkedin-page .tool-card:hover {
    border-color: #0077B5;
    box-shadow: 0 8px 20px rgba(0, 119, 181, 0.15);
}

.linkedin-page .tool-card:hover h3 {
    color: #0077B5;
}

/* Likee Brand Colors */
.likee-page .hero-section {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FF1744 100%);
}

.likee-page .btn-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FF1744 100%);
}

.likee-page .btn-primary:hover {
    background: linear-gradient(135deg, #E55A2A 0%, #E0831A 50%, #E0143A 100%);
}

.likee-page .form-input:focus {
    border-color: #FF6B35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.likee-page .step-number {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FF1744 100%);
}

.likee-page .feature-card:hover {
    border-color: #FF6B35;
}

.likee-page h2 {
    color: #FF6B35;
}

.likee-page .seo-content h3 {
    color: #F7931E;
}

.likee-page .seo-content li strong {
    color: #FF1744;
}

.likee-page .related-tools h2 {
    color: #FF6B35;
}

.likee-page .tool-card:hover {
    border-color: #FF6B35;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.15);
}

.likee-page .tool-card:hover h3 {
    color: #FF6B35;
}

/* SoundCloud Brand Colors */
.soundcloud-page .hero-section {
    background: #FF5500; /* SoundCloud Orange */
}

.soundcloud-page .btn-primary {
    background: #FF5500;
}

.soundcloud-page .btn-primary:hover {
    background: #E64A00;
}

.soundcloud-page .form-input:focus {
    border-color: #FF5500;
    box-shadow: 0 0 0 4px rgba(255, 85, 0, 0.1);
}

.soundcloud-page .step-number {
    background: #FF5500;
}

.soundcloud-page .feature-card:hover {
    border-color: #FF5500;
}

.soundcloud-page h2 {
    color: #FF5500;
}

.soundcloud-page .seo-content h3 {
    color: #E64A00; /* Darker SoundCloud Orange */
}

.soundcloud-page .seo-content li strong {
    color: #FF5500;
}

.soundcloud-page .related-tools h2 {
    color: #FF5500;
}

.soundcloud-page .tool-card:hover {
    border-color: #FF5500;
    box-shadow: 0 8px 20px rgba(255, 85, 0, 0.15);
}

.soundcloud-page .tool-card:hover h3 {
    color: #FF5500;
}

/* ==========================================
   SINGLE POST PAGE STYLES
   ========================================== */
.single-post-wrapper {
    padding: 4rem 0;
    background: var(--bg-secondary);
    min-height: 60vh;
}

.single-post-wrapper .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.blog-post {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 3rem;
    margin-bottom: 2rem;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

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

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta svg {
    stroke-width: 2;
}

.post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content h2 {
    font-size: 1.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content h4 {
    font-size: 1.25rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.75rem;
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
    transition: color 0.2s;
}

.post-content a:hover {
    color: var(--primary-dark);
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-tertiary);
    font-style: italic;
}

.post-content code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.post-content pre {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: transparent;
    padding: 0;
}

/* Video and iframe responsive styles for single posts */
.post-content video,
.post-content iframe {
    border-radius: var(--radius-lg);
    max-width: 100%;
}

/* Default responsive wrapper for embeds */
.post-content .wp-block-embed__wrapper,
.post-content .wp-block-video,
.post-content .video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Default 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin: var(--space-md) 0;
    background: var(--bg-tertiary);
}

.post-content .wp-block-embed__wrapper iframe,
.post-content .wp-block-video video,
.post-content .video-wrapper iframe,
.post-content .video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-lg);
}

/* Fallback for videos/iframes without wrapper (wrap them with JS) */
.post-content > video,
.post-content > iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: var(--space-md) 0;
}

/* Direct iframe/video styling for mobile - detect by common patterns */
@media (max-width: 768px) {
    /* TikTok embeds are usually vertical */
    .post-content iframe[src*="tiktok"],
    .post-content iframe[src*="vt.tiktok"] {
        max-width: 400px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* YouTube Shorts are vertical */
    .post-content iframe[src*="youtube.com/shorts"],
    .post-content iframe[src*="youtu.be"][src*="/shorts/"] {
        max-width: 400px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Instagram Reels are vertical */
    .post-content iframe[src*="instagram.com"][src*="/reel/"],
    .post-content iframe[src*="instagram.com"][src*="/tv/"] {
        max-width: 400px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Mobile responsive - adapt to video aspect ratio */
@media (max-width: 768px) {
    /* Vertical/Portrait videos - نمایش عمودی */
    .post-content .video-wrapper.portrait-video,
    .post-content .wp-block-embed__wrapper.portrait-video,
    .post-content .wp-block-video.portrait-video {
        max-width: 400px !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-top: 177.78% !important; /* 9:16 aspect ratio for portrait */
        max-height: 70vh;
    }
    
    /* Horizontal/Landscape videos - نمایش افقی */
    .post-content .video-wrapper.landscape-video,
    .post-content .wp-block-embed__wrapper.landscape-video,
    .post-content .wp-block-video.landscape-video {
        padding-top: 56.25% !important; /* 16:9 */
        max-height: 50vh;
    }
    
    /* For very small screens */
    @media (max-width: 480px) {
        .post-content .video-wrapper.portrait-video,
        .post-content .wp-block-embed__wrapper.portrait-video,
        .post-content .wp-block-video.portrait-video {
            max-width: 90% !important;
            max-height: 60vh;
        }
    }
}

/* Desktop - keep default behavior */
@media (min-width: 769px) {
    .post-content .video-wrapper,
    .post-content .wp-block-embed__wrapper,
    .post-content .wp-block-video {
        padding-top: 56.25%; /* Always 16:9 on desktop */
        max-height: 500px;
    }
}

.post-footer {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.post-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.post-tags svg {
    stroke-width: 2;
}

.post-tags a {
    background: var(--bg-secondary);
    padding: 0.35rem 0.875rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.post-tags a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 600;
    color: var(--text-primary);
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.share-btn.twitter { background: #1DA1F2; color: white; }
.share-btn.facebook { background: #1877F2; color: white; }
.share-btn.telegram { background: #0088cc; color: white; }

.post-ad-section {
    margin-bottom: 2rem;
}

.post-ad-section .ad-placeholder {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-tertiary);
    border-radius: var(--radius-md);
}

.post-ad-section .ad-placeholder p {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.post-ad-section .ad-placeholder small {
    font-size: 0.9rem;
    display: block;
}

.author-bio {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    border-radius: 50%;
    border: 3px solid var(--border);
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

.author-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.post-navigation a {
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    border: 2px solid transparent;
}

.post-navigation a:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.nav-subtitle {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.nav-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.nav-next {
    text-align: right;
}

@media (max-width: 768px) {
    .single-post-wrapper {
        padding: 2rem 0;
    }
    
    .blog-post {
        padding: 2rem 1.5rem;
        border-radius: 8px;
    }
    
    .post-title {
        font-size: 1.875rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .post-meta {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-post {
        padding: 1.5rem 1rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .share-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
   STATIC PAGE STYLES
   ========================================== */
.static-page-wrapper {
    padding: 4rem 0;
    background: var(--bg-secondary);
    min-height: 60vh;
}

.static-page-wrapper .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.static-page {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 3rem;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.page-thumbnail {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.page-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.page-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.page-content p {
    margin-bottom: 1.5rem;
}

.page-content h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.page-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.page-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.page-content ul,
.page-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.page-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.page-content ul li {
    list-style-type: disc;
}

.page-content ol li {
    list-style-type: decimal;
}

.page-content a {
    color: var(--primary);
    text-decoration: underline;
    transition: color 0.2s;
}

.page-content a:hover {
    color: var(--primary-dark);
}

.page-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-tertiary);
    font-style: italic;
    color: var(--text-secondary);
}

.page-content code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
}

.page-content pre {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.page-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.page-content table th,
.page-content table td {
    border: 1px solid var(--border);
    padding: 0.75rem;
    text-align: left;
}

.page-content table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

.page-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

@media (max-width: 768px) {
    .static-page-wrapper {
        padding: 2rem 0;
    }
    
    .static-page {
        padding: 2rem 1.5rem;
        border-radius: 8px;
    }
    
    .page-title {
        font-size: 1.875rem;
    }
    
    .page-content {
        font-size: 1rem;
    }
    
    .page-content h2 {
        font-size: 1.5rem;
    }
    
    .page-content h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .static-page {
        padding: 1.5rem 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

/* ==========================================
   COMMENTS SECTION STYLES
   ========================================== */
.comments-area {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 3rem;
    margin-top: 2rem;
}

.comments-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.comment-list .comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.comment-list .children {
    list-style: none;
    margin: 1.5rem 0 0 2rem;
    padding: 0;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.comment-author img {
    border-radius: 50%;
    border: 2px solid var(--border);
}

.comment-author .fn {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    font-style: normal;
}

.comment-metadata {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.comment-metadata a {
    color: var(--text-tertiary);
    text-decoration: none;
}

.comment-metadata a:hover {
    color: var(--primary);
}

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

.comment-content p {
    margin: 0 0 1rem 0;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.reply {
    margin-top: 1rem;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
}

.comment-reply-link:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.comment-reply-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
}

.comment-form {
    margin-top: 2rem;
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin-bottom: 1.5rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    margin-top: 1rem;
}

.no-comments {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

@media (max-width: 768px) {
    .comments-area {
        padding: 2rem 1.5rem;
    }
    
    .comment-list .children {
        margin-left: 1rem;
    }
    
    .comments-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .comments-area {
        padding: 1.5rem 1rem;
    }
    
    .comment-list .children {
        margin-left: 0.5rem;
    }
}

/* ==========================================
   404 ERROR PAGE STYLES
   ========================================== */
.error-404-wrapper {
    padding: 4rem 0;
    background: var(--bg-secondary);
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.error-404-wrapper .container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
}

.error-404-box {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 3rem;
    text-align: center;
}

.error-content {
    margin-bottom: 2.5rem;
}

.error-title {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-message {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
    font-weight: 500;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
    text-decoration: none;
}

.btn-home svg {
    stroke-width: 2;
}

.error-divider {
    height: 1px;
    background: var(--border);
    margin: 2.5rem 0;
}

.error-platforms h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    font-weight: 600;
}

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

.platform-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.platform-link:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.platform-icon {
    font-size: 2.5rem;
    display: block;
}

.platform-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .error-404-wrapper {
        padding: 2rem 0;
    }
    
    .error-404-box {
        padding: 2rem 1.5rem;
    }
    
    .error-title {
        font-size: 5rem;
    }
    
    .error-message {
        font-size: 1.25rem;
    }
    
    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .error-404-box {
        padding: 1.5rem 1rem;
    }
    
    .error-title {
        font-size: 4rem;
    }
    
    .error-message {
        font-size: 1.125rem;
    }
    
    .platforms-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   MOBILE BOTTOM MENU (Footer Navigation)
   ========================================== */
.elarin-mobile-footer-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-tertiary);
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid var(--bg-tertiary);
    z-index: 1000000000;
}

@media (max-width: 768px) {
    .elarin-mobile-footer-nav {
        display: block;
    }
    
    body {
        padding-bottom: 70px !important;
    }
}

.elarin-mobile-footer-nav ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.elarin-mobile-footer-nav li {
    flex-grow: 1;
    text-align: center;
    margin: 0;
}

.elarin-mobile-footer-nav li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #888888;
    padding: 8px 5px;
    transition: color 0.2s ease-in-out;
}

.elarin-mobile-footer-nav li a svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    fill: currentColor;
}

.elarin-mobile-footer-nav li a span {
    font-size: 11px;
}

.elarin-mobile-footer-nav li.is-active a {
    color: #544DE7;
    font-weight: 800;
}

/* Dark mode styles for bottom menu */
body.dark-mode .elarin-mobile-footer-nav {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

body.dark-mode .elarin-mobile-footer-nav li a {
    color: var(--text-tertiary);
}

body.dark-mode .elarin-mobile-footer-nav li a svg {
    fill: currentColor;
}

/* Active state in dark mode - white color */
body.dark-mode .elarin-mobile-footer-nav li.is-active a {
    color: #ffffff !important;
    font-weight: 800;
}

body.dark-mode .elarin-mobile-footer-nav li.is-active a svg {
    color: #ffffff !important;
}