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

:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #3c2d9e;
    --secondary: #00cec9;
    --accent: #fd79a8;
    --success: #00b894;
    --danger: #ff7675;
    --warning: #fdcb6e;
    --bg-primary: #050508;
    --bg-secondary: #0a0a12;
    --bg-card: rgba(18, 18, 30, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #b8b8d0;
    --text-muted: #6e6e8a;
    --border-light: rgba(108, 92, 231, 0.2);
    --glow-primary: 0 0 40px rgba(108, 92, 231, 0.3);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--text-primary);
}

.logo i {
    color: var(--primary-light);
    font-size: 28px;
}

.logo-highlight {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-stats {
    display: flex;
    gap: 20px;
}

.header-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
}

.header-stats i {
    color: var(--primary-light);
}

/* Upload Section */
.upload-section {
    padding: 40px 0;
}

.upload-area {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 2px dashed var(--border-light);
    border-radius: 40px;
    padding: 60px 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
    transform: scale(1.01);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
    box-shadow: var(--glow-primary);
}

.upload-icon {
    font-size: 64px;
    color: var(--primary-light);
    margin-bottom: 20px;
}

.upload-area h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Outfit', sans-serif;
}

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

.upload-hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(108, 92, 231, 0.5);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

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

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

/* Progress Bar */
.upload-progress {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 20px;
}

.progress-bar {
    height: 8px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

#progressText {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Files Section */
.files-section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: var(--primary-light);
}

.btn-refresh {
    width: 45px;
    height: 45px;
    border-radius: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: rotate(180deg);
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.file-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-primary);
    border-color: var(--primary);
}

.file-preview {
    width: 100%;
    height: 160px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview i {
    font-size: 48px;
    color: var(--primary-light);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    margin-bottom: 5px;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-meta {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 12px;
    color: var(--text-muted);
}

.file-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.file-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.file-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 10px;
    font-size: 13px;
}

/* Loading */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary);
    border-right: 3px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    background: var(--bg-card);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border-light);
    border-radius: 30px;
    padding: 30px;
    overflow-y: auto;
    animation: modalSlide 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* Footer */
.footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-light);
    margin-top: 40px;
    color: var(--text-muted);
}

.footer p {
    margin-bottom: 10px;
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
    margin: 0 10px;
}

.footer strong {
    color: var(--primary-light);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(30px);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
    animation: slideUp 0.3s ease;
}

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }

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

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
}

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* Responsivo */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-area h2 {
        font-size: 22px;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Adicione ao style.css existente */

.btn-delete-all {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 118, 117, 0.1);
    border: 1px solid rgba(255, 118, 117, 0.3);
    color: var(--danger);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.btn-delete-all:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    transform: scale(1.05);
}

.file-actions .btn-danger {
    background: rgba(255, 118, 117, 0.1);
    border-color: rgba(255, 118, 117, 0.3);
    color: var(--danger);
}

.file-actions .btn-danger:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.duplicate-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(253, 203, 110, 0.15);
    border: 1px solid rgba(253, 203, 110, 0.3);
    border-radius: 30px;
    color: var(--warning);
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(0, 184, 148, 0.1);
    border: 1px solid rgba(0, 184, 148, 0.3);
    border-radius: 30px;
    color: var(--success);
    font-size: 11px;
}

.remaining-badge {
    color: var(--primary-light);
    font-weight: 600;
}

.upload-hint i {
    color: var(--success);
}