* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f0 100%);
    color: #1a202c;
    line-height: 1.7;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 35px 0 20px;
}

.logo-icon {
    margin-bottom: 12px;
}

header h1 {
    font-size: 2rem;
    color: #1a365d;
    margin-bottom: 8px;
}

.subtitle {
    color: #718096;
    font-size: 1rem;
}

/* How it Works */
.how-it-works {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    border-radius: 14px;
    padding: 20px 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.step-num {
    width: 32px;
    height: 32px;
    background: #1a365d;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step-text {
    display: flex;
    flex-direction: column;
}

.step-text strong {
    font-size: 0.8rem;
    color: #1a365d;
}

.step-text span {
    font-size: 0.7rem;
    color: #a0aec0;
}

.step-arrow {
    color: #cbd5e0;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Examples */
.examples {
    margin-bottom: 20px;
}

.examples h3 {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 12px;
}

.examples-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.example-btn {
    padding: 14px 15px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.88rem;
    color: #2d3748;
    cursor: pointer;
    text-align: right;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
}

.example-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.example-btn:hover {
    border-color: #1a365d;
    background: #ebf8ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.1);
}

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

.input-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 10px;
}

textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s, box-shadow 0.2s;
    line-height: 1.6;
    background: #fff;
}

textarea:focus {
    outline: none;
    border-color: #1a365d;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

textarea::placeholder {
    color: #a0aec0;
}

#submit-btn {
    width: 100%;
    margin-top: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #1a365d, #2a4365);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
}

#submit-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Processing Info */
.processing-info {
    background: #fff;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.processing-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.p-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #a0aec0;
    transition: all 0.3s;
}

.p-step .p-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: transparent;
    flex-shrink: 0;
    transition: all 0.3s;
}

.p-step.active {
    color: #1a365d;
    background: #ebf8ff;
    font-weight: 600;
}

.p-step.active .p-check {
    background: #1a365d;
    color: transparent;
    animation: pulse 1s infinite;
}

.p-step.done {
    color: #276749;
}

.p-step.done .p-check {
    background: #48bb78;
    color: #fff;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Answer */
.answer-section {
    background: #fff;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    border-right: 5px solid #1a365d;
    animation: fadeIn 0.4s ease;
}

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

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.answer-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #276749;
    background: #f0fff4;
    padding: 5px 12px;
    border-radius: 20px;
}

.badge-icon {
    width: 18px;
    height: 18px;
    background: #48bb78;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
}

.new-question-btn {
    padding: 7px 16px;
    background: #ebf8ff;
    color: #1a365d;
    border: 1px solid #bee3f8;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s;
}

.new-question-btn:hover {
    background: #1a365d;
    color: #fff;
}

#answer-content {
    color: #2d3748;
    font-size: 0.95rem;
}

#answer-content p {
    margin-bottom: 10px;
}

#answer-content strong {
    color: #1a365d;
}

#answer-content h3, #answer-content h4 {
    color: #1a365d;
    margin: 15px 0 8px;
}

#answer-content ul {
    margin: 8px 20px 12px;
    list-style: none;
}

#answer-content li {
    padding: 4px 0;
    position: relative;
    padding-right: 15px;
}

#answer-content li::before {
    content: "●";
    position: absolute;
    right: 0;
    color: #1a365d;
    font-size: 0.6rem;
    top: 8px;
}

/* Error */
.error-section {
    background: #fff5f5;
    color: #c53030;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid #fed7d7;
    margin-bottom: 20px;
}

/* Footer */
footer {
    padding: 25px 0;
    font-size: 0.8rem;
}

.sources-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: right;
}

.sources-section h4 {
    color: #1a365d;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.sources-section p {
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.sources-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sources-section li {
    padding: 5px 15px 5px 0;
    color: #4a5568;
    font-size: 0.83rem;
    position: relative;
}

.sources-section li::before {
    content: "—";
    position: absolute;
    right: 0;
    color: #1a365d;
}

.disclaimer {
    text-align: center;
    color: #a0aec0;
    font-size: 0.78rem;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }

    .how-it-works {
        flex-direction: column;
        gap: 8px;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 15px;
    }

    .answer-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
