:root {
    --font-sans: "Inter", sans-serif;
    --text-color: rgb(25, 25, 24);
    --bg-color: #fafafa;
    --border-color: rgba(55, 53, 47, 0.12);
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-32) var(--space-24);
}

/* ========== APP HEADER ========== */
.app-header {
    text-align: center;
    margin-bottom: var(--space-24);
    padding: var(--space-16) var(--space-24);
    margin: calc(-1 * var(--space-32)) calc(-1 * var(--space-24)) var(--space-24);
}

.app-header__title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-color);
    margin: 0;
    padding-bottom: var(--space-16);
}

.app-header__title::after {
    content: "";
    display: block;
    width: 40%;
    height: 1px;
    background: var(--border-color);
    margin: var(--space-16) auto 0;
}

/* Input Section */
.input-section {
    margin-bottom: 48px;
}

.input-wrapper {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(25, 25, 24, 0.6);
    margin-bottom: 8px;
}

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    font-family: "Inter";
    font-size: 18px;
    font-weight: 400;
    color: rgb(25, 25, 24);
    background: rgba(55, 53, 47, 0.03);
    border: 0.5px solid rgba(55, 53, 47, 0.16);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
}

input[type="text"]:focus {
    border-color: #2383E2;
    background: white;
    box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.1);
}

input[type="text"]::placeholder {
    color: rgba(25, 25, 24, 0.3);
}

.btn-primary {
    font-size: 16px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 50px;
    background: #000000;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
    background: #1a1a1a;
}

.btn-primary:active:not(:disabled) {
    background: #333333;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 64px 0;
}

.spinner {
    width: 24px;
    height: 24px;
    margin: 0 auto 16px;
    border: 1px solid rgba(35, 131, 226, 0.1);
    border-top-color: #2383E2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 16px;
    color: rgba(25, 25, 24, 0.6);
}

/* Error State */
.error-state {
    padding: 16px;
    background: #fff5f5;
    border: 0.5px solid rgba(55, 53, 47, 0.16);
    border-radius: 8px;
    color: #c53030;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Result Section */
.result-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.explanation-section {
    margin-bottom: 40px;
}

.section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(25, 25, 24, 0.4);
    margin-bottom: 8px;
}

.section-title {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    color: rgb(25, 25, 24);
}

.section-content {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(25, 25, 24, 0.9);
}

.bullet-list {
    list-style: none;
}

.bullet-item {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
}

.bullet-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2383E2;
    font-weight: bold;
}

.takeaway-card {
    background: rgba(35, 131, 226, 0.05);
    border-left: 4px solid #2383E2;
    padding: 24px;
    border-radius: 0 8px 8px 0;
    margin-top: 48px;
}

.takeaway-text {
    font-size: 20px;
    font-weight: 600;
    color: #1a5ea8;
    line-height: 1.4;
}

.actions {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 0.5px solid rgba(55, 53, 47, 0.16);
    display: flex;
    justify-content: center;
}

.btn-secondary {
    background: transparent;
    color: rgba(25, 25, 24, 0.6);
    border: 0.5px solid rgba(55, 53, 47, 0.16);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(55, 53, 47, 0.05);
    color: rgb(25, 25, 24);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: var(--space-24) var(--space-16);
    }

    .app-header {
        padding: var(--space-12) var(--space-16);
        margin: calc(-1 * var(--space-24)) calc(-1 * var(--space-16)) var(--space-20);
    }

    .app-header__title {
        font-size: 28px;
    }
}