/* ANAF E-Factura Converter - Modern Design */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --error-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

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

/* GDPR Notice */
.gdpr-notice {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.gdpr-notice h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gdpr-notice ul {
    list-style: none;
    padding-left: 0;
}

.gdpr-notice li {
    margin: 8px 0;
    padding-left: 5px;
}

/* Terms Section */
.terms-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fef3c7;
    border-radius: 8px;
    border: 2px solid #f59e0b;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.terms-text {
    font-size: 0.95rem;
}

.terms-text a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
}

.terms-text a:hover {
    color: var(--primary-hover);
}

/* Upload Area */
.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--bg-color);
}

.upload-area.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: #eff6ff;
    transform: scale(1.02);
}

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

.upload-area h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.upload-area p {
    color: var(--text-muted);
    margin: 10px 0;
}

.file-info {
    font-size: 0.9rem;
    margin-top: 15px;
    color: var(--text-muted);
}

/* Buttons */
.btn-primary, .btn-success, .btn-secondary {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 10px 5px;
}

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

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

.btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

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

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Progress Section */
.progress-section {
    text-align: center;
    padding: 40px;
}

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

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

#progress-text {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #10b981);
    width: 0%;
    transition: width 0.3s ease;
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0%, 100% { width: 0%; }
    50% { width: 100%; }
}

/* Success Section */
.success-section {
    text-align: center;
    padding: 40px;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-section h2 {
    color: var(--success-color);
    margin-bottom: 15px;
}

#success-message {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Error Section */
.error-section {
    text-align: center;
    padding: 40px;
}

.error-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-section h2 {
    color: var(--error-color);
    margin-bottom: 15px;
}

#error-message {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* File Count */
.file-count {
    font-weight: bold;
    color: var(--primary-color);
    margin: 15px 0;
    font-size: 1.1rem;
}

/* Results Container */
.results-container {
    margin: 25px 0;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.result-item {
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: transform 0.2s ease;
}

.result-item:hover {
    transform: translateX(5px);
}

.result-item.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.result-item.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error-color);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    opacity: 0.9;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.modal-content h3 {
    color: var(--text-color);
    margin-top: 25px;
    margin-bottom: 10px;
}

.modal-body {
    line-height: 1.6;
}

.modal-body ul {
    margin-left: 20px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.modal-body li {
    margin: 5px 0;
}

.modal-body p {
    margin-bottom: 15px;
}

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

    main {
        padding: 25px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 25px;
    }
}
