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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #1f2937;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4F46E5;
    margin-bottom: 10px;
}

.header-content h1 i {
    margin-right: 15px;
}

.subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 400;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Question Section */
.question-section {
    background: white;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.question-card h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 25px;
}

.question-card h2 i {
    margin-right: 12px;
    color: #4F46E5;
}

.question-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

#questionInput {
    width: 100%;
    padding: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
}

#questionInput:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-primary i {
    margin-right: 10px;
}

.btn-secondary {
    background: #ef4444;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #dc2626;
}

/* Quick Questions */
.quick-questions {
    margin-top: 25px;
}

.quick-questions h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 15px;
}

.quick-questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.quick-question-btn {
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.quick-question-btn:hover {
    background: #4F46E5;
    color: white;
    border-color: #4F46E5;
    transform: translateY(-2px);
}

.quick-question-btn i {
    margin-right: 8px;
}

/* Answer Section */
.answer-section {
    background: white;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.answer-card {
    animation: slideIn 0.4s ease;
}

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

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.answer-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
}

.answer-header h2 i {
    margin-right: 12px;
    color: #F59E0B;
}

.answer-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 20px;
}

.answer-content strong {
    color: #4F46E5;
    font-weight: 600;
}

.answer-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    overflow: hidden;
    border-radius: 8px;
}

.answer-table th {
    background: #4F46E5;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.answer-table td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.answer-table tr:hover {
    background: #f9fafb;
}

/* Stats Grid */
.overview-section h2,
.charts-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.overview-section h2 i,
.charts-section h2 i {
    margin-right: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 5px;
}

.stat-content p {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 500;
}

/* Charts */
.chart-card {
    background: white;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.chart-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 25px;
    text-align: left;
}

.chart-card h2 i {
    margin-right: 12px;
    color: #4F46E5;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    color: white;
    font-weight: 500;
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .quick-questions-grid {
        grid-template-columns: 1fr;
    }

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

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

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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