/* style_control.css - Estilos completos para control.html */

/* ========== RESET Y ESTILOS BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

/* ========== OVERLAY DE BLOQUEO MASTER ========== */
.master-blocked-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.master-blocked-message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    z-index: 1001;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    border: 3px solid #f39c12;
    max-width: 450px;
    width: 90%;
    animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
    from {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    }
    to {
        box-shadow: 0 20px 40px rgba(243, 156, 18, 0.4);
    }
}

.master-blocked-message h3 {
    color: #f39c12;
    margin-bottom: 20px;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.master-blocked-message p {
    color: #ecf0f1;
    margin: 12px 0;
    font-size: 1.1em;
}

.master-blocked-message .fa-crown {
    color: #f1c40f;
    font-size: 1.5em;
}

/* ========== CONTENEDOR PRINCIPAL ========== */
.remote-container {
    max-width: 550px;
    margin: 0 auto;
    padding: 20px;
}

.remote-shell {
    background: linear-gradient(145deg, rgba(30, 30, 45, 0.95), rgba(25, 25, 35, 0.95));
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(52, 152, 219, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.remote-shell::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.1) 0%, transparent 70%);
    z-index: -1;
}

/* ========== BARRA SUPERIOR ========== */
.remote-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3498db;
    position: relative;
}

.brand {
    font-size: 1.8em;
    font-weight: 800;
    color: #3498db;
    text-shadow: 0 2px 10px rgba(52, 152, 219, 0.5);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 30px;
    background: #3498db;
    border-radius: 2px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(44, 62, 80, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #2c3e50;
}

.status-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px currentColor;
}

.status-connected {
    background-color: #2ecc71;
    color: #2ecc71;
    animation: pulse 1.5s infinite;
}

.status-disconnected {
    background-color: #e74c3c;
    color: #e74c3c;
}

.status-connecting {
    background-color: #f39c12;
    color: #f39c12;
    animation: pulse 1s infinite;
}

.status-blocked {
    background-color: #9b59b6;
    color: #9b59b6;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#remoteStatus {
    font-weight: 600;
    font-size: 0.95em;
}

.leave-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    display: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.leave-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* ========== INFORMACIÓN DE ALMACENAMIENTO ========== */
.storage-info {
    background: linear-gradient(135deg, rgba(52, 73, 94, 0.4), rgba(44, 62, 80, 0.4));
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

.storage-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.storage-info.danger::before {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.storage-info.warning::before {
    background: linear-gradient(90deg, #f39c12, #f1c40f);
}

.storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #ecf0f1;
    font-size: 1em;
    font-weight: 600;
}

.storage-header i {
    color: #3498db;
    margin-right: 8px;
}

.storage-progress {
    height: 10px;
    background: #2c3e50;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.storage-progress-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

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

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

.storage-info.good .storage-progress-bar {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.storage-info.warning .storage-progress-bar {
    background: linear-gradient(90deg, #f39c12, #f1c40f);
}

.storage-info.danger .storage-progress-bar {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.storage-details {
    font-size: 0.85em;
    color: #95a5a6;
    text-align: right;
    font-weight: 500;
}

/* ========== ESTADO DE VOUCHER ========== */
.voucher-status-section {
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.2), rgba(52, 152, 219, 0.2));
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(52, 152, 219, 0.5);
    position: relative;
    overflow: hidden;
}

.voucher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #ecf0f1;
    font-size: 1em;
    font-weight: 600;
}

.voucher-header i {
    color: #9b59b6;
    margin-right: 8px;
}

#voucherStatusText {
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
}

.voucher-notification-indicator {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: notification-pulse 1.5s infinite;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

@keyframes notification-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
    }
}

.voucher-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.voucher-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.voucher-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.voucher-btn:first-child {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.voucher-btn:last-child {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

/* ========== CONTROLES DE REPRODUCCIÓN ========== */
.rotate-section {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.4), rgba(52, 73, 94, 0.4));
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.rotate-section h4 {
    color: #3498db;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.3em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 15px;
}

.rotate-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3498db, transparent);
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 25px 0;
}

.rotate-button, .audio-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    font-size: 1.8em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.4);
    position: relative;
    overflow: hidden;
}

.rotate-button::before, .audio-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.5s ease;
}

.rotate-button:hover::before, .audio-button:hover::before {
    transform: scale(1);
}

.rotate-button:hover, .audio-button:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.6);
}

.rotate-button.active, .audio-button.active {
    background: linear-gradient(145deg, #2ecc71, #27ae60);
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.4);
}

.rotate-button.active:hover, .audio-button.active:hover {
    box-shadow: 0 15px 30px rgba(46, 204, 113, 0.6);
}

/* Control de duración de imágenes */
.image-duration-control {
    margin-top: 25px;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
}

.image-duration-control label {
    display: block;
    margin-bottom: 15px;
    color: #bdc3c7;
    font-size: 1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.image-duration-control label i {
    color: #3498db;
    font-size: 1.2em;
}

.duration-input-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.duration-input-group input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #3498db;
    border-radius: 10px;
    background: rgba(44, 62, 80, 0.8);
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
}

.duration-input-group input:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.3);
    background: rgba(44, 62, 80, 1);
}

.duration-input-group button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.duration-input-group button:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

/* ========== PROGRESO DE SUBIDA ========== */
.upload-progress {
    display: none;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(52, 73, 94, 0.9));
    border-radius: 15px;
    padding: 20px;
    margin: 25px 0;
    border: 1px solid #3498db;
    position: relative;
    overflow: hidden;
}

.upload-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #ecf0f1;
    font-weight: 600;
}

.progress-header i {
    color: #3498db;
    margin-right: 10px;
}

.progress-bar-container {
    height: 12px;
    background: #2c3e50;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 6px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.progress-details {
    font-size: 0.9em;
    color: #bdc3c7;
    text-align: center;
    font-weight: 500;
}

/* ========== SECCIÓN DE CARGA ========== */
.upload-section {
    margin: 30px 0;
}

.upload-button {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.upload-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.upload-button:hover::before {
    left: 100%;
}

.upload-button:hover {
    background: linear-gradient(135deg, #495057, #343a40);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.upload-button i {
    font-size: 1.3em;
}

/* ========== LISTA DE ARCHIVOS CARGADOS ========== */
.video-list-container {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.4), rgba(52, 73, 94, 0.4));
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.video-list-container h4 {
    color: #3498db;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.3);
    font-size: 1.2em;
    font-weight: 700;
}

.videos-count {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.no-files-message {
    text-align: center;
    color: #95a5a6;
    padding: 40px 0;
    font-style: italic;
    font-size: 1.1em;
}

.video-list-item {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9), rgba(25, 25, 35, 0.9));
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #34495e;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.video-list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #3498db;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-list-item:hover::before {
    opacity: 1;
}

.video-list-item:hover {
    border-color: #3498db;
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.2);
    transform: translateY(-3px);
}

.video-list-item.playing {
    border-color: #2ecc71;
    background: linear-gradient(135deg, 
        rgba(46, 204, 113, 0.15), 
        rgba(39, 174, 96, 0.15));
}

.video-list-item.playing::before {
    background: #2ecc71;
    opacity: 1;
}

.video-info {
    margin-bottom: 20px;
    cursor: pointer;
}

.video-name {
    color: #ecf0f1;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2em;
}

.video-name .fa-video {
    color: #e74c3c;
    font-size: 1.3em;
}

.video-name .fa-image {
    color: #3498db;
    font-size: 1.3em;
}

.playing-indicator {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.75em;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
}

.video-path {
    word-break: break-all;
    color: #95a5a6;
    font-size: 0.9em;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    line-height: 1.5;
}

.video-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.video-duration, .video-size {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ecf0f1;
    padding: 12px 15px;
    background: rgba(52, 73, 94, 0.4);
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.video-duration:hover, .video-size:hover {
    background: rgba(52, 73, 94, 0.6);
    transform: translateY(-2px);
}

.video-duration i, .video-size i {
    color: #3498db;
    font-size: 1.3em;
    width: 24px;
    text-align: center;
}

.video-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(52, 73, 94, 0.5);
    margin-top: 10px;
}

.action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2em;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.action-btn:hover::before {
    width: 100%;
    height: 100%;
}

.action-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.play-video-btn:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.rotate-single-btn:hover {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.rotate-single-btn.active {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    box-shadow: 0 6px 15px rgba(155, 89, 182, 0.4);
}

.preview-video-btn:hover {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

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

/* ========== ESTADO DE CARGA ========== */
.upload-status {
    display: none;
    padding: 15px 25px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    font-weight: 700;
    font-size: 1em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

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

.upload-success {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(39, 174, 96, 0.2));
    border: 2px solid #27ae60;
    color: #27ae60;
}

.upload-error {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.2));
    border: 2px solid #c0392b;
    color: #e74c3c;
}

.upload-info {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(41, 128, 185, 0.2));
    border: 2px solid #2980b9;
    color: #3498db;
}

/* ========== BOTONES DE LIMPIEZA Y CONEXIÓN ========== */
.cleanup-section, .connection-section {
    margin-top: 25px;
}

.cleanup-button, .connection-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.cleanup-button::before, .connection-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.cleanup-button:hover::before, .connection-button:hover::before {
    left: 100%;
}

.cleanup-button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.4);
}

.connection-button {
    background: linear-gradient(135deg, #3f51b5, #303f9f);
}

.connection-button:hover {
    background: linear-gradient(135deg, #303f9f, #283593);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(63, 81, 181, 0.4);
}

/* ========== MODALES ========== */
.modal-overlay, .voucher-modal, .preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(15px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-join-content, .voucher-modal-content, .preview-modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
    border-radius: 25px;
    padding: 40px;
    width: 90%;
    max-width: 450px;
    border: 2px solid #3498db;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-join-content::before, .voucher-modal-content::before, .preview-modal-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.modal-join-content h2 {
    color: #3498db;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(52, 152, 219, 0.5);
}

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

.input-group label {
    display: block;
    margin-bottom: 15px;
    color: #ecf0f1;
    font-size: 1.2em;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 18px;
    border: 2px solid #61dafb;
    border-radius: 15px;
    background: rgba(44, 62, 80, 0.8);
    color: #ecf0f1;
    font-size: 1.4em;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    letter-spacing: 4px;
    font-weight: 700;
    font-family: monospace;
}

.input-group input:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 25px rgba(46, 204, 113, 0.4);
    background: rgba(44, 62, 80, 1);
}

.modal-button-group {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.modal-button {
    flex: 1;
    padding: 18px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.modal-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.modal-button:hover::before {
    left: 100%;
}

.modal-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.primary-button {
    background: linear-gradient(135deg, #61dafb, #21a1f1);
    color: #1a1a2e;
}

.primary-button:hover {
    background: linear-gradient(135deg, #21a1f1, #1a91da);
}

.secondary-button {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.secondary-button:hover {
    background: linear-gradient(135deg, #495057, #343a40);
}

/* ========== MODAL DE PREVIEW ========== */
.preview-modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
}

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: rgba(52, 152, 219, 0.1);
    border-bottom: 2px solid #3498db;
}

.preview-modal-title {
    color: #ecf0f1;
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
}

.preview-close-btn {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 1.8em;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-close-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    transform: rotate(90deg);
}

.preview-container {
    padding: 30px;
    text-align: center;
    max-height: 60vh;
    overflow-y: auto;
}

.preview-video, .preview-image {
    max-width: 100%;
    max-height: 50vh;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.preview-file-info {
    padding: 20px 30px;
    background: rgba(44, 62, 80, 0.4);
    color: #bdc3c7;
    font-size: 1em;
    border-top: 2px solid #34495e;
    line-height: 1.8;
}

/* ========== MODAL DE VOUCHER ========== */
.voucher-modal-content {
    border: 2px solid #9b59b6;
}

.voucher-modal-content h3 {
    color: #9b59b6;
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.8em;
    font-weight: 700;
}

.voucher-modal-content p {
    text-align: center;
    color: #bdc3c7;
    margin-bottom: 25px;
    font-size: 1.1em;
    line-height: 1.6;
}

.voucher-modal-content input[type="file"] {
    width: 100%;
    padding: 15px;
    margin: 20px 0;
    border: 2px dashed #9b59b6;
    border-radius: 10px;
    background: rgba(155, 89, 182, 0.1);
    color: #ecf0f1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voucher-modal-content input[type="file"]:hover {
    background: rgba(155, 89, 182, 0.2);
    border-style: solid;
}

.voucher-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 15px;
    margin: 20px 0;
    border: 3px solid #9b59b6;
    box-shadow: 0 10px 25px rgba(155, 89, 182, 0.4);
}

/* ========== CONTROLES DESHABILITADOS ========== */
.controls-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
    filter: grayscale(1);
}

.controls-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .remote-container {
        padding: 10px;
        max-width: 100%;
    }
    
    .remote-shell {
        padding: 20px;
        border-radius: 20px;
    }
    
    .remote-top-row {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding-bottom: 15px;
    }
    
    .brand {
        font-size: 1.5em;
    }
    
    .control-buttons {
        gap: 25px;
    }
    
    .rotate-button, .audio-button {
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }
    
    .video-details {
        grid-template-columns: 1fr;
    }
    
    .voucher-actions {
        flex-direction: column;
    }
    
    .voucher-btn {
        min-width: 100%;
    }
    
    .modal-button-group {
        flex-direction: column;
    }
    
    .modal-join-content, .voucher-modal-content, .preview-modal-content {
        padding: 30px 25px;
    }
    
    .action-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .remote-shell {
        padding: 15px;
        border-radius: 15px;
    }
    
    .brand {
        font-size: 1.3em;
    }
    
    .rotate-section {
        padding: 20px;
    }
    
    .control-buttons {
        gap: 20px;
    }
    
    .rotate-button, .audio-button {
        width: 55px;
        height: 55px;
        font-size: 1.3em;
    }
    
    .video-actions {
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .video-list-item {
        padding: 20px;
    }
    
    .duration-input-group {
        flex-direction: column;
    }
    
    .duration-input-group button {
        width: 100%;
        justify-content: center;
    }
    
    .modal-join-content h2 {
        font-size: 1.6em;
    }
    
    .input-group input {
        padding: 15px;
        font-size: 1.2em;
        letter-spacing: 3px;
    }
}

/* ========== SCROLLBAR PERSONALIZADO ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
}