/* style.css */
:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: rgba(255, 255, 255, 0.1);
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #10b981;
    --secondary-hover: #059669;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --dropzone-bg: rgba(15, 23, 42, 0.5);
    --dropzone-border: #3b82f6;
    --input-bg: rgba(15, 23, 42, 0.8);
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Fondo Animado */
.bg-animated {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.1), transparent 25%);
    z-index: -1;
    animation: bgPulse 15s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

/* Contenedor Principal */
.container {
    width: 100%;
    max-width: 540px;
    padding: 20px;
    z-index: 10;
}

/* Pestañas (Estilo Rclone/Exe) */
.tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 0;
    justify-content: center;
}

.tab-btn {
    background: rgba(30, 41, 59, 0.9);
    border: none;
    color: #94a3b8;
    padding: 12px 25px;
    border-radius: 16px 16px 0 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.2s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    top: 1px;
}

.tab-btn:hover {
    background: rgba(40, 53, 72, 0.9);
    color: white;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    z-index: 2;
}

/* Paneles (Glassmorphism) */
.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    border-top-left-radius: 5px; /* Para conectar con las pestañas */
    padding: 25px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.panel.active {
    display: flex;
    animation: fadeIn 0.4s ease forwards;
}

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

.hidden {
    display: none !important;
}

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

/* Tipografía */
.logo {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--primary-color);
}

h2 {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 10px;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--text-muted);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    background: var(--dropzone-bg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--dropzone-border);
    background: rgba(59, 130, 246, 0.1);
}

.drop-zone .icon-large {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.drop-zone p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Info de Archivo */
.file-info {
    background: var(--input-bg);
    padding: 15px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--panel-border);
}

.file-info span {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

#removeFileBtn {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 16px;
}

/* Formularios */
.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-size: 13px;
    color: var(--text-muted);
}

.input-group select, .input-group input {
    background: var(--input-bg);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    padding: 12px;
    border-radius: 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.input-group select:focus, .input-group input:focus {
    border-color: var(--primary-color);
}

.big-input {
    font-size: 24px !important;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Botones */
.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

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

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

.primary-btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.secondary-btn {
    background-color: var(--input-bg);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
}

.secondary-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.action-btn {
    background-color: var(--secondary-color);
    color: white;
}

.action-btn:hover {
    background-color: var(--secondary-hover);
}

/* Progreso */
.progress-container {
    width: 100%;
    background: var(--input-bg);
    border-radius: 10px;
    height: 20px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Enlaces Cambio de Panel */
.switch-panel {
    display: none;
}

.switch-panel a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Pantalla Éxito */
.success-icon {
    font-size: 64px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.code-box {
    background: var(--input-bg);
    padding: 15px;
    border-radius: 16px;
    margin-top: 15px;
    border: 1px solid var(--panel-border);
    position: relative;
}

.code-box .label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-align: left;
}

.code-display {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--primary-color);
}

.link-display {
    width: calc(100% - 40px);
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
}

.copy-btn {
    position: absolute;
    right: 15px;
    bottom: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
}

.copy-btn:hover {
    color: var(--primary-color);
}

/* Detalles Descarga */
.download-info {
    background: var(--input-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 20px;
}

.details .file-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    word-break: break-all;
}

.details .file-size, .details .file-expire {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

/* Toasts */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    background: var(--danger);
}

/* Tabla de Usuarios */
.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

.users-table th, .users-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--panel-border);
}

.users-table th {
    color: var(--text-muted);
    font-weight: 600;
}

.users-table td {
    color: var(--text-main);
}

.action-icon {
    cursor: pointer;
    margin: 0 5px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.action-icon:hover {
    color: var(--primary-color);
}

.action-icon.delete:hover {
    color: var(--danger);
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-color);
    border: 1px solid var(--panel-border);
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.modal-content h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--primary-color);
}

/* ===== Responsive Mobile ===== */
@media (max-width: 600px) {
    .container {
        max-width: 95%;
        padding: 10px;
        transform: scale(0.95);
        transform-origin: top center;
    }

    .panel {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .logo {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }

    .subtitle {
        font-size: 12px;
    }

    .big-input {
        font-size: 20px !important;
        letter-spacing: 3px;
        padding: 10px !important;
    }

    .btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Tabs responsivas: reducir padding y permitir wrap */
    .tabs {
        flex-wrap: wrap;
        gap: 2px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 11px;
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
        white-space: nowrap;
    }

    .drop-zone {
        padding: 20px 10px;
    }

    .drop-zone .icon-large {
        font-size: 36px;
    }

    .drop-zone p {
        font-size: 12px;
    }

    /* Botones Archivo/Carpeta dentro del dropzone */
    .drop-zone .btn.secondary-btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
        min-width: 0;
    }

    .code-display {
        font-size: 22px;
        letter-spacing: 3px;
    }

    .input-group select,
    .input-group input {
        padding: 10px;
        font-size: 13px;
    }

    .file-info {
        padding: 10px;
    }

    .file-info span {
        font-size: 12px;
    }

    .download-info {
        padding: 14px;
    }

    .details .file-name {
        font-size: 14px;
    }

    .details .file-size,
    .details .file-expire {
        font-size: 12px;
    }

    .header-logo {
        height: 22px;
        top: 10px;
        right: 10px;
    }

    .modal-content {
        max-width: 90%;
        padding: 20px;
    }

    .users-table {
        font-size: 11px;
    }

    .users-table th,
    .users-table td {
        padding: 6px;
    }

    .toast {
        font-size: 12px;
        padding: 10px 18px;
    }
}
