body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 20px; /* Add some padding at the top */
    box-sizing: border-box;
}

.container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 900px;
    margin: 20px;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}

header h1 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 2.8em;
    color: #2c3e50;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1.1em;
    color: #555;
    font-weight: 300;
}

main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.input-section, .output-section {
    background-color: #fdfdfd;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

h2 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1.8em;
    color: #34495e;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    display: inline-block;
}

.instruction {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
    background-color: #e9f5ff;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

textarea {
    width: calc(100% - 20px); /* Account for padding */
    padding: 12px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    resize: vertical;
    min-height: 150px;
    margin-bottom: 15px;
}

textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
    outline: none;
}

.file-input-container {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-input-label {
    font-size: 0.9em;
    color: #555;
}

input[type="file"] {
    font-size: 0.9em;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

button {
    background-color: #3498db;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    display: block; /* Make button block to center it if needed or control width */
    width: auto; /* Auto width based on content */
    margin: 0 auto 15px auto; /* Center button */
}

button:hover {
    background-color: #2980b9;
}

button:active {
    transform: translateY(1px);
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

#loading-indicator {
    display: flex; /* Changed to flex for better alignment */
    align-items: center;
    justify-content: center; /* Center content */
    font-size: 1em;
    color: #555;
    margin-top: 10px; /* Add some space above */
    gap: 8px; /* Space between spinner and text */
}

.spinner {
    display: inline-block;
    width: 24px; /* Increased size */
    height: 24px; /* Increased size */
    border: 3px solid rgba(0, 0, 0, 0.1); /* Lighter border */
    border-top-color: #3498db; /* Theme color for spinner */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#summary-output-container {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    min-height: 150px; /* Ensure it has some height */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

#summary-output {
    font-family: 'Open Sans', sans-serif; /* Explicitly set font family */
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 1em;
    color: #333;
    line-height: 1.7;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9em;
    color: #777;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 20px;
    }

    header h1 {
        font-size: 2.2em;
    }

    .subtitle {
        font-size: 1em;
    }

    h2 {
        font-size: 1.5em;
    }

    button {
        width: 100%;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }
    .subtitle {
        font-size: 0.9em;
    }
    h2 {
        font-size: 1.3em;
    }
    textarea {
        min-height: 120px;
    }
}