:root {
    --bg-dark: #0f172a;
    --purple-primary: #8b5cf6;
    --purple-glow: rgba(139, 92, 246, 0.3);
    --purple-dark: #6d28d9;
    --text-light: #fff7ed;
    /* amber-50 */
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

#spotlight-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    background: radial-gradient(circle at 50% 40%, rgb(88, 28, 135) 0%, #0F172A 70%);
}

.container {
    max-width: 1200px;
    /* Increased for two-column layout */
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    padding: 0 1rem;
}

.logo-area {
    display: flex;
    flex-direction: column;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    /* Changed to white */
    font-weight: 500;
    height: 1.2rem;
    /* Keep space for typing */
    opacity: 0.9;
}

.main-nav ul {
    display: flex;
    gap: 1rem;
    list-style: none;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
}

.main-nav li {
    display: flex;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.6rem 1.2rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.main-nav a i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.main-nav a:hover {
    color: var(--text-light);
    background: rgba(139, 92, 246, 0.15);
    transform: translateY(-1px);
}

.main-nav a:hover i {
    transform: scale(1.1);
    color: var(--purple-primary);
}

.main-nav a.active {
    color: var(--text-light);
    background: rgba(139, 92, 246, 0.2);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    width: 45px;
    height: 45px;
    border-radius: 0.75rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 2100;
}

.mobile-menu-toggle:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--purple-primary);
}

.mobile-menu-toggle.active i::before {
    content: "\f00d";
    /* FontAwesome times/close icon */
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    padding: 0.6rem 0.8rem;
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--purple-primary);
}

.lang-btn i {
    font-size: 0.7rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.lang-dropdown:hover .lang-btn i {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 0.5rem;
    min-width: 60px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.lang-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    padding: 0.6rem !important;
    border-radius: 0.6rem !important;
    justify-content: center !important;
    font-size: 1.3rem !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.dropdown-content a:hover {
    background: rgba(139, 92, 246, 0.15) !important;
    transform: scale(1.1);
}

.flag {
    line-height: 1;
    display: inline-block;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.main-extractor {
    margin-bottom: 0;
    /* Handled by grid gap */
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-extractor:hover {
    border-color: var(--purple-primary);
}

.drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 1rem;
    padding: 6rem 2rem;
    /* Increased padding */
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.drop-zone.drag-over {
    border-color: var(--purple-primary);
    background: rgba(139, 92, 246, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    color: var(--purple-primary);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px var(--purple-glow));
}

.drop-text {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.file-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Processing State */
.processing-state {
    padding: 5rem;
    text-align: center;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--purple-primary);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Result Area */
.result-area {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.frame-preview-container {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
    background: #000;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

#frame-canvas {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

#frame-canvas:hover {
    opacity: 0.9;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--purple-primary);
    color: white;
    box-shadow: 0 4px 14px 0 var(--purple-glow);
}

.btn-primary:hover {
    background-color: var(--purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Instructions Sidebar */
.instructions {
    position: sticky;
    top: 2rem;
}

.instructions h3 {
    margin-bottom: 1.5rem;
    color: var(--purple-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.instructions ul {
    list-style: none;
}

.instructions li {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.instructions li::before {
    content: "//";
    position: absolute;
    left: 0;
    color: var(--purple-primary);
    opacity: 0.6;
    font-weight: bold;
}

footer {
    margin-top: auto;
    padding: 3rem 0;
    text-align: left;
    padding-left: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.hidden {
    display: none !important;
}

.typing-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .instructions {
        position: static;
    }
}

@media (max-width: 640px) {
    .logo {
        font-size: 2.2rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .drop-zone {
        padding: 4rem 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2000;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 2rem;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1.5rem;
        background: none;
        border: none;
        width: 100%;
        max-width: 300px;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        font-size: 1.2rem;
        padding: 1rem;
        justify-content: center;
        width: 100%;
    }

    .lang-dropdown {
        justify-content: center;
        width: 100%;
    }

    .lang-btn {
        width: 100%;
        justify-content: center;
    }

    .dropdown-content {
        left: 50%;
        right: auto;
        transform: translate(-50%, 10px);
        min-width: 200px;
        flex-direction: row;
        justify-content: center;
    }

    .lang-dropdown:hover .dropdown-content {
        transform: translate(-50%, 0);
    }
}

.hidden {
    display: none !important;
}

.typing-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* About Page Specific Styles */
.about-header {
    margin-bottom: 4rem;
    text-align: center;
}

.about-header h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--purple-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-hero {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
    opacity: 0.9;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--purple-primary);
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--purple-primary);
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.creator-section {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 5rem;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
    border-radius: 2rem;
    border: 1px solid var(--glass-border);
}

.creator-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #fff;
}

.creator-info p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-cta {
    text-align: center;
    padding: 4rem 2rem;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    border-radius: 2rem;
}

.about-cta h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-cta p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .creator-section {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .about-header h2 {
        font-size: 2.5rem;
    }
}