/* style-fileshare.css - Estilos específicos para fileshare/index.html */
/* ADAPTADO A LIGHT MODE - Coherente con indexpro */
/* Versión: 2.0 - LIGHT GLASS */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap');

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

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

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

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

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

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

body {
    margin: 0;
    padding: 0;
    font-family: 'Rubik', sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f7fa 50%, #ffffff 100%);
    color: #1d1d1f;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Video de fondo - opacidad reducida para light mode */
#backgroundVideo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.15;
    filter: blur(2px) brightness(1.1);
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* ========== HEADER ========== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    flex-wrap: wrap;
    gap: 15px;
}

.header-title-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-title i {
    color: #2c7da0;
    font-size: 2rem;
}

/* ========== CÓDIGO DE SALA ========== */
.room-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.05);
    padding: 8px 18px;
    border-radius: 40px;
    border: 1px solid rgba(44, 125, 160, 0.3);
}

.room-code-badge {
    background: linear-gradient(135deg, #2c7da0, #1f5e7a);
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: white;
}

.regenerate-btn {
    background: rgba(44, 125, 160, 0.1);
    border: 1px solid rgba(44, 125, 160, 0.3);
    color: #2c7da0;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.regenerate-btn:hover,
.regenerate-btn.focus-highlight {
    background: rgba(44, 125, 160, 0.2);
    transform: scale(1.02);
}

/* ========== SELECTOR DE IDIOMA ========== */
.language-selector-header {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.language-button {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    padding: 8px 20px;
    color: #1d1d1f;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.language-button:hover,
.language-button.focus-highlight {
    background: rgba(44, 125, 160, 0.2);
    color: #2c7da0;
    border-color: #2c7da0;
}

.language-button.active {
    background: #2c7da0;
    color: white;
    border-color: #2c7da0;
    font-weight: 600;
}

/* ========== CONTENIDO PRINCIPAL ========== */
.fileshare-main-content {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    margin-top: 20px;
}

/* ========== ALMACENAMIENTO ========== */
.storage-info {
    margin: 20px 0;
    padding: 15px;
    background: rgba(44, 125, 160, 0.08);
    border-radius: 10px;
}

.total-size-display {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #1d1d1f;
}

.storage-bar-container {
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.storage-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* ========== SUBIDA DE ARCHIVOS ========== */
.file-upload-area {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    text-align: center;
    border: 2px dashed rgba(44, 125, 160, 0.3);
}

.file-input {
    display: none;
}

.file-input-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    margin: 0;
    background: linear-gradient(135deg, #2c7da0, #1f5e7a);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.file-input-label:hover,
.file-input-label.focus-highlight {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(44, 125, 160, 0.3);
}

.upload-limit-message {
    margin-top: 10px;
    padding: 8px 15px;
    background: rgba(44, 125, 160, 0.08);
    border: 1px solid rgba(44, 125, 160, 0.2);
    border-radius: 50px;
    color: #2c7da0;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-limit-message i { font-size: 1rem; }
.upload-limit-message strong { color: #1d1d1f; font-weight: 600; }

/* ========== SECCIONES DE ARCHIVOS ========== */
.uploads-section,
.files-section {
    margin: 20px 0;
    text-align: left;
}

.uploads-section h3,
.files-section h3 {
    color: #2c7da0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.uploads-count {
    color: #2c7da0;
    font-size: 0.9rem;
    margin-left: 5px;
}

.uploads-list-container,
.file-list-container {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    padding: 10px;
    max-height: 250px;
    overflow-y: auto;
}

.uploads-list-container {
    border-left: 3px solid #2c7da0;
}

/* ========== ITEMS DE ARCHIVOS ========== */
.file-item,
.file-upload-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    transition: background 0.2s;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.file-upload-item {
    background: rgba(44, 125, 160, 0.08);
    border: 1px solid rgba(44, 125, 160, 0.2);
}

.file-item:hover {
    background: rgba(44, 125, 160, 0.05);
}

.file-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.file-name {
    font-weight: 500;
    color: #1d1d1f;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.5);
}

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

.file-actions button,
.file-actions a {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.file-actions button:hover,
.file-actions a:hover,
.file-actions button.focus-highlight {
    background: rgba(44, 125, 160, 0.1);
    border-color: #2c7da0;
    color: #2c7da0;
}

.file-actions .delete-btn {
    color: #d32f2f;
}

.file-actions .delete-btn:hover,
.file-actions .delete-btn.focus-highlight {
    background: rgba(211, 47, 47, 0.1);
    border-color: #d32f2f;
    color: #d32f2f;
}

/* ========== PROGRESS BAR ========== */
.progress-container {
    flex: 1;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin: 0 10px;
}

.progress-bar {
    height: 100%;
    background: #2c7da0;
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #1d1d1f;
    font-size: 0.7rem;
    text-shadow: none;
}

.cancel-upload-btn {
    background: none;
    border: none;
    color: #d32f2f;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.cancel-upload-btn:hover {
    background: rgba(211, 47, 47, 0.1);
}

/* ========== BOTONES ========== */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Rubik', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #2c7da0, #1f5e7a);
    color: white;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
}

.btn-secondary:hover,
.btn-secondary.focus-highlight {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #2c7da0, #1f5e7a);
    color: white;
}

.btn-success:hover,
.btn-success.focus-highlight {
    background: linear-gradient(135deg, #1f5e7a, #154c62);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 125, 160, 0.3);
}

/* ========== VISTA PREVIA DE IMAGEN ========== */
.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.image-preview-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(44, 125, 160, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.image-preview-modal-close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.image-preview-modal-close-button:hover {
    color: #2c7da0;
}

.image-file-name {
    text-align: center;
    color: #1d1d1f;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.preview-image {
    max-width: 100%;
    max-height: 60vh;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}

.preview-actions {
    text-align: center;
    margin-top: 20px;
}

/* ========== INDICADOR DE CONEXIÓN ========== */
.connection-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.connection-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.connection-dot.connected {
    background-color: #2e7d32;
    box-shadow: 0 0 10px #2e7d32;
}

.connection-dot.disconnected {
    background-color: #d32f2f;
    box-shadow: 0 0 10px #d32f2f;
}

/* ========== MENSAJE DE ESTADO ========== */
.status-message {
    position: fixed;
    bottom: 80px;
    right: 20px;
    padding: 12px 25px;
    border-radius: 50px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.status-message.success {
    background: rgba(46, 125, 50, 0.9);
    border: 1px solid #2e7d32;
}

.status-message.error {
    background: rgba(211, 47, 47, 0.9);
    border: 1px solid #d32f2f;
}

.status-message.info {
    background: rgba(44, 125, 160, 0.9);
    border: 1px solid #2c7da0;
}

/* ========== MODAL COMPARTIR ========== */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(5px);
}

/* ========== FOCO PARA NAVEGACIÓN ========== */
.focus-highlight {
    outline: 3px solid #ffd700 !important;
    outline-offset: 3px !important;
    z-index: 1000 !important;
    position: relative !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        flex-direction: column;
        text-align: center;
    }

    .header-title-wrapper {
        justify-content: center;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .language-selector-header {
        position: static;
        justify-content: center;
        margin-bottom: 15px;
    }

    .fileshare-main-content {
        padding: 15px;
    }

    .file-input-label {
        font-size: 1rem;
        padding: 12px 20px;
    }

    .file-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .file-info {
        width: 100%;
    }

    .file-name {
        max-width: 200px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .room-code-badge {
        font-size: 1rem;
        padding: 4px 10px;
    }

    .regenerate-btn {
        padding: 4px 10px;
        font-size: 0.7rem;
    }

    .file-name {
        max-width: 150px;
        font-size: 0.9rem;
    }

    .file-actions button,
    .file-actions a {
        padding: 6px 10px;
    }
}

/* ========== MODAL COMPARTIR DINÁMICO ========== */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.share-modal-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border: 2px solid #2c7da0;
    box-shadow: 0 0 30px rgba(44, 125, 160, 0.2);
    animation: slideUp 0.3s ease;
}

.share-modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.share-modal-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2c7da0, #1f5e7a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-modal-icon i {
    color: white;
    font-size: 1.8rem;
}

.share-modal-header h3 {
    color: #2c7da0;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.share-modal-header p {
    color: #6e6e73;
    margin: 5px 0 0 0;
    font-size: 0.9rem;
}

.share-modal-header p strong {
    color: #2c7da0;
}

.share-modal-expiry {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-left: 3px solid #ed6c02;
}

.share-modal-expiry i {
    color: #ed6c02;
    margin-right: 8px;
}

.share-modal-expiry p {
    margin: 0;
    color: #1d1d1f;
}

.share-modal-link {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
    word-break: break-all;
    border: 1px solid #e2e8f0;
}

.share-modal-link code {
    color: #2c7da0;
    font-family: monospace;
    font-size: 0.9rem;
    background: transparent;
}

.share-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.share-modal-actions .btn-copy {
    background: #2c7da0;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
}

.share-modal-actions .btn-copy:hover {
    background: #1f5e7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 125, 160, 0.3);
}

.share-modal-actions .btn-close {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    color: #1d1d1f;
    font-weight: 500;
    transition: all 0.2s ease;
}

.share-modal-actions .btn-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

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