/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #b5cfee;
    --primary-dark: #8fb3dc;
    --primary-light: #d4e4f7;
    --secondary-color: #6a9bd8;
    --accent-color: #4a7fb8;
    --bg-color: #f5f8fc;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #d5e3f0;
    --white: #ffffff;
    --success: #52c41a;
    --error: #ff4d4f;
    --warning: #faad14;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--primary-light) 100%);
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

.logo {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.tagline {
    color: var(--text-light);
    font-size: 16px;
}

/* Upload Section */
.upload-section {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(107, 155, 216, 0.1);
}

.upload-area {
    border: 3px dashed var(--primary-color);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--secondary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.upload-icon {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.upload-area h2 {
    color: var(--text-color);
    font-size: 24px;
    margin-bottom: 10px;
}

.upload-area p {
    color: var(--text-light);
    margin: 15px 0;
}

.upload-hint {
    font-size: 12px;
    margin-top: 20px;
}

/* Buttons */
.btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 155, 216, 0.4);
}

.btn-secondary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--primary-dark);
}

.btn-danger {
    background: var(--error);
    color: var(--white);
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger:hover {
    background: #d43f3f;
}

/* Upload Progress */
.upload-progress {
    margin-top: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

/* File List Section */
.file-list-section {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(107, 155, 216, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 28px;
    color: var(--text-color);
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--border-color);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* File List */
.file-list {
    min-height: 200px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    margin-bottom: 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.file-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(107, 155, 216, 0.15);
    transform: translateX(5px);
}

.file-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
}

.file-details {
    flex: 1;
}

.file-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
    word-break: break-all;
}

.file-project {
    font-size: 13px;
    color: var(--secondary-color);
    margin-bottom: 3px;
    font-weight: 500;
}

.file-meta {
    font-size: 13px;
    color: var(--text-light);
}

.file-actions {
    display: flex;
    gap: 10px;
}

.file-link {
    padding: 8px 16px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.file-link:hover {
    background: var(--primary-dark);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state svg {
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--text-color);
    font-size: 20px;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-light);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.show {
    display: block;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 20px 0;
    }

    .logo {
        font-size: 36px;
    }

    .upload-section,
    .file-list-section {
        padding: 20px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
}

.footer p {
    margin: 8px 0;
}

.footer a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}
