/* General Body Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #111827;
    color: #ffffff;
    margin: 0;
}

/* Custom scrollbar for better aesthetics */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1f2937;
}
::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Main Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header Styles */
.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background-image: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-subtitle {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: #9ca3af; /* gray-400 */
}

/* Card Styles */
.card {
    background-color: #1f2937; /* gray-800 */
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

.card-title-summary { color: #60a5fa; /* blue-400 */ }
.card-title-qa { color: #c084fc; /* purple-400 */ }

/* Input and Button Styles */
.input-group {
    display: flex;
    gap: 1rem;
}

input[type="text"],
textarea {
    flex-grow: 1;
    background-color: #374151; /* gray-700 */
    border: 1px solid #4b5563; /* gray-600 */
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #3b82f6; /* blue-500 */
    box-shadow: 0 0 0 2px #1e40af;
}

textarea {
    min-height: 4rem;
    resize: vertical;
}

button {
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#summarize-button {
    background-color: #2563eb; /* blue-600 */
}

#summarize-button:hover:not(:disabled) {
    background-color: #1d4ed8; /* blue-700 */
}

#ask-button {
    background-color: #9333ea; /* purple-600 */
}

#ask-button:hover:not(:disabled) {
    background-color: #7e22ce; /* purple-700 */
}

.button-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

/* Loading and Messages */
#loading-indicator {
    text-align: center;
    margin: 2rem 0;
    color: #9ca3af;
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #4b5563; /* gray-600 */
    border-top-color: #3b82f6; /* blue-500 */
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#message-container {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.message {
    padding: 1rem;
    border-radius: 0.5rem;
    border-width: 1px;
    border-style: solid;
    transition: opacity 0.3s ease-in-out;
}

.message-error { background-color: rgba(239, 68, 68, 0.2); border-color: #ef4444; color: #f87171; }
.message-success { background-color: rgba(34, 197, 94, 0.2); border-color: #22c55e; color: #4ade80; }
.message-info { background-color: rgba(59, 130, 246, 0.2); border-color: #3b82f6; color: #60a5fa; }

/* Results */
#results-container {
    display: none;
}

#summary-content, #answer-container {
    color: #d1d5db; /* gray-300 */
    line-height: 1.6;
}

#summary-content p {
    margin-bottom: 1em;
}

#answer-container {
    margin-top: 1.5rem;
}

#answer-container .answer-box {
    background-color: rgba(55, 65, 81, 0.5); /* gray-700/50 */
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #4b5563; /* gray-600 */
}

/* Responsive Styles */
@media (max-width: 640px) {
    .input-group {
        flex-direction: column;
    }
    .page-title {
        font-size: 2rem;
    }
}
