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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-image: url('https://www.gggphoto.com/wp-content/uploads/2019/04/GGGPHOTO_SLIDESHOW_PORTADA_64.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
    padding: 20px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    color: #666;
    font-weight: 500;
}

.btn-logout {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #c82333;
}

.login-card {
    max-width: 450px;
    margin: 0 auto;
}

.login-form {
    margin-top: 30px;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 0.9em;
    color: #666;
}

.login-footer .note {
    margin-top: 10px;
    font-size: 0.85em;
    color: #999;
    font-style: italic;
}

.upload-mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    color: #666;
    transition: all 0.2s;
    font-weight: 500;
}

.mode-btn:hover {
    background: #e9ecef;
    border-color: #bbb;
}

.mode-btn.active {
    background: #4a90e2;
    border-color: #4a90e2;
    color: white;
}

.mode-btn svg {
    flex-shrink: 0;
}

.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.tab-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-weight: 500;
}

.tab-link:hover {
    color: #4a90e2;
    background: #f8f9fa;
}

.tab-link.active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

.tab-link svg {
    flex-shrink: 0;
}

.transfers-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.transfer-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.transfer-item:hover {
    border-color: #4a90e2;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.1);
}

.transfer-item.expired {
    opacity: 0.6;
    border-color: #dc3545;
    background: #fff5f5;
}

.transfer-item.completed {
    opacity: 0.8;
    border-color: #28a745;
    background: #f0fff4;
}

.transfer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
}

.transfer-info {
    flex: 1;
}

.transfer-title {
    font-size: 1.2em;
    color: #333;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.file-count {
    font-size: 0.85em;
    color: #666;
    font-weight: normal;
}

.transfer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9em;
    color: #666;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-badge.status-active {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-expired {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.transfer-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #666;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-view {
    border-color: #4a90e2;
    color: #4a90e2;
}

.btn-view:hover {
    background: #4a90e2;
    color: white;
}

.btn-copy {
    border-color: #28a745;
    color: #28a745;
}

.btn-copy:hover {
    background: #28a745;
    color: white;
}

.btn-delete {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-delete:hover {
    background: #dc3545;
    color: white;
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.transfer-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9em;
}

.detail-item {
    color: #666;
}

.detail-item strong {
    color: #333;
}

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

.empty-state svg {
    color: #ccc;
    margin-bottom: 20px;
}

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

.download-logs {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.logs-summary {
    cursor: pointer;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #4a90e2;
    user-select: none;
}

.logs-summary:hover {
    background: #e9ecef;
}

.logs-summary svg {
    flex-shrink: 0;
}

.logs-content {
    margin-top: 15px;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}

.logs-table thead {
    background: #f8f9fa;
}

.logs-table th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.logs-table td {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
}

.logs-table tr:hover {
    background: #fafafa;
}

.ip-badge {
    font-family: 'Courier New', monospace;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.location-badge {
    display: inline-block;
    background: #e7f3ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #004085;
}

.location-cell,
.isp-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logs-note {
    margin-top: 10px;
    font-size: 0.85em;
    color: #999;
    text-align: center;
    font-style: italic;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.message {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    color: #333;
    line-height: 1.6;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    margin-bottom: 30px;
}

.upload-area:hover {
    border-color: #4a90e2;
    background: #f0f7ff;
}

.upload-area.dragover {
    border-color: #4a90e2;
    background: #e8f4ff;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

#fileInput {
    display: none;
}

.upload-icon {
    color: #4a90e2;
    margin-bottom: 20px;
}

.upload-area h2 {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.upload-area p {
    color: #666;
    margin-bottom: 20px;
}

.file-info {
    margin-top: 20px;
    font-size: 0.9em;
    color: #999;
}

.file-list {
    margin-bottom: 30px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    gap: 15px;
}

.file-item .file-icon {
    color: #4a90e2;
    flex-shrink: 0;
}

.file-item .file-info {
    flex: 1;
    min-width: 0;
}

.file-item .file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    word-break: break-word;
}

.file-item .file-size {
    font-size: 0.9em;
    color: #666;
}

.file-item .file-remove {
    background: #ff4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}

.file-item .file-remove:hover {
    background: #cc0000;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a90e2;
}

.form-group textarea {
    resize: vertical;
}

.btn-primary,
.btn-download,
.btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    width: 100%;
}

.btn-primary {
    background: #4a90e2;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-download {
    background: #28a745;
    color: white;
    padding: 10px 20px;
    width: auto;
    font-size: 0.9em;
}

.btn-download:hover {
    background: #218838;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-top: 20px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loader svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
}

.result.success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.result.error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.result h3 {
    margin-bottom: 15px;
}

.result .download-link {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    word-break: break-all;
}

.result .download-link:hover {
    background: #218838;
}

.files-list {
    margin: 30px 0;
}

.info-box {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    color: #004085;
}

.info-box p {
    margin: 5px 0;
}

.footer {
    text-align: center;
    margin-top: 30px;
}

.footer-info {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
}

.progress-container {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #4a90e2;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 500;
    color: #333;
}

.progress-info #progressText {
    font-size: 1em;
}

.progress-info #progressPercent {
    font-size: 1.2em;
    color: #4a90e2;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2 0%, #357abd 100%);
    transition: width 0.3s ease;
    width: 0%;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

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

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

.progress-note {
    margin-top: 12px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
    font-style: italic;
}

@media (max-width: 768px) {
    .card {
        padding: 25px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .user-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-logout {
        width: 100%;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-link {
        justify-content: center;
        border-bottom: none;
        border-left: 3px solid transparent;
        margin-bottom: 0;
    }
    
    .tab-link.active {
        border-left-color: #4a90e2;
        border-bottom-color: transparent;
    }
    
    .upload-mode-selector {
        flex-direction: column;
    }
    
    .mode-btn {
        font-size: 0.85em;
        padding: 12px 15px;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .file-item {
        flex-wrap: wrap;
    }
    
    .btn-download {
        width: 100%;
        margin-top: 10px;
    }
    
    .transfer-header {
        flex-direction: column;
    }
    
    .transfer-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-action {
        flex: 1;
        justify-content: center;
    }
    
    .transfer-details {
        grid-template-columns: 1fr;
    }
    
    .logs-table {
        font-size: 0.75em;
    }
    
    .logs-table th,
    .logs-table td {
        padding: 8px 5px;
    }
    
    /* En móviles mostrar solo fecha, IP y ubicación */
    .logs-table th:nth-child(4),
    .logs-table td:nth-child(4),
    .logs-table th:nth-child(5),
    .logs-table td:nth-child(5),
    .logs-table th:nth-child(6),
    .logs-table td:nth-child(6),
    .logs-table th:nth-child(7),
    .logs-table td:nth-child(7) {
        display: none;
    }
    
    .logs-table {
        display: block;
        overflow-x: auto;
    }
    
    .location-cell,
    .isp-cell {
        max-width: 120px;
    }
}

