:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899;
    --background-dark: #0f172a;
    --background-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --warning: #f59e0b;
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--background-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 20%);
    background-attachment: fixed;
}

/* --- Container & Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.main-header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.8);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.cta-nav {
    background: var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.cta-nav:hover {
    background: var(--primary-hover);
}

/* --- Hero Section --- */
.hero-section {
    padding: 50px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(to bottom right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.highlight {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.intro-text {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.benefit-list {
    display: flex;
    justify-content: center;
    gap: 25px;
    list-style: none;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.benefit-list li {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
}

/* --- Tool Main Interface --- */
.tool-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Upload Area */
.upload-area {
    padding: 60px 20px;
    border: 2px dashed var(--border-color);
    margin: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.icon-upload {
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Helper hidden class */
.hidden {
    display: none !important;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Editor Layout */
.tool-editor {
    height: 100%;
}

.editor-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    height: 600px;
}

.preview-container {
    background: #0f1218;
    /* Darker bg for contrast */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
}

.canvas-wrapper {
    max-width: 95%;
    max-height: 95%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    cursor: crosshair;
}

.controls-panel {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow-y: auto;
    background: #162032;
}

.control-group h4 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

/* Blur Modes Grid */
.blur-modes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mode-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mode-card.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
}

.mode-card .icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.mode-card span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Tool Toggles */
.tool-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tool-btn {
    flex: 1;
    padding: 10px;
    background: var(--background-dark);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.tool-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Sliders */
.range-wrapper {
    margin-bottom: 10px;
}

.range-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Action Buttons */
.full-width {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

/* Loader */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Result View */
.result-view {
    text-align: center;
    padding: 40px;
}

.success-header {
    margin-bottom: 30px;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.result-display img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

.download-btn {
    font-size: 1.1rem;
    padding: 15px 40px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.download-btn small {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Canvas Hint */
.canvas-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    pointer-events: none;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* =========================================
   SEO & Content Styles (Rich Content)
   ========================================= */

.seo-content {
    background: var(--background-dark);
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.long-form-content {
    max-width: 900px;
    margin: 0 auto;
}

.content-block {
    margin-bottom: 80px;
}

.content-block.text-center {
    text-align: center;
}

.content-block h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.content-block h3 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-top: 40px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-block p {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 25px;
}

/* --- Feature Grid (3 Cols) --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.feature-card .icon-lg {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
}

.feature-card p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* --- Sequence Steps (Numbered) --- */
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.step-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

.step-num {
    font-size: 3rem;
    font-weight: 800;
    opacity: 0.1;
    position: absolute;
    top: -10px;
    right: 15px;
    color: var(--primary-color);
    font-family: sans-serif;
}

.step-card h4 {
    margin: 15px 0 10px;
    font-size: 1.35rem;
    color: var(--text-main);
    position: relative;
    z-index: 1;
}

/* --- Accordion FAQ --- */
.faq-section {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.faq-accordion-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.faq-accordion {
    background: var(--background-card);
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-accordion:hover {
    border-color: var(--text-muted);
}

.faq-accordion[open] {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.faq-accordion summary {
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
    font-size: 1.1rem;
    user-select: none;
}

.faq-accordion summary::-webkit-details-marker {
    display: none;
}

.faq-accordion summary .arr {
    transition: transform 0.3s;
    font-size: 0.8rem;
    opacity: 0.6;
}

.faq-accordion[open] summary .arr {
    transform: rotate(180deg);
    color: var(--primary-color);
    opacity: 1;
}

.faq-body {
    padding: 0 20px 25px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 10px;
    animation: fadeDown 0.3s ease;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Premium Footer
   ========================================= */
.main-footer {
    background: #0b1120;
    padding: 80px 0 30px;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 60px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
}

.footer-logo span {
    color: var(--primary-color);
}

.brand-col p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 30px;
    opacity: 0.8;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.social-icons svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
}

.footer-col h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 25px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.2s;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.separator {
    opacity: 0.3;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

/* =========================================
   Mobile Responsiveness
   ========================================= */
@media (max-width: 900px) {
    .editor-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .preview-container {
        height: 400px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .controls-panel {
        height: auto;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
        /* Simple hiding for MVP */
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .benefit-list {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}