/* General Body Styles */
body {
    background-color: #1a202c;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header */
header {
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f6ad55;
    /* Orange accent for the fire icon */
}

header p {
    font-size: 1.1rem;
    color: #a0aec0;
}

/* Card Styles */
.card {
    background-color: #2d3748;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card h2 {
    margin-top: 0;
    font-size: 1.5rem;
    border-bottom: 1px solid #4a5568;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

/* API Config Card */
.api-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#api-key-input {
    flex-grow: 1;
    background-color: #1a202c;
    border: 1px solid #4a5568;
    border-radius: 8px;
    padding: 10px 14px;
    color: #e2e8f0;
    font-size: 1rem;
}

#api-key-input::placeholder {
    color: #718096;
}

.status-disconnected {
    color: #e53e3e;
    /* Red */
    font-weight: bold;
}

.status-connected {
    color: #48bb78;
    /* Green */
    font-weight: bold;
}

.status-cached {
    color: #4299e1;
    /* Blue */
    font-weight: bold;
}

.status-no-cache {
    color: #a0aec0;
    /* Gray */
    font-weight: bold;
}

.status-cached {
    color: #4299e1; /* Blue */
    font-weight: bold;
}

.status-no-cache {
    color: #a0aec0; /* Gray */
    font-weight: bold;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-green {
    background-color: #38a169;
    color: white;
}

.btn-green:hover {
    background-color: #48bb78;
}

.btn-blue {
    background-color: #3182ce;
    color: white;
}

.btn-blue:hover {
    background-color: #4299e1;
}

.btn-orange {
    background-color: #dd6b20;
    color: white;
}

.btn-orange:hover {
    background-color: #ed8936;
}

.btn-gray {
    background-color: #4a5568;
    color: white;
}

.btn-gray:hover {
    background-color: #6b7280;
}

.btn-gray {
    background-color: #4a5568;
    color: white;
}
.btn-gray:hover { background-color: #6b7280; }

.btn:disabled {
    background-color: #4a5568;
    cursor: not-allowed;
    transform: none;
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}


/* Chart Section */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.no-data {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    padding: 20px;
    background-color: #2d3748;
    border-radius: 6px;
    margin: 10px 0;
}

.chart-container {
    background-color: #1a202c;
    padding: 16px;
    border-radius: 8px;
}

.chart-container h3 {
    text-align: center;
    margin-bottom: 15px;
}

/* Lists Styling */
.question-list,
.users-list {
    list-style-position: inside;
    padding: 0;
    margin: 0;
    color: #e2e8f0;
}

.question-item,
.user-item {
    padding: 10px;
    margin-bottom: 8px;
    background-color: #2d3748;
    border-radius: 6px;
    line-height: 1.4;
}

.question-item:last-child,
.user-item:last-child {
    margin-bottom: 0;
}

/* Loading and Error States */
.hidden {
    display: none !important;
}

#loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 20px;
}

.spinner {
    border: 4px solid #4a5568;
    border-top: 4px solid #3182ce;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-card {
    background-color: #c53030;
    color: white;
}

.error-card h3 {
    margin-top: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        gap: 16px;
    }

    .api-input-group {
        flex-direction: column;
    }

    header h1 {
        font-size: 2rem;
    }
}