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

/* Import elegant script font for names */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Lato:wght@300;400;600&display=swap');

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2d3436;
    background: linear-gradient(135deg, #f5f5f0 0%, #e8ebe4 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* Decorative eucalyptus pattern background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(141, 153, 127, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(141, 153, 127, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 50px 40px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

/* Decorative gold corner elements */
.container::before,
.container::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-style: solid;
    border-color: #d4af37;
}

.container::before {
    top: 15px;
    left: 15px;
    border-width: 2px 0 0 2px;
}

.container::after {
    bottom: 15px;
    right: 15px;
    border-width: 0 2px 2px 0;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

header h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 4em;
    color: #2d3436;
    margin-bottom: 15px;
    font-weight: 400;
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Decorative divider with eucalyptus color */
header::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8d997f, transparent);
    margin: 20px auto;
    border-radius: 2px;
}

header p {
    font-size: 1.1em;
    color: #636e72;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

input[type="text"] {
    width: 100%;
    padding: 14px 18px;
    font-size: 1em;
    border: 2px solid #e8ebe4;
    border-radius: 10px;
    transition: all 0.3s;
    background: #fafafa;
}

input[type="text"]:focus {
    outline: none;
    border-color: #d4af37;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f0 100%);
    border: 3px dashed #d4af37;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

.file-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(141, 153, 127, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.file-label:hover {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-color: #8d997f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(141, 153, 127, 0.15);
}

.file-label:hover::before {
    opacity: 1;
}

.file-icon {
    font-size: 2em;
    margin-right: 10px;
}

.file-text {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.help-text {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

/* Buttons */
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 16px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #c5a028 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #e0bb43 0%, #d4af37 100%);
}

.btn-primary:disabled {
    background: #ddd;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: white;
    color: #8d997f;
    border: 2px solid #8d997f;
}

.btn-secondary:hover {
    background: #8d997f;
    color: white;
    transform: translateY(-2px);
}

.btn-retry {
    margin-left: 10px;
    padding: 6px 12px;
    font-size: 0.85em;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-retry:hover:not(:disabled) {
    background: #f57c00;
}

.btn-retry:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Upload Progress */
.upload-progress {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f0 100%);
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.progress-info {
    margin-bottom: 15px;
    text-align: center;
}

.progress-info p {
    margin: 5px 0;
    font-weight: 600;
    color: #2d3436;
}

#currentFile {
    font-size: 0.9em;
    color: #636e72;
    font-weight: normal;
    word-break: break-word;
}

.progress-bar-container {
    width: 100%;
    height: 35px;
    background: #e8ebe4;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid #d4af37;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8d997f 0%, #a8b69a 100%);
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Upload Results */
.upload-results {
    margin-top: 30px;
}

.upload-results h3 {
    margin-bottom: 15px;
    color: #333;
}

#resultsList {
    list-style: none;
}

#resultsList li {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.result-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.result-error {
    background: #ffebee;
    color: #c62828;
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #8d997f 0%, #a8b69a 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(141, 153, 127, 0.2);
    position: relative;
    overflow: hidden;
}

.success-message::before {
    content: '✨';
    position: absolute;
    font-size: 6em;
    opacity: 0.1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.success-message p {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid rgba(141, 153, 127, 0.2);
    color: #636e72;
    font-weight: 300;
}

footer p {
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 30px 20px;
    }

    .container::before,
    .container::after {
        width: 40px;
        height: 40px;
    }

    .container::before {
        top: 10px;
        left: 10px;
    }

    .container::after {
        bottom: 10px;
        right: 10px;
    }

    header h1 {
        font-size: 3em;
    }

    header p {
        font-size: 1em;
    }

    .file-label {
        flex-direction: column;
        padding: 30px 20px;
    }

    .file-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Admin Specific Styles */
.admin-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #4CAF50;
    margin: 10px 0;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

/* Touch Target Optimization */
button, a.btn-primary, .file-label {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.upload-progress, .upload-results, .success-message {
    animation: fadeIn 0.4s ease;
}
