:root {
    --bg-color-main: #0b0c10;
    --bg-color-alt: #1f2833;
    --accent-color: #66fcf1;
    --accent-glow: rgba(102, 252, 241, 0.4);
    --accent-hover: #45a29e;
    --text-primary: #ffffff;
    --text-secondary: #c5c6c7;
    --glass-bg: rgba(31, 40, 51, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --error-color: #ff6b6b;
    --success-color: #51cf66;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Background Animated Blobs */
.background-decorations {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #45a29e, #0b0c10);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #66fcf1, #0b0c10);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(50px) scale(1.1); }
}

/* Main Container (Glassmorphism) */
.app-container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 600px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #ffffff, var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
}

/* Upload Section */
.upload-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dropzone {
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 3rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.2);
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--accent-color);
    background: rgba(102, 252, 241, 0.05);
    box-shadow: 0 0 15px var(--accent-glow);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.dropzone:hover .upload-icon, .dropzone.dragover .upload-icon {
    transform: translateY(-5px);
}

.drop-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.browse {
    color: var(--accent-color);
    text-decoration: underline;
}

.file-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    animation: slideDown 0.3s ease;
}

.file-info.hidden {
    display: none;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    margin-right: 1rem;
}

#fileName {
    flex-grow: 1;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-btn {
    background: transparent;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    width: 24px;
    height: 24px;
    transition: transform 0.2s;
}

.remove-btn:hover {
    transform: scale(1.2);
}

/* Options Section */
.options-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: rgba(0,0,0,0.15);
    padding: 1.5rem;
    border-radius: 12px;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-text label {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
    display: block;
}

.option-text .desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

code {
    background: rgba(255,255,255,0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--accent-color);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.2);
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: #0b0c10;
}

.slider.round {
    border-radius: 26px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Actions and Button */
.actions {
    display: flex;
    flex-direction: column;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #0b0c10;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-hover);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

/* Loader */
.loader-spinner {
    border: 3px solid rgba(0,0,0,0.1);
    border-top: 3px solid #0b0c10;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    position: absolute;
}

.loader-spinner.hidden {
    display: none;
}

.btn-primary.loading span {
    opacity: 0;
}

.btn-primary.loading .loader-spinner {
    display: block;
}

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

/* Status Message */
.status-message {
    text-align: center;
    font-size: 0.95rem;
    min-height: 20px;
    margin-top: 0.5rem;
}

.status-error {
    color: var(--error-color);
}

.status-success {
    color: var(--success-color);
}

@media (max-width: 600px) {
    .app-container {
        padding: 1.5rem;
        border-radius: 0;
        width: 100%;
        min-height: 100vh;
        justify-content: center;
    }
}

/* Report Section */
.report-section {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: slideDown 0.4s ease;
}

.report-section.hidden {
    display: none;
}

.score-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    color: #fff;
    flex-shrink: 0;
}

.score-green {
    background: radial-gradient(circle, var(--success-color), #2b8a3e);
    box-shadow: 0 0 15px rgba(81, 207, 102, 0.4);
}

.score-yellow {
    background: radial-gradient(circle, #fcc419, #e67e22);
    box-shadow: 0 0 15px rgba(252, 196, 25, 0.4);
}

.score-red {
    background: radial-gradient(circle, var(--error-color), #c92a2a);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.4);
}

.score-text h3 {
    margin-bottom: 0.2rem;
    font-size: 1.25rem;
}

.score-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.warnings-container {
    background: rgba(255, 107, 107, 0.1);
    border-left: 4px solid var(--error-color);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.warnings-container.hidden {
    display: none;
}

.warnings-container h4 {
    color: var(--error-color);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.warnings-list {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.5rem;
}

.warnings-list::-webkit-scrollbar {
    width: 6px;
}

.warnings-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.warnings-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.warnings-list li {
    font-size: 0.85rem;
    color: #ffd8d8;
    background: rgba(0,0,0,0.2);
    padding: 0.5rem;
    border-radius: 4px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-color-alt);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
}

.modal-title {
    color: var(--error-color);
    margin-bottom: 0.5rem;
}

.corrections-list {
    margin: 1.5rem 0;
    max-height: 50vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 0.5rem;
}

.correction-item {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.correction-item label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.correction-item input {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: inherit;
    outline: none;
}

.correction-item input:focus {
    border-color: var(--accent-color);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
}

.btn-cancel:hover {
    background: rgba(255,255,255,0.1);
}


