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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #4a90e2 100%);
    min-height: 100vh;
    color: #333;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.logo {
    margin-bottom: 30px;
}

.cloud-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.logo h1 {
    color: #4a90e2;
    font-size: 2rem;
    font-weight: 600;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 15px;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.input-group input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.login-btn, .logout-btn, .select-files-btn, .refresh-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.login-btn:hover, .logout-btn:hover, .select-files-btn:hover, .refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.3);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(231, 76, 60, 0.1);
    display: none;
}

/* App Styles */
.app-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #4a90e2 100%);
}

.app-header {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-small {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-small .cloud-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-small h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logout-btn {
    width: auto;
    padding: 10px 20px;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.logout-btn:hover {
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    display: grid;
    gap: 30px;
}

.upload-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(74, 144, 226, 0.1);
}

.upload-area {
    border: 3px dashed #4a90e2;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.02), rgba(53, 122, 189, 0.02));
}

.upload-area:hover, .upload-area.dragover {
    border-color: #357abd;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08), rgba(53, 122, 189, 0.08));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(74, 144, 226, 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-icon {
    font-size: 3rem;
    opacity: 0.7;
    filter: drop-shadow(0 2px 4px rgba(74, 144, 226, 0.2));
}

.upload-area h3 {
    color: #4a90e2;
    font-size: 1.3rem;
    font-weight: 600;
}

.upload-area p {
    color: #666;
    font-size: 0.9rem;
}

.select-files-btn {
    width: auto;
    margin-top: 10px;
}

.upload-progress {
    margin-top: 20px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: linear-gradient(90deg, #e1e8ed, #f0f3f7);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #357abd, #2a5298);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.progress-text {
    color: #4a90e2;
    font-weight: 600;
    font-size: 1.1rem;
}

.files-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(74, 144, 226, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(74, 144, 226, 0.1);
}

.section-header h3 {
    color: #4a90e2;
    font-size: 1.3rem;
    font-weight: 600;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-toggle {
    display: flex;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4a90e2;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    background: rgba(74, 144, 226, 0.2);
}

.view-btn.active {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.refresh-btn {
    width: auto;
    padding: 10px 15px;
    font-size: 0.9rem;
}

/* Vista en mosaico (grid) */
.files-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.files-list.grid-view .file-item {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    min-height: 200px;
}

.files-list.grid-view .file-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.15);
    border-color: #4a90e2;
    background: linear-gradient(135deg, #ffffff, #f0f7ff);
}

.files-list.grid-view .file-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex: 1;
    width: 100%;
}

.files-list.grid-view .file-thumbnail {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.files-list.grid-view .file-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.files-list.grid-view .file-details {
    width: 100%;
}

.files-list.grid-view .file-details h4 {
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    word-break: break-word;
}

.files-list.grid-view .file-meta {
    color: #666;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.files-list.grid-view .file-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    width: 100%;
    justify-content: center;
}

/* Vista en lista */
.files-list.list-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.files-list.list-view .file-item {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.files-list.list-view .file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
    border-color: #4a90e2;
    background: linear-gradient(135deg, #ffffff, #f0f7ff);
}

.files-list.list-view .file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.files-list.list-view .file-thumbnail {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.files-list.list-view .file-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.files-list.list-view .file-details h4 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.files-list.list-view .file-meta {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    gap: 15px;
}

.files-list.list-view .file-actions {
    display: flex;
    gap: 10px;
}

.download-btn, .delete-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.download-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.3);
}

.delete-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.delete-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.3);
}

.hidden {
    display: none !important;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .files-list.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .files-list.list-view .file-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .files-list.list-view .file-actions {
        width: 100%;
        justify-content: center;
    }
    
    .main-content {
        padding: 20px 15px;
    }
}