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

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: linear-gradient(135deg, #000000 0%, #B71440 100%);
    min-height: 100vh;
    padding: 0;
}

.container {
    max-width: 900px;
    margin: 0 auto 20px auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.header {
    background: #000000;
    width: 100%;
    padding: 20px 0;
    margin-bottom: 30px;
}

.header-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.header-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.content {
    padding: 40px;
}

/* Switch de Modo de Carga */
.upload-mode-switch {
    margin-bottom: 30px;
    text-align: center;
}

.switch-container {
    display: inline-flex;
    background: #f0f0f0;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.switch-option {
    padding: 12px 30px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 45px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.switch-option i {
    font-size: 1.1rem;
}

.switch-option.active {
    background: linear-gradient(135deg, #000000 0%, #B71440 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(183, 20, 64, 0.3);
}

.switch-option:hover:not(.active) {
    background: rgba(0,0,0,0.05);
}

/* Contenedor de Contenido Dinámico */
.upload-content-container {
    min-height: 200px;
    position: relative;
    margin-bottom: 30px;
}

.upload-method {
    animation: fadeIn 0.4s ease;
}

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

/* SharePoint Container */
.sharepoint-container {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 30px;
    border: 2px solid #e0e0e0;
}

.sharepoint-status {
    text-align: center;
}

.sharepoint-icon {
    font-size: 3rem;
    color: #B71440;
    margin-bottom: 20px;
}

.sharepoint-message h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.sharepoint-message p {
    color: #666;
    margin-bottom: 20px;
}

.sync-btn {
    background: linear-gradient(135deg, #000000 0%, #B71440 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.sync-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(183, 20, 64, 0.4);
}

.folder-selector {
    margin-bottom: 20px;
}

.folder-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.folder-dropdown {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.folder-dropdown:focus {
    outline: none;
    border-color: #B71440;
    box-shadow: 0 0 0 3px rgba(183, 20, 64, 0.1);
}

.files-preview {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.files-preview h4 {
    color: #333;
    margin-bottom: 15px;
}

.files-list {
    max-height: 200px;
    overflow-y: auto;
}

.upload-area {
    border: 3px dashed #000000;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(45deg, #f8f9ff, #fff);
}

.upload-area:hover {
    border-color: #B71440;
    background: linear-gradient(45deg, #f0f2ff, #f8f9ff);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #4CAF50;
    background: linear-gradient(45deg, #f0fff0, #f8fff8);
}

.upload-icon {
    font-size: 3rem;
    color: #000000;
    margin-bottom: 15px;
}

.upload-text {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 10px;
}

.upload-hint {
    color: #888;
    font-size: 0.9rem;
}

#file {
    display: none;
}

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

.form-group {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #000000;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.process-btn {
    background: linear-gradient(135deg, #000000 0%, #B71440 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.process-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.process-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.progress-container {
    display: none;
    margin: 30px 0;
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.progress-bar-container {
    background: #e9ecef;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin: 15px 0;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #000000, #B71440);
    width: 0%;
    border-radius: 6px;
    transition: width 0.3s ease;
    position: relative;
}

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

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

.progress-text {
    text-align: center;
    color: #555;
    font-weight: 500;
    margin-bottom: 10px;
}

.progress-percentage {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #000000;
    margin-bottom: 10px;
}

.result {
    margin-top: 30px;
    text-align: center;
    display: none;
}

.result.show {
    display: block;
}

.result img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-top: 15px;
}

/* Estilos para indicar descarga automática */
.file-card .fa-download {
    color: #28a745;
    margin-right: 8px;
}

.error {
    background: #fff5f5;
    color: #e53e3e;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e53e3e;
    margin-top: 20px;
}

.success {
    background: #f0fff4;
    color: #38a169;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #38a169;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .header h1 { font-size: 2rem; }
    .content { padding: 20px; }
    .params-grid { grid-template-columns: 1fr; }
    .upload-area { padding: 30px 20px; }
}
