/* Global Styles */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #10b981;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --text-color: #f3f4f6;
    --text-muted: #94a3b8;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    --radius-lg: 16px;
    --radius-md: 8px;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    color: var(--text-color);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo,
.btn {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 900px;
}

.container-text {
    max-width: 860px;
    /* Wider for premium text */
}

.hidden {
    display: none !important;
}

/* Buttons & Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    gap: 8px;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Navbar */
.navbar {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn) {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:not(.btn):hover {
    color: var(--text-color);
}

/* Hero Section */
.hero-section {
    padding: 80px 0 100px;
    text-align: center;
    background: #0f172a;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--card-border);
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* ULTRA BRANDABLE: Aurora Mesh Gradient Animation */
.hero-animation-bg {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(at 0% 0%, #312e81 0px, transparent 50%),
        radial-gradient(at 100% 0%, #4338ca 0px, transparent 50%),
        radial-gradient(at 100% 100%, #1e1b4b 0px, transparent 50%),
        radial-gradient(at 0% 100%, #3730a3 0px, transparent 50%),
        radial-gradient(at 50% 50%, #0f172a 0px, transparent 50%);
    background-size: 100% 100%;
    filter: blur(60px);
    opacity: 0.6;
    animation: rotateMesh 20s linear infinite alternate;
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    pointer-events: none;
}

@keyframes rotateMesh {
    0% {
        transform: rotate(0deg) scale(1);
    }

    100% {
        transform: rotate(10deg) scale(1.1);
    }
}

.hero-section h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #ffffff 0%, #818cf8 25%, #c084fc 50%, #818cf8 75%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1.5px;
    line-height: 1.1;
    animation: textShimmer 6s linear infinite;
    position: relative;
    z-index: 2;
}

@keyframes textShimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 40px;
    font-weight: 400;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 56px;
    flex-wrap: wrap;
}

.hero-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.hero-features svg {
    color: var(--secondary-color);
}

/* Tool Interface */
.tool-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--card-border);
    border-radius: var(--radius-md);
    padding: 60px 20px;
    text-align: center;
    transition: 0.3s;
    background: rgba(0, 0, 0, 0.2);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    margin-bottom: 24px;
    color: var(--text-muted);
    opacity: 0.7;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.upload-area p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Options & Actions */
.editor-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.file-info-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--text-color);
}

.controls-panel {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: var(--radius-md);
}

.control-group {
    margin-bottom: 24px;
}

.control-group h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.select-wrapper select {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--card-border);
    color: white;
    border-radius: var(--radius-md);
    font-size: 1rem;
    cursor: pointer;
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.slider {
    width: 40px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    transition: 0.3s;
}

.slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

.toggle-switch input:checked+.slider {
    background: var(--primary-color);
}

.toggle-switch input:checked+.slider::before {
    transform: translateX(20px);
}

.size-estimate {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    font-weight: 500;
}

/* Result and Loader */
.image-result-preview {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid var(--card-border);
}

.result-area {
    text-align: center;
    animation: fadeIn 0.5s;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-area h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.stats-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    font-size: 1.1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-item .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item .value {
    font-weight: 700;
    font-size: 1.2rem;
}

.stat-arrow {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.download-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

/* Loader */
.loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border-radius: var(--radius-lg);
}

.spinner {
    width: 48px;
    height: 48px;
    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: 16px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* REVAMPED Content Sections */
.content-section {
    padding: 100px 0;
    border-top: 1px solid var(--card-border);
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0b0f19 100%);
}

.content-block {
    margin-bottom: 80px;
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0) 100%);
    padding: 10px;
    border-radius: var(--radius-lg);
}

.content-block h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    line-height: 1.2;
}

.text-content p {
    font-size: 1.15rem;
    color: #cbd5e1;
    margin-bottom: 24px;
    line-height: 1.8;
    font-weight: 300;
}

/* Distinctive styling for Lists (Features) */
.text-content ul {
    display: grid;
    gap: 15px;
    padding-left: 0;
    list-style: none;
    margin-top: 20px;
}

.text-content ul li {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    display: flex;
    gap: 12px;
    align-items: start;
    font-size: 1.05rem;
    color: var(--text-color);
}

/* Steps Styling for "How To" */
.text-content ol {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
    display: grid;
    gap: 24px;
    margin-top: 30px;
}

.text-content ol li {
    position: relative;
    padding: 24px 24px 24px 80px;
    background: rgba(30, 41, 59, 0.4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    transition: 0.3s;
}

.text-content ol li:hover {
    border-color: var(--primary-color);
    background: rgba(30, 41, 59, 0.6);
    transform: translateX(5px);
}

.text-content ol li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.text-content strong {
    color: white;
    font-weight: 600;
}

/* REVAMPED FAQ Section */
.faq-section {
    margin-top: 100px;
    background: var(--card-bg);
    padding: 60px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

/* Decorative glow for FAQ */
.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: white;
}

.faq-grid {
    display: grid;
    gap: 20px;
    max-width: 100%;
}

.faq-item {
    background: #0f172a;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.faq-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    opacity: 0;
    transition: 0.3s;
}

.faq-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.faq-item:hover::after {
    opacity: 1;
}

.faq-item h4 {
    margin-bottom: 12px;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item h4::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 300;
    transition: 0.3s;
}

.faq-item:hover h4::after {
    transform: rotate(90deg);
    color: white;
}

.faq-item p {
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Exploration Grid (Use Cases / More Tools) */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.use-case {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    transition: 0.3s;
    text-align: center;
}

.use-case:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.use-case h4 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: white;
}

.use-case p {
    font-size: 1rem;
    margin-bottom: 0;
    color: var(--text-muted);
}

/* Footer */
.main-footer {
    background: #020617;
    border-top: 1px solid var(--card-border);
    padding: 80px 0 40px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    margin-bottom: 16px;
    display: block;
}

.brand-desc {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 300px;
    line-height: 1.6;
}

.footer-col h4 {
    color: white;
    margin-bottom: 24px;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 0.95rem;
    transition: 0.3s;
}

.footer-col a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 40px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* New Badges for tools */
.badge-new {
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Mobile */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .tool-wrapper {
        padding: 20px;
    }

    .stats-row {
        flex-direction: column;
        gap: 10px;
    }

    .stat-arrow {
        transform: rotate(90deg);
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
}