:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --border-color: #dee2e6;
    --error-color: #dc3545;
    --success-color: #28a745;
    --card-bg: #ffffff;
    --font-family: 'Inter', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-weight: 700;
}

header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
}

main {
    flex: 1;
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 90%;
}

section {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

#upload-section {
    text-align: center;
}

#drop-zone {
    border: 3px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 1.5rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

#drop-zone.dragover {
    border-color: var(--primary-color);
    background-color: #e9ecef;
}

#drop-zone p {
    margin: 0.5rem 0;
    color: var(--secondary-color);
}

.file-label {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.file-label:hover {
    background-color: var(--primary-hover);
}

#file-info {
    margin-top: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
}

#loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

.spinner {
    border: 4px solid rgba(0, 123, 255, 0.2);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#error-message {
    margin-top: 1rem;
    color: var(--error-color);
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 0.75rem 1.25rem;
    border-radius: 5px;
}

#results-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.copy-buttons-container {
    margin-bottom: 1.5rem; /* Space below buttons */
    display: flex;         /* Align buttons horizontally */
    gap: 1rem;             /* Space between buttons */
    flex-wrap: wrap;       /* Allow buttons to wrap on smaller screens */
}

.paragraph-block {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.paragraph-block h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.paragraph-text {
    white-space: pre-wrap; /* Preserve whitespace and line breaks */
    margin-bottom: 1rem;
}

.paragraph-comments h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--primary-color);
}

.comment-item {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1rem;
    background-color: #eef;
    padding: 0.8rem;
    border-radius: 4px;
}

.comment-details span {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.comment-details .label {
    font-weight: 500;
    color: var(--secondary-color);
}

.comment-text {
    margin-top: 0.5rem;
    font-style: italic;
    white-space: pre-wrap;
}

#full-content-output {
    white-space: pre-wrap;       /* Preserve formatting but wrap lines */
    word-wrap: break-word;       /* Break long words if necessary */
    background-color: #f8f9fa;  /* Match paragraph block background */
    border: 1px solid var(--border-color); /* Add border */
    padding: 1rem;              /* Add padding */
    margin-top: 0.5rem;         /* Space below summary */
    border-radius: 4px;         /* Rounded corners */
}

.copy-button-inline {
    margin-top: 0.75rem; /* Space above the button */
    /* Optional: Adjust padding if needed */
    /* padding: 0.5rem 1rem; */
}

footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.hidden {
    display: none !important;
} 