:root {
    --bg-color: #05050A;
    /* Deep dark void */
    --card-bg: rgba(255, 255, 255, 0.03);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-purple: #8b5cf6;
    --accent-indigo: #6366f1;
    --gradient-btn: linear-gradient(90deg, #3730a3 0%, #6b21a8 50%, #7e22ce 100%);
    --gradient-text: linear-gradient(135deg, #a78bfa 0%, #e879f9 100%);

    --font-main: 'Inter', sans-serif;
    --radius-md: 12px;
    --radius-full: 99px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 700px;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Badge */
.badge-container {
    margin-bottom: 2rem;
}

.badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Typography */
.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 600px;
}

/* Form */
.input-group {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.icon-slot {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    padding: 1rem 1rem 1rem 3rem;
    /* Space for icon */
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(255, 255, 255, 0.08);
}

.submit-btn {
    width: 100%;
    background: var(--gradient-btn);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(111, 76, 255, 0.25);
}

.submit-btn:hover {
    opacity: 0.9;
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading */
.hidden {
    display: none !important;
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 24px;
    height: 24px;
}

.spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.status-message {
    margin-top: 1.5rem;
    color: var(--accent-purple);
    font-weight: 500;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Results */
.results-section {
    margin-top: 3rem;
    width: 100%;
    text-align: left;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.metric-card h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.content-block {
    margin-bottom: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    padding: 2rem;
    border-radius: var(--radius-md);
}

.content-block h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.4rem;
}

/* Markdown Styles */
.markdown-body {
    color: #cbd5e1;
    line-height: 1.7;
}

.markdown-body strong {
    color: white;
}

.markdown-body p {
    margin-bottom: 1em;
}

.footer {
    margin-top: 4rem;
    color: #4b5563;
    /* Very muted */
    font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 600px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .container {
        padding: 1.5rem;
    }

    .input-group {
        max-width: 100%;
    }
}

.footer-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}