:root {
    /* Brand Palette: Deep Space Blue & Electric Cyan */
    --primary: #38bdf8;
    /* Sky 400 - Electric Blue Accent */
    --primary-hover: #0ea5e9;
    /* Sky 500 */
    --primary-bg: rgba(56, 189, 248, 0.15);
    /* Glassy Highlight */

    --bg-body: #0b1120;
    /* Deepest Navy (Almost Black) */
    --bg-surface: #1e293b;
    /* Slate 800 (Cards) */
    --bg-surface-2: #334155;
    /* Slate 700 (Inputs/Hovers) */

    --text-main: #f8fafc;
    /* Slate 50 - High Contrast White */
    --text-muted: #94a3b8;
    /* Slate 400 - Muted Text */

    --border-color: #334155;
    /* Slate 700 */
    --border-focus: #38bdf8;

    --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.15);
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5);

    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;

    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.main-header {
    background: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--text-main);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* Hero */
.hero-section {
    padding: 6rem 0 3rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff 20%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.3));
}

.intro-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 3rem;
}

.benefit-list {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.benefit-list li {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-card);
}

/* Tool Interface Cards */
.tool-wrapper {
    background: rgba(30, 41, 59, 0.7);
    /* Surface with opacity */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

/* Engaging Upload Area */
.upload-area {
    border: 2px dashed rgba(56, 189, 248, 0.3);
    /* Subtle blue dash */
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 41, 59, 0.4) 100%);
    border-radius: var(--radius-lg);
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 3rem;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(56, 189, 248, 0.15);
}

/* Pulse Icon */
.icon-container-pulse {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-bg-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--primary);
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.5;
}

.icon-upload {
    width: 48px;
    height: 48px;
    color: var(--primary);
    z-index: 2;
    filter: drop-shadow(0 0 10px var(--primary));
}

/* Feature Tags */
.feature-tags-grid {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
    margin-top: 2rem;
    opacity: 0.7;
}

.tag-item {
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes ping {

    75%,
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.upload-content h3 {
    color: var(--text-main);
    margin-top: 1rem;
}

.upload-content p {
    color: var(--text-muted);
}


/* Editor Layout */
.editor-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
}

/* Preview */
.preview-container {
    background: #000000;
    /* True black for contrast check */
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative;
    background-image: radial-gradient(#1e293b 1px, transparent 1px);
    background-size: 20px 20px;
    /* Grid pattern */
}

.img-container img {
    max-width: 100%;
    max-height: 550px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.file-info-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Controls */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.control-group h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Custom Select */
.select-wrapper select {
    width: 100%;
    padding: 1rem;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.select-wrapper select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

/* Compare Button */
#compareBtn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 0.8rem;
    width: 100%;
    border-radius: var(--radius-md);
    font-weight: 500;
}

#compareBtn:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Toggles */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.slider {
    width: 44px;
    height: 24px;
    background: var(--bg-surface-2);
    border-radius: 24px;
    position: relative;
    transition: .3s;
    border: 1px solid var(--border-color);
}

.slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: .3s;
}

input:checked+.slider {
    background: var(--primary);
    border-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.label {
    color: var(--text-main);
    font-size: 0.95rem;
}

/* Primary Action Button */
.primary-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.4);
    position: relative;
    overflow: hidden;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(14, 165, 233, 0.6);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Result View */
.result-view {
    text-align: center;
    padding: 2rem 0;
    animation: fadeUp 0.5s ease;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease;
}

.stats-row {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: var(--text-muted);
}

.stat-value {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    display: block;
}

.download-btn {
    display: inline-block;
    width: auto;
    min-width: 200px;
}

.secondary-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-left: 1rem;
}

.secondary-btn:hover {
    color: white;
    border-color: white;
}

/* Loader */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 17, 32, 0.9);
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* --- SEO Timeline Design (High Engagement) --- */
.seo-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Vertical Line */
.seo-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), rgba(56, 189, 248, 0.1));
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 4rem;
}

/* Number Circle */
.timeline-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
    background: var(--bg-surface);
    border: 2px solid var(--primary);
    border-radius: 50%;
    color: var(--primary);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.timeline-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    position: relative;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateX(5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-card);
}

.timeline-content h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    color: var(--primary);
}

/* Feature Grid inside SEO */
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.use-case-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
    /* Alternating Layout for Desktop */
    /* Keeping it left-aligned for better readability reading flow on technical topics is often safer. 
       But user asked for 'unique', so let's stick to the high-quality single column timeline which is very readable. */
}

/* SEO Content */
.seo-content {
    background: #0f172a;
    /* Solid darkest blue */
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}

.content-block h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.content-block h2:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin-top: 0.5rem;
    border-radius: 2px;
}

.text-content {
    color: #cbd5e1;
    font-size: 1.15rem;
    line-height: 1.8;
}

.highlight-text {
    color: var(--primary);
    font-weight: 600;
}

/* FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.faq-item {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.faq-item:hover {
    border-color: var(--primary);
    background: #263345;
}

.faq-item h4 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Related Tools Cards */
.tool-card-premium {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tool-card-premium:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: 0.3s;
}

.tool-card-premium:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 1);
    border-color: var(--primary);
    box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.2);
}

.tool-card-premium:hover:before {
    opacity: 1;
}

.card-icon {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem;
    border-radius: 50%;
}

.card-meta {
    flex: 1;
}

.card-meta strong {
    display: block;
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.card-meta span {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.card-arrow {
    color: var(--primary);
    font-weight: 700;
    opacity: 0;
    transform: translateX(-10px);
    transition: 0.3s;
}

.tool-card-premium:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* refined upload content centering */
.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Footer Premium Redesign */
.main-footer {
    background: #020617;
    border-top: 1px solid rgba(56, 189, 248, 0.1);
    padding: 6rem 0 2rem;
    color: var(--text-muted);
    position: relative;
    overflow: hidden;
}

/* Ambient footer glow */
.main-footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .logo {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: block;
}

.brand-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 300px;
    margin-bottom: 1.5rem;
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.95rem;
    width: fit-content;
    display: block;
}

.footer-col a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

/* Mobile */
@media (max-width: 800px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .editor-layout {
        grid-template-columns: 1fr;
    }

    .upload-area {
        min-height: 250px;
    }

    .tool-wrapper {
        padding: 1.5rem;
    }
}