:root {
    /* Color Palette */
    --bg-color: #0d0e15;
    --bg-darker: #08090d;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(13, 14, 21, 0.8);
    --hero-glow: rgba(138, 43, 226, 0.15);
    --hero-glow-transparent: rgba(13, 14, 21, 0);
    --faq-active: rgba(255, 255, 255, 0.1);
    --btn-primary-text: white;

    /* Neon Colors */
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-purple: #8a2be2;
    --text-main: #f0f0f0;
    --text-muted: #a0a0b0;

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
    --hover-gradient: linear-gradient(135deg, #ff33ff, #33ffff);
}

[data-theme="light"] {
    --bg-color: #f0f4f8;
    --bg-darker: #e1e8f0;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(240, 244, 248, 0.8);
    --hero-glow: rgba(138, 43, 226, 0.1);
    --hero-glow-transparent: rgba(240, 244, 248, 0);
    --faq-active: rgba(0, 0, 0, 0.05);
    --btn-primary-text: #ffffff;

    --text-main: #1a1a24;
    --text-muted: #5b5b6b;

    --neon-pink: #d900d9;
    --neon-cyan: #00b3b3;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

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

/* Typography & Neons */
.neon-text {
    color: transparent;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
    font-weight: 800;
}

.white-text {
    color: var(--text-main);
    font-weight: 800;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Hero Section */
.hero {
    padding: 80px 0 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Background Glow Effect */
.hero::before {
    display: none !important;
}

.glow-title {
    font-size: 3.5rem;
    margin-bottom: 10px;
    font-weight: 800;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Form & Input */
.search-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: rgba(0, 255, 255, 0.3);
}

form {
    display: flex;
    gap: 10px;
}

input[type="url"] {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 25px;
    color: var(--text-main);
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
}

input::placeholder {
    color: rgba(160, 160, 176, 0.6);
}

/* Button Styles */
.neon-btn {
    background: var(--primary-gradient);
    border: none;
    border-radius: 40px;
    padding: 15px 30px;
    color: var(--btn-primary-text);
    font-family: inherit;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
    text-decoration: none;
}

.neon-btn:hover {
    background: var(--hover-gradient);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
    transform: scale(1.05);
}

.icon {
    width: 20px;
    height: 20px;
}

/* Loading Result State */
.hidden {
    display: none !important;
}

#loading {
    margin: 40px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--neon-cyan);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

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

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

/* Result Box */
.result-box {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    display: flex;
    gap: 30px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.video-preview {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.video-preview img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.download-options {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.download-options h2 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-primary {
    justify-content: center;
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    box-shadow: 0 0 15px rgba(0, 198, 255, 0.4);
}

.btn-secondary {
    justify-content: center;
    background: transparent;
    border: 1px solid var(--glass-border);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.btn-tertiary {
    justify-content: center;
    background: linear-gradient(135deg, var(--neon-purple), #ff00ff);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

.outline-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 10px;
}

.outline-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* Content Sections */
.content-section {
    padding: 80px 0;
}

.darker-bg {
    background-color: var(--bg-darker);
}

.content-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.step-card {
    padding: 30px;
    text-align: left;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 0, 255, 0.3);
}

.step-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

.step-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

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

.seo-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.seo-text h3 {
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.seo-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    padding: 25px;
    text-align: left;
}

.faq-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.faq-item p {
    color: var(--text-muted);
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 0 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-logo span {
    color: var(--text-muted);
}

.disclaimer {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 600px;
}

.footer-links {
    margin-top: 10px;
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

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

/* AdSense Placeholders */
.adsense-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px auto;
}

.banner-ad {
    width: 100%;
    max-width: 728px;
    height: 90px;
}

.square-ad {
    width: 300px;
    height: 250px;
}

/* Responsiveness */
@media (max-width: 768px) {
    .glow-title {
        font-size: 2.5rem;
    }

    form {
        flex-direction: column;
        border-radius: 20px;
    }

    .search-box {
        border-radius: 20px;
        padding: 15px;
    }

    .neon-btn {
        width: 100%;
        justify-content: center;
        border-radius: 12px;
    }

    .result-box {
        flex-direction: column;
    }
}

/* Theme Switch (Neumorphic Inset Style) */
.theme-switch {
    display: inline-block;
    position: relative;
    width: 60px;
    height: 32px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-darker);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5), inset 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
}

.theme-switch .slider .theme-switch-icon {
    position: absolute;
    content: "";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 3px;
    background-color: var(--nav-bg);
    transition: .4s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 50%;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    z-index: 2;
}

[data-theme="light"] .theme-switch .slider {
    background-color: rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1), inset 0 4px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .theme-switch .slider .theme-switch-icon {
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), inset 0 -1px 1px rgba(0, 0, 0, 0.05);
}

input:checked+.slider .theme-switch-icon {
    transform: translateX(26px);
}

/* Language Dropdown Styling */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropbtn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--text-main);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-dropbtn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    bottom: 100%;
    /* Opens upwards */
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    min-width: 140px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 0px;
    z-index: 1000;
    overflow: hidden;
}

/* Ensure the gap between button and menu is hoverable securely */
.lang-dropdown,
.legal-dropdown-mobile {
    position: relative;
    display: inline-block;
}

/* We create an invisible pseudo-element to bridge the gap between button and dropdown */
.lang-dropdown::after,
.legal-dropdown-mobile::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    height: 15px;
    /* bridges the gap */
}

/* Hover works for mouse devices */
@media (hover: hover) and (pointer: fine) {

    .lang-dropdown:hover .lang-dropdown-content,
    .legal-dropdown-mobile:hover .lang-dropdown-content {
        display: block;
        animation: fadeIn 0.2s ease-out;
    }
}

/* JS toggle class for mobile support */
.lang-dropdown.active-mobile .lang-dropdown-content,
.legal-dropdown-mobile.active-mobile .lang-dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

/* Responsive Legal Links */
.legal-dropdown-mobile {
    display: none;
}

.legal-links-desktop {
    display: flex;
    gap: 15px;
    align-items: center;
}

@media screen and (max-width: 768px) {
    .legal-links-desktop {
        display: none !important;
    }

    .legal-dropdown-mobile {
        display: inline-block !important;
    }

    .legal-dropbtn {
        display: flex;
        align-items: center;
        gap: 8px;
        background: transparent;
        border: none;
        color: var(--text-muted);
        font-family: inherit;
        font-size: 0.9rem;
        cursor: pointer;
        padding: 0;
    }

    .legal-dropdown-content {
        bottom: 150%;
    }
}

.lang-dropdown-content a {
    color: var(--text-main);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.lang-dropdown-content a:hover {
    background: rgba(0, 255, 255, 0.1);
    color: var(--neon-cyan);
}

.active-lang {
    font-weight: 800 !important;
    background: rgba(255, 0, 255, 0.05);
    color: var(--neon-magenta) !important;
}

.globe-icon,
.chevron-icon {
    opacity: 0.8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Platform Selector */
.platform-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.platform-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.platform-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.active-tab {
    background: var(--primary-gradient);
    color: var(--btn-primary-text);
    border: none;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

.active-tab:hover {
    background: var(--hover-gradient);
    color: var(--btn-primary-text);
}

/* Megatutorial Typography Fixes */
.content-section h2 { margin-bottom: 25px; line-height: 1.3; }
.content-section h3 { margin-top: 30px; margin-bottom: 15px; color: var(--neon-cyan); }
.content-section p { line-height: 1.8; margin-bottom: 20px; font-size: 1.1rem; color: var(--text-muted); }
.content-section ul { margin-left: 20px; margin-bottom: 20px; color: var(--text-muted); line-height: 1.8; }
.content-section ul li { margin-bottom: 10px; }

/* Blog Index Cards */
.blog-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(2, 1fr);
}
.blog-card {
    background: var(--glass-bg); 
    backdrop-filter: blur(10px);
    padding: 30px; 
    border-radius: 12px; 
    text-decoration: none; 
    color: var(--text-main); 
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s;
}
.blog-card:hover { transform: translateY(-5px); border-color: var(--neon-cyan); }
.blog-card h2 { margin-top: 0; color: var(--text-main); font-size: 1.3rem; line-height: 1.4; margin-bottom: 15px;}
.blog-card p { color: var(--text-muted); flex-grow: 1; margin-bottom: 20px; font-size: 1rem; line-height: 1.6;}
.blog-btn { align-self: flex-start; background: var(--primary-gradient); color: var(--btn-primary-text); padding: 10px 20px; border-radius: 8px; font-weight: 600; text-decoration: none !important; transition: transform 0.2s; border: none; }
.blog-btn:hover { transform: translateY(-3px); color: var(--btn-primary-text); text-decoration: none !important; }



@media (max-width: 768px) {
    .nav-links {
        gap: 15px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 0.9rem;
        width: 100%;
    }
    .nav-links a {
        padding: 5px;
        white-space: nowrap;
        line-height: normal;
    }
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        height: auto;
    }
    .blog-grid {
        grid-template-columns: 1fr; /* 1 Column on Mobile */
    }
}


/* AI-Style Hero Animations */
.hero {
    position: relative;
}

.hero .adsense-placeholder {
    display: none !important;
}

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

.animated-bg {
    display: none !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(150px);
    opacity: 0.6;
    border-radius: 50%;
    animation: float 12s infinite ease-in-out alternate;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: rgba(255, 0, 255, 0.5);
    top: -20%;
    left: -10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: rgba(0, 255, 255, 0.4);
    top: 10%;
    right: -10%;
    animation-delay: -4s;
}

.blob-3 {
    width: 550px;
    height: 550px;
    background: rgba(79, 172, 254, 0.3);
    top: 30%;
    left: 30%;
    animation-delay: -8s;
}

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

/* 3D Hero Image Styling */
.hero-3d-container {
    position: absolute;
    right: 5%;
    top: 10%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
}

.hero-3d-image {
    width: 400px;
    height: auto;
    border-radius: 30px;
    mask-image: radial-gradient(circle, black 50%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle, black 50%, transparent 100%);
    animation: levitate 6s infinite ease-in-out;
}

@keyframes levitate {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(2deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

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

.hero .glow-title {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.hero .subtitle {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.hero .search-box {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

/* Make neon text animated gradient */
.neon-text {
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}
