@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --glass: rgba(30, 41, 59, 0.7);
    --radius: 12px;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.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);
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15), transparent 50%);
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
}

.intro-text {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.benefit-list {
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.benefit-list li {
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tool Wrapper */
.tool-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    max-width: 1000px;
    margin: 0 auto;
    min-height: 400px;
    position: relative;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 80px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.icon-upload {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.upload-content p {
    color: var(--text-muted);
}

/* Editor Layout */
.tool-editor.hidden {
    display: none;
}

.editor-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
}

.preview-container {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    border: 1px solid var(--border);
}

.img-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
}

#imagePreview {
    max-width: 100%;
    max-height: 500px;
    display: block;
    user-select: none;
}

/* Watermark Overlay Element within Preview */
#watermarkOverlay {
    position: absolute;
    cursor: move;
    user-select: none;
    transform-origin: center center;
    border: 1px dashed rgba(255, 255, 255, 0.5);
    padding: 5px;
    white-space: nowrap;
}

#watermarkOverlay:hover {
    border-color: var(--primary);
}

#watermarkOverlay img {
    pointer-events: none;
    display: block;
}

/* Controls */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.control-group h4 {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.premium-input,
.premium-select {
    width: 100%;
    background: var(--dark-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.premium-input:focus,
.premium-select:focus {
    border-color: var(--primary);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--dark-bg);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

/* Grid for Positions */
.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pos-btn {
    background: var(--dark-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    height: 40px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.pos-btn:hover,
.pos-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.primary-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.primary-btn:hover {
    background: var(--primary-hover);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tab-switcher {
    display: flex;
    background: var(--dark-bg);
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--card-bg);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hidden {
    display: none !important;
}

/* Result View */
.result-view {
    text-align: center;
    padding: 40px 0;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.result-display img {
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 30px 0;
}

.download-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.download-btn {
    text-decoration: none;
    width: auto;
    padding: 16px 32px;
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* SEO Content - Natural Flow */
/* SEO Content - Numbered/Clean Style */
.seo-content {
    padding: 60px 0;
    max-width: 900px;
    margin: 0 auto;
}

.seo-content h2 {
    color: #fff;
    margin-top: 70px;
    /* More breathing room */
    margin-bottom: 30px;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

/* Paragraphs */
.seo-content p {
    margin-bottom: 25px;
    color: #cbd5e1;
    font-size: 1.15rem;
    line-height: 1.8;
}

/* Engaging List (Standard) */
.seo-list {
    list-style: none;
    padding-left: 10px;
    margin-bottom: 40px;
}

.seo-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.7;
}

.seo-list li::before {
    content: "✔";
    /* Tick mark for benefits */
    color: var(--primary);
    position: absolute;
    left: 0;
    font-size: 1.1rem;
    top: 2px;
    font-weight: bold;
}

.seo-list li strong {
    color: #fff;
    font-weight: 600;
}

/* HIGH ENGAGING: Process Timeline for "How To" */
.process-steps {
    list-style: none;
    counter-reset: step-counter;
    margin: 40px 0;
    position: relative;
    padding-left: 20px;
    border-left: 2px solid rgba(99, 102, 241, 0.2);
    /* Guide line */
}

.process-steps li {
    position: relative;
    padding-left: 45px;
    margin-bottom: 40px;
    counter-increment: step-counter;
}

/* Number Bubble */
.process-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: -21px;
    /* Center on the border line */
    top: -5px;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 50%;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
    transition: transform 0.3s, background 0.3s;
}

.process-steps li:hover::before {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.process-steps li h5 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.process-steps li p {
    font-size: 1.05rem;
    margin-bottom: 0;
    color: var(--text-muted);
}



/* Feature Grid for SEO */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feature-card {
    background: var(--card-bg);
    /* Keep features in cards for contrast */
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.feature-card h4 {
    color: var(--text-main);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* New Controls */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--dark-bg);
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.text-content ul {
    margin-bottom: 25px;
    padding-left: 20px;
    color: #cbd5e1;
}

.text-content ul li {
    margin-bottom: 10px;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.faq-item {
    background: var(--dark-bg);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.faq-item h4 {
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 1.1rem;
    line-height: 1.4;
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Footer */
.main-footer {
    background: var(--card-bg);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border);
    margin-top: 60px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 40px;
}

.brand-desc {
    color: var(--text-muted);
    max-width: 300px;
    margin-top: 15px;
}

.footer-col h4 {
    margin-bottom: 20px;
    color: var(--text-main);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    color: var(--text-muted);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        /* simple hidden for mobile, real header needs mobile menu */
    }
}