:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --success-color: #2ecc71;
    --success-hover: #27ae60;
    --danger-color: #e74c3c;
    --danger-hover: #c0392b;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-light: #7f8c8d;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    margin-top: 40px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

main {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Upload Section */
.upload-section {
    border: 2px dashed #dce4ec;
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background-color: #fafbfc;
}

.upload-section:hover, .upload-section.dragover {
    border-color: var(--primary-color);
    background-color: #f0f7ff;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.hint {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: var(--success-hover);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn-download {
    background-color: var(--primary-color);
    color: white;
    display: block;
    width: 100%;
    margin-bottom: 15px;
}

.btn-download:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* File List */
.file-list-section {
    margin-top: 20px;
}

.file-list-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.terms-hint {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #888;
}

.terms-hint a {
    color: #007bff;
    text-decoration: none;
}

.terms-hint a:hover {
    text-decoration: underline;
}

.file-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    margin-bottom: 8px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.file-info {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-light);
}

.remove-file {
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}

.remove-file:hover {
    color: var(--danger-hover);
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Process Status */
.process-status {
    text-align: center;
    margin-top: 30px;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Result Section */
.result-section {
    text-align: center;
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    color: var(--success-color);
}

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

/* Error Message */
.error-message {
    margin-top: 20px;
    padding: 15px;
    background-color: #fde8e7;
    border-left: 5px solid var(--danger-color);
    color: var(--danger-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Disabled state for upload section */
.upload-section.disabled {
    background-color: #f9f9f9;
    border-color: #e0e0e0;
}

.upload-section.disabled .upload-icon,
.upload-section.disabled h2,
.upload-section.disabled p.hint,
.upload-section.disabled p:nth-of-type(1) { /* Target the 'Or' paragraph */
    opacity: 0.4;
}

.upload-section.disabled .btn-primary {
    background-color: #bdc3c7;
    cursor: not-allowed;
    pointer-events: none;
    border-color: #bdc3c7;
}

.upload-section.disabled .terms-checkbox-container {
    opacity: 1;
    pointer-events: auto;
}