/* Unique styles for index page only */

.user-input {
    margin-bottom: 25px;
}

.user-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95em; /* was 1.05em */
}

.user-input input,
.user-input textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafafa;
}

.user-input input:focus,
.user-input textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.user-input input[readonly] {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
    border-color: #d1d5db;
}

.validation-message {
    font-size: 0.85em;
    margin-top: 5px;
    padding: 5px 0;
}

.validation-error {
    color: #ef4444;
}

.validation-warning {
    color: #f59e0b;
}

.validation-success {
    color: #22c55e;
}

.demo-button {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 14px 26px; /* Reduced padding for less wide buttons */
    font-size: 15px; /* was 16px */
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.5px;
}

.demo-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.demo-button:disabled {
    background: #9ca3af;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.result-section {
    margin-top: 40px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 5px solid #3b82f6;
}

.result-section h3 {
    color: #1e3a8a;
    margin-bottom: 20px;
    font-size: 1.1em; /* was 1.3em */
    font-weight: 600;
}

.result-content {
    white-space: pre-wrap;
    font-size: 14px; /* was 15px */
    line-height: 1.6;
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.error {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.error .result-content {
    color: #dc2626;
    background: #fef2f2;
}

.loading {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.loading .result-content {
    color: #d97706;
    background: #fffbeb;
}

.success {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.success .result-content {
    color: #374151;
    background: white;
}

.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pdf-link {
    display: inline-block;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #1e3a8a;
    border: 1px solid #e2e8f0;
    margin-top: 10px;
    margin-right: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.85em; /* was 0.9em */
}

.pdf-link:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.15);
}

.tech-stack {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.tech-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em; /* was 0.9em */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.answer-content {
    font-size: 15px; /* was 16px */
    line-height: 1.7;
    color: #374151;
    margin-bottom: 20px;
}

.confidence-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em; /* was 0.85em */
    font-weight: 600;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 24px;
}

.confidence-high {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 1px solid #22c55e;
}

.confidence-medium {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #f59e0b;
}

.confidence-low {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.source-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #3b82f6;
}

.source-title {
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 8px;
    font-size: 0.95em; /* was 1.0em */
}

.source-content {
    color: #374151;
    font-size: 0.85em; /* was 0.9em */
    line-height: 1.5;
    margin-bottom: 8px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    background: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.source-meta {
    font-size: 0.75em; /* was 0.8em */
    color: #6b7280;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.source-score {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.relevance-high {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #22c55e;
}

.relevance-very {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.relevance-medium {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.relevance-low {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #e53e3e;
}

.relevance-related {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #94a3b8;
}

.header {
    padding: 10px 40px 50px 40px; /* Reduce top padding, keep sides and bottom */
}

@media (max-width: 768px) {
    .header {
        padding: 16px 16px 30px 16px; /* Reduce top padding for mobile */
    }
    .header h1 {
        font-size: 1.7em; /* was 2.2em */
    }
    .info-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .demo-content {
        padding: 30px 20px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .info-card {
        padding: 20px;
    }
}

.region-select {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    margin-top: 8px;
}
.region-label {
    font-weight: 600;
    color: #374151;
    margin-right: 8px;
    font-size: 0.95em; /* was 1.05em */
}
.region-radio {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 18px;
    padding: 6px 16px 6px 8px;
    margin-right: 0;
    font-size: 0.95em; /* was 1em */
    cursor: pointer;
    transition: background 0.2s;
}
.region-radio input[type="radio"] {
    margin-right: 6px;
    accent-color: #3b82f6;
}
.region-radio:hover {
    background: #e0e7ef;
}
@media (max-width: 600px) {
    .region-select {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .region-radio {
        width: 100%;
        padding: 8px 12px;
        font-size: 0.95em; /* was 1em */
    }
}

.footer {
    text-align: center;
    padding: 40px;
    color: white;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(59, 130, 246, 0.9) 100%);
    border-radius: 12px;
}

.footer p {
    font-size: 1em; /* was 1.1em */
    margin-bottom: 20px;
}