/* Global Reset & Variables */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --accent: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --success: #4cc9f0;
    --danger: #ef233c;
    --warning: #ff9e00;
    --border-radius: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
    
    /* Dark Mode Variables */
    --bg-dark: #121826;
    --card-dark: #1e293b;
    --text-dark: #f1f5f9;
    --border-dark: #334155;
}

/* Dark Mode */
body.night-mode {
    background: var(--bg-dark);
    color: var(--text-dark);
}

body.night-mode .hero,
body.night-mode .feature-card,
body.night-mode .step,
body.night-mode .platform,
body.night-mode .faq-item,
body.night-mode .url-input-container,
body.night-mode footer {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

body.night-mode h1,
body.night-mode h2,
body.night-mode h3,
body.night-mode h4,
body.night-mode p {
    color: var(--text-dark);
}

body.night-mode input {
    background: var(--bg-dark);
    color: var(--text-dark);
    border-color: var(--border-dark);
}

body.night-mode input::placeholder {
    color: #94a3b8;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.highlight {
    color: var(--primary);
    font-weight: 700;
}

.section-subtitle {
    color: var(--gray);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.night-mode header {
    background: rgba(30, 41, 59, 0.95);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 2rem;
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

body.night-mode nav a {
    color: var(--text-dark);
}

nav a:hover {
    color: var(--primary);
}

nav a i {
    font-size: 0.9rem;
}

.theme-toggle {
    background: var(--light-gray);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

body.night-mode .theme-toggle {
    background: var(--border-dark);
    color: var(--text-dark);
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    transform: rotate(30deg);
}

/* Hero Section */
.hero {
    padding: 5rem 0 3rem;
    text-align: center;
}

.hero h2 {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 1.3rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.url-input-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

body.night-mode .url-input-container {
    background: var(--card-dark);
}

.url-input-container i {
    color: var(--primary);
    font-size: 1.2rem;
}

.url-input-container input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    background: transparent;
}

.download-btn {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(67, 97, 238, 0.3);
}

.form-hint {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 3rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--gray);
    font-weight: 500;
}

/* Download Results Modal Styles */
.download-results {
    background: white;
    border-radius: var(--border-radius);
    padding: 0;
    margin: 2rem auto;
    box-shadow: var(--shadow-lg);
    max-width: 1000px;
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

body.night-mode .download-results {
    background: var(--card-dark);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.download-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
}

.video-info {
    display: flex;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .video-info {
        flex-direction: column;
        text-align: center;
    }
}

.thumbnail-container {
    position: relative;
    width: 200px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.video-details h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.video-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.video-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

/* Quality Tabs */
.quality-tabs {
    display: flex;
    background: var(--light-gray);
    padding: 0.5rem;
    margin: 1.5rem;
    border-radius: 10px;
}

body.night-mode .quality-tabs {
    background: var(--border-dark);
}

.tab-btn {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.night-mode .tab-btn.active {
    background: var(--card-dark);
    color: var(--text-dark);
}

/* Download Options Grid */
.download-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
}

.download-option {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: var(--transition);
}

body.night-mode .download-option {
    background: var(--card-dark);
}

.download-option:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.option-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.format-badge {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.quality-badge {
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.option-body h4 {
    margin-bottom: 1rem;
    color: var(--dark);
}

body.night-mode .option-body h4 {
    color: var(--text-dark);
}

.option-details {
    margin-bottom: 1.5rem;
}

.option-details p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.option-details i {
    width: 16px;
    color: var(--primary);
}

.download-link {
    display: block;
    text-align: center;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.download-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Quick Download Section */
.quick-download {
    padding: 1.5rem;
    border-top: 1px solid var(--light-gray);
}

body.night-mode .quick-download {
    border-top-color: var(--border-dark);
}

.quick-download h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

body.night-mode .quick-download h3 {
    color: var(--text-dark);
}

.quick-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-btn {
    flex: 1;
    min-width: 200px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.video-btn {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.audio-btn {
    background: rgba(114, 9, 183, 0.1);
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.quick-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-btn:hover {
    background: var(--primary);
    color: white;
}

.audio-btn:hover {
    background: var(--secondary);
    color: white;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 3rem 2rem;
}

.error-message i {
    font-size: 4rem;
    color: var(--danger);
    margin-bottom: 1.5rem;
}

.error-message h3 {
    color: var(--dark);
    margin-bottom: 1rem;
}

body.night-mode .error-message h3 {
    color: var(--text-dark);
}

.error-message p {
    color: var(--gray);
    max-width: 500px;
    margin: 0 auto;
}

/* Filter functionality */
.download-option.hidden {
    display: none;
}

/* Scrollbar Styling */
.download-options-grid::-webkit-scrollbar {
    width: 8px;
}

.download-options-grid::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 4px;
}

body.night-mode .download-options-grid::-webkit-scrollbar-track {
    background: var(--border-dark);
}

.download-options-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.download-options-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.results-content {
    text-align: center;
}

.results-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    max-height: 300px;
    object-fit: cover;
}

.results-content h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.results-content p {
    color: var(--gray);
    margin-bottom: 2rem;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.download-options a {
    text-decoration: none;
}

.download-options button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.download-options button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.2);
}

/* How It Works */
.how-it-works {
    padding: 5rem 0;
    text-align: center;
}

.how-it-works h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.step {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body.night-mode .step {
    background: var(--card-dark);
}

.step:hover {
    transform: translateY(-10px);
}

.step-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.step-number {
    position: absolute;
    top: -10px;
    left: -10px;
    background: var(--accent);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-icon i {
    font-size: 2.5rem;
    color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

body.night-mode .step h3 {
    color: var(--text-dark);
}

/* Features */
.features {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

body.night-mode .features {
    background: var(--bg-dark);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body.night-mode .feature-card {
    background: var(--card-dark);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

body.night-mode .feature-card h3 {
    color: var(--text-dark);
}

/* Platforms */
.platforms {
    padding: 5rem 0;
    text-align: center;
}

.platforms h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.platform {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body.night-mode .platform {
    background: var(--card-dark);
}

.platform:hover {
    transform: translateY(-5px);
    background: var(--primary);
    color: white;
}

.platform:hover i {
    color: white;
}

.platform i {
    font-size: 1.5rem;
    color: var(--primary);
}

/* FAQ */
.faq {
    padding: 5rem 0;
}

.faq h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

body.night-mode .faq-item {
    background: var(--card-dark);
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-question h3 {
    font-size: 1.2rem;
}

.faq-question i {
    transition: var(--transition);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-bottom: 1.5rem;
}

.faq-answer p {
    color: var(--gray);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

body.night-mode footer {
    background: #0f172a;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: #adb5bd;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    padding-left: 5px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: var(--accent);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #495057;
    color: #adb5bd;
    font-size: 0.9rem;
}

.disclaimer {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 1rem;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: white;
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .url-input-container {
        flex-direction: column;
    }
    
    .download-btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero {
        padding: 3rem 0 2rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero .subtitle {
        font-size: 1.1rem;
    }
    
    .steps, .features-grid, .platforms-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Logo Styles - Simple */
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px; /* Adjust based on your logo */
    width: auto;
    transition: all 0.3s ease;
}

/* Remove old icon */
.logo i.fa-video {
    display: none;
}

/* Remove old text */
.logo h1 {
    display: none;
}

/* Logo hover effect */
.logo:hover .logo-img {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .logo-img {
        height: 35px;
    }
}