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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #1d1d1f;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #0066cc;
}

.btn-sair {
    background: #5e5e5e;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-sair:hover {
    background: #4a4a4a;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

/* Upload Info */
.upload-info {
    text-align: center;
    margin-bottom: 2rem;
}

.info-line {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: #1d1d1f;
}

.info-line strong {
    font-weight: 600;
}

/* Upload Area */
.upload-section {
    margin-bottom: 3rem;
}

.upload-area {
    border: 3px dashed #0066cc;
    border-radius: 12px;
    padding: 4rem 2rem;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #0052a3;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #00cc66;
    background: #f0fff7;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    stroke: #0066cc;
}

.upload-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
}

.upload-subtitle {
    font-size: 1rem;
    color: #6e6e73;
}

/* URL Upload Section */
.url-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.url-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1d1d1f;
}

.url-group {
    display: flex;
    gap: 1rem;
}

.url-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #d2d2d7;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.url-input:focus {
    outline: none;
    border-color: #0066cc;
}

.btn-upload {
    background: #0066cc;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-upload:hover {
    background: #0052a3;
}

.btn-upload:active {
    transform: scale(0.98);
}

/* Results */
.results-container {
    margin-top: 2rem;
}

.result-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-item.success {
    border-left: 4px solid #00cc66;
}

.result-item.error {
    border-left: 4px solid #ff3b30;
}

.result-item h4 {
    margin-bottom: 0.5rem;
    color: #1d1d1f;
}

.result-link {
    color: #0066cc;
    text-decoration: none;
    word-break: break-all;
}

.result-link:hover {
    text-decoration: underline;
}

/* Progress Bar */
#progressContainer {
    margin: 2rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e5e7;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066cc 0%, #00cc66 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: #6e6e73;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-left {
        gap: 1rem;
    }
    
    .main-container {
        padding: 0 1rem 2rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-title {
        font-size: 1.5rem;
    }
    
    .url-group {
        flex-direction: column;
    }
    
    .btn-upload {
        width: 100%;
    }
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid #d2d2d7;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-link {
    color: #1d1d1f;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #0066cc;
}

.separator {
    margin: 0 0.75rem;
    color: #d2d2d7;
}

.footer-copyright {
    color: #6e6e73;
    font-size: 0.85rem;
}

.footer-copyright p {
    margin: 0;
}

/* Botões do header */
.btn-secondary {
    background: transparent;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-left: 0.5rem;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #f5f5f7;
    border-color: #0066cc;
    color: #0066cc;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6e6e73;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #1d1d1f;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: #1d1d1f;
}

.modal-input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #d2d2d7;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.modal-input:focus {
    outline: none;
    border-color: #0066cc;
}

.modal-btn {
    width: 100%;
    background: #0066cc;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-btn:hover {
    background: #0052a3;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .separator {
        display: none;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    background: white;
    border-left: 4px solid;
}

.toast.success {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.toast.error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.toast.info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.toast.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: #10b981; }
.toast.error .toast-icon { color: #ef4444; }
.toast.info .toast-icon { color: #3b82f6; }
.toast.warning .toast-icon { color: #f59e0b; }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1f2937;
}

.toast-message {
    font-size: 14px;
    color: #6b7280;
}

.toast-close {
    cursor: pointer;
    color: #9ca3af;
    font-size: 20px;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #1f2937;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.removing {
    animation: slideOut 0.3s ease-in forwards;
}

/* User Info Display */
.user-info {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
}

.user-info.active {
    display: flex;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
}

.user-email {
    font-size: 12px;
    color: #6b7280;
}

.logout-btn {
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.auth-buttons.hidden {
    display: none;
}

/* Auth Buttons in Header */
.auth-buttons {
    display: flex;
    gap: 12px;
}

.auth-buttons.hidden {
    display: none !important;
}

/* Ajustar user-info para header */
header .user-info {
    margin-left: auto;
}

/* User Files Section */
.user-files-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-files-section h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 18px;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    transition: all 0.2s;
}

.file-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.file-item a {
    flex: 1;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item a:hover {
    text-decoration: underline;
}

.file-size {
    color: #6b7280;
    font-size: 14px;
    min-width: 60px;
}

.file-item button {
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.file-item button:hover {
    background: #2563eb;
}
