/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: Georgia, serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background-color: #005691;
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content h1 {
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.header-content h1 .eob {
    color: white;
}

.header-content h1 .sense {
    color: #1CB3C4;
}

.tagline {
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.95;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 0;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.mode-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-family: Georgia, serif;
    border: 2px solid #1CB3C4;
    background-color: white;
    color: #005691;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.mode-btn:hover {
    background-color: #f0f8fb;
}

.mode-btn.active {
    background-color: #1CB3C4;
    color: white;
}

/* Input Sections */
.input-section {
    display: none;
    margin-bottom: 2rem;
}

.input-section.active {
    display: block;
}

/* Upload Zone */
.upload-zone {
    border: 3px dashed #1CB3C4;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    background-color: #f0f8fb;
    border-color: #005691;
}

.upload-zone.dragover {
    background-color: #e0f2f7;
    border-color: #005691;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-zone h2 {
    color: #005691;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: normal;
}

.upload-zone p {
    color: #666;
    margin-bottom: 0.5rem;
}

.file-types {
    font-size: 0.9rem;
    color: #999;
    margin-top: 1rem;
}

/* Paste Container */
.paste-container h2 {
    color: #005691;
    margin-bottom: 1rem;
    font-weight: normal;
}

textarea {
    width: 100%;
    padding: 1rem;
    font-family: Georgia, serif;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    color: #333333;
    line-height: 1.6;
}

textarea:focus {
    outline: none;
    border-color: #1CB3C4;
    box-shadow: 0 0 0 3px rgba(28, 179, 196, 0.1);
}

textarea::placeholder {
    color: #aaa;
}

/* Submit Area */
.submit-area {
    text-align: center;
    margin-bottom: 2rem;
}

.submit-button {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-family: Georgia, serif;
    font-weight: bold;
    background-color: #1CB3C4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.submit-button:hover {
    background-color: #16a3b3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.submit-button:active {
    transform: translateY(1px);
}

.submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.file-name {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

/* Output Panel */
.output-panel {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.output-panel.hidden {
    display: none;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

#outputContent h2 {
    color: #005691;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: normal;
}

#outputContent h2:first-child {
    margin-top: 0;
}

#outputContent h3 {
    color: #1CB3C4;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: normal;
}

#outputContent p {
    margin-bottom: 1rem;
}

#outputContent ul, #outputContent ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

#outputContent li {
    margin-bottom: 0.5rem;
}

/* Loading Indicator */
.loading {
    text-align: center;
    padding: 2rem;
}

.loading.hidden {
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1CB3C4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #666;
    font-size: 1rem;
}

/* Footer */
footer {
    background-color: #005691;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: #1CB3C4;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    text-decoration: underline;
}

footer strong {
    font-weight: bold;
}

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

    .tagline {
        font-size: 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .mode-toggle {
        flex-direction: column;
        gap: 0.5rem;
    }

    .mode-btn {
        width: 100%;
    }

    .submit-button {
        width: 100%;
    }

    .upload-zone {
        padding: 2rem 1rem;
    }

    .upload-icon {
        font-size: 2.5rem;
    }

    textarea {
        font-size: 16px;
    }
}

/* Accessibility */
button:focus, textarea:focus {
    outline: 2px solid #1CB3C4;
    outline-offset: 2px;
}

button:focus-visible, textarea:focus-visible {
    outline: 2px solid #1CB3C4;
    outline-offset: 2px;
}
