:root {
    --bg-light: #ffffff;
    --bg-subtle: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-primary: #6366f1;
    /* Indigo */
    --accent-secondary: #ec4899;
    /* Pink */
    --accent-tertiary: #8b5cf6;
    /* Violet */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(226, 232, 240, 0.6);
    --glass-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    --capsule-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
    border-radius: 100px;
    border: 3px solid var(--bg-light);
    /* Creates padding effect */
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--accent-tertiary), var(--accent-primary));
}

/* --- Background Effects --- */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.08) 0px, transparent 50%);
    z-index: -2;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.6;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(99, 102, 241, 0.15);
    top: -150px;
    left: -150px;
    animation: float 20s infinite ease-in-out;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(236, 72, 153, 0.15);
    bottom: -100px;
    right: -100px;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 50px);
    }
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-tertiary) 50%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Navbar (Capsule Style) --- */
.navbar {
    position: fixed;
    top: 24px;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    justify-content: center;
    pointer-events: none;
    /* Let clicks pass through outside capsule */
}

.nav-capsule {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 100px;
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1000px;
    box-shadow: var(--capsule-shadow);
    transition: all 0.3s ease;
}

.nav-capsule:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo-icon {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.dev-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.dev-link:hover {
    color: var(--accent-primary);
}

/* --- Buttons --- */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-generate-lg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 100px;
    /* Pill shape */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-family: var(--font-main);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--text-primary);
    text-decoration: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.3s;
}

.btn-text:hover {
    color: var(--accent-primary);
}

/* --- Hero Section --- */
.hero {
    padding-top: 180px;
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.badge-pill {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 100px;
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 520px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 24px;
    align-items: center;
}

/* --- Hero Visual (Abstract Gantt) --- */
.visual-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 32px;
    padding: 32px;
    position: relative;
    box-shadow:
        0 20px 50px -10px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.visual-card:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.visual-header {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red {
    background: #fca5a5;
}

.yellow {
    background: #fcd34d;
}

.green {
    background: #86efac;
}

.v-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.v-label {
    width: 80px;
    height: 12px;
    background: #f1f5f9;
    border-radius: 100px;
}

.v-bar {
    height: 32px;
    border-radius: 100px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.v-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
}

.v-bar-1 {
    width: 140px;
    background: var(--accent-primary);
}

.v-bar-2 {
    width: 200px;
    background: var(--accent-secondary);
    margin-left: 40px;
}

.v-bar-3 {
    width: 120px;
    background: var(--accent-tertiary);
    margin-left: 100px;
}

.floating-badge {
    position: absolute;
    padding: 10px 20px;
    background: #ffffff;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
}

.badge-1 {
    top: 15%;
    right: -30px;
    animation: float 6s infinite ease-in-out;
}

.badge-2 {
    bottom: 15%;
    left: -30px;
    animation: float 8s infinite ease-in-out reverse;
}

/* --- Features Section --- */
.features {
    padding: 120px 0;
    background: linear-gradient(to bottom, transparent, var(--bg-subtle) 30%, var(--bg-subtle) 70%, transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.feature-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 40px;
    border-radius: 32px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-primary);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    margin-bottom: 24px;
    transition: transform 0.3s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* --- Generator Section --- */
.generator {
    padding: 120px 0;
}

.generator-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 80px;
    max-width: 960px;
    margin: 0 auto;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.generator-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.generator-header {
    text-align: center;
    margin-bottom: 50px;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: start;
    margin-bottom: 40px;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Info Icon & Tooltip */
.info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.info-icon:hover {
    color: var(--accent-primary);
}

.info-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: normal;
    width: 280px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateX(-50%) translateY(5px);
    z-index: 100;
    line-height: 1.5;
}

.info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text-primary);
}

.info-icon:hover .info-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


.input-wrapper {
    position: relative;
}

.input-wrapper svg {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.input-wrapper input,
.textarea-wrapper textarea {
    width: 100%;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px 16px 56px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1.05rem;
    transition: all 0.3s;
}

.textarea-wrapper textarea {
    padding: 20px;
    resize: vertical;
}

.input-wrapper input:focus,
.textarea-wrapper textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: var(--text-primary);
    margin-top: 32px;
    /* Align with input */
    border-radius: 100px;
    padding: 12px 24px;
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: transparent;
}

/* Templates */
.templates-container {
    display: none;
    margin-bottom: 40px;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.templates-container.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.template-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.template-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 24px;
}

.t-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.copy-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: var(--text-primary);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

pre {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    max-height: 240px;
    overflow-y: auto;
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.tips-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 20px;
    padding: 24px;
}

.tips-box h4 {
    color: #b45309;
    margin-bottom: 8px;
}

.tips-box p {
    font-size: 0.95rem;
    color: #92400e;
}

/* Generate Button */
.btn-generate-lg {
    width: 100%;
    position: relative;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 24px;
    padding: 24px;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s;
    margin-top: 32px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-generate-lg:hover {
    transform: scale(1.01);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

/* Footer (Capsule Style) */
.footer {
    padding: 40px 0 60px;
    display: flex;
    justify-content: center;
}

.footer-capsule {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1000px;
    box-shadow: var(--capsule-shadow);
}

.footer-logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

/* Messages (Error & Success) */
.message {
    margin-top: 24px;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.message.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.message.error::before {
    content: '⚠️';
    font-size: 1.2rem;
}

.message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.message.success::before {
    content: '✓';
    font-size: 1.2rem;
    font-weight: bold;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.loader-content {
    text-align: center;
    padding: 40px;
    background: #ffffff;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.loader-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.loader-content p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.spinner-modern {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Snackbar */
.snackbar {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 16px 28px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transform: translateY(120px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    box-shadow:
        0 10px 30px rgba(16, 185, 129, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.snackbar.show {
    transform: translateY(0);
}

.snackbar svg {
    width: 20px;
    height: 20px;
    stroke-width: 3;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-capsule {
        width: 95%;
        padding: 12px 20px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .generator-wrapper {
        padding: 32px;
        border-radius: 24px;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }

    .footer-capsule {
        flex-direction: column;
        gap: 16px;
        border-radius: 24px;
        padding: 24px;
    }
}