:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #a855f7;
    --success: #10b981;
    --success-hover: #059669;
    --info: #0ea5e9;
    --bg-main: #09090b;
    /* Very dark background */
    --bg-card: rgba(24, 24, 27, 0.6);
    --bg-nav: rgba(9, 9, 11, 0.8);
    --text-main: #fafafa;
    --text-muted: #a1a1aa;
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    --radius-full: 9999px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px -10px var(--primary-glow);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}

.glow-1 {
    top: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--primary);
}

.glow-2 {
    bottom: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--secondary);
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    animation: twinkle infinite;
    opacity: 0;
}

@keyframes twinkle {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 0.6;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* General Layout Options */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.container-sm {
    max-width: 900px;
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-info {
    color: var(--info);
}

.text-muted {
    color: var(--text-muted);
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.cursor-pointer {
    cursor: pointer;
}

.w-full {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1;
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(16, 185, 129, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-main);
}

.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.btn-icon:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* 1. Header & Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
}

.logo-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.logo-icon {
    color: white;
    font-size: 1.1rem;
}

.logo span {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* 2. Hero Section */
.main-content {
    flex: 1;
    padding-top: 120px;
}

.hero {
    padding: 3rem 0 5rem;
    text-align: center;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1.5px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* Converter Card Area */
.converter-wrapper {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.converter-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    text-align: left;
}

.converter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* 3. Upload Section */
.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.drop-zone.dragover {
    transform: scale(1.02);
}

.upload-icon-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.2;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.upload-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

/* File Action Display */
.file-preview-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.preview-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    overflow: hidden;
}

.preview-image-container {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.preview-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* 4. Format Selection Dropdown */
.conversion-settings {
    margin-bottom: 2rem;
}

.conversion-settings h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-row label {
    font-weight: 500;
    color: var(--text-muted);
}

.custom-select-wrapper {
    position: relative;
    width: 250px;
}

.custom-select {
    appearance: none;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    font-family: inherit;
}

.custom-select:hover,
.custom-select:focus {
    border-color: var(--primary);
}

.custom-select option {
    background-color: var(--bg-card);
    color: var(--text-main);
}

.select-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.85rem;
}

/* 5. Convert & Result Animations */
.success-content {
    text-align: center;
    padding: 2rem 0;
    animation: slideUpFade 0.5s ease;
}

.success-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
}

.success-icon-container {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    animation: scaleInBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-actions {
    max-width: 400px;
    margin: 0 auto;
}

/* Glass Loader */
.glass-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Features Section */
.features {
    padding: 5rem 0;
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
}

.feature-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card h4 {
    font-size: 1.2rem;
}

/* 7. Footer */
.footer {
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.4);
    padding-top: 4rem;
    margin-top: auto;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.link-group h5 {
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.link-group a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.85rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.link-group a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--text-main);
}

/* Utilities */
.hidden {
    display: none !important;
}

.active {
    display: block;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleInBounce {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Setup Overlay wrapper for loader so it sits over the card */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* How it Works */
.how-it-works,
.faq {
    padding: 5rem 0;
    position: relative;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.section-header {
    margin-bottom: 3.5rem;
    text-align: center;
}

.section-header h2 {
    font-size: 2.25rem;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
}

.step-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.3s;
    position: relative;
    z-index: 1;
}

.step-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
}

.step-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-glow);
}

/* FAQ */
.faq-grid {
    display: grid;
    gap: 1.5rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
    transition: background 0.3s;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.faq-item h4 {
    font-size: 1.15rem;
    color: var(--text-main);
}

/* Responsive */
@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .mobile-hidden {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr 1fr;
    }

    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .custom-select-wrapper {
        width: 100%;
    }

    .converter-card {
        padding: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}