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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
}

/* Páginas con imagen personalizada */
#welcome-page, #login-page {
    background-image: url('./attached_assets/d5e01395-1726-4e5c-b9b9-9a583d96e57f.png_1757082156804.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    min-height: 100dvh; /* Para dispositivos móviles modernos */
}

/* Mejoras para dispositivos móviles - imagen de fondo */
@media (max-width: 768px) {
    #welcome-page, #login-page {
        background-attachment: scroll; /* Mejor rendimiento en móviles */
        background-size: cover;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    #welcome-page, #login-page {
        background-size: cover;
        background-position: center center;
    }
}

/* Sección de historia */
.story-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
}

.story-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 12px 0;
    color: rgba(255, 255, 255, 0.9);
}

.story-section p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.85);
    text-align: justify;
}

/* Utilidades */
.hidden {
    display: none !important;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    min-height: 100dvh; /* Para dispositivos móviles modernos */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
}

.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    margin-bottom: 16px;
    width: 100%;
    color: white;
    max-height: 80vh;
    max-height: 80dvh; /* Para dispositivos móviles modernos */
    overflow-y: auto;
    box-sizing: border-box;
}

/* Scrollbar personalizado para el card */
.card::-webkit-scrollbar {
    width: 6px;
}

.card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.card::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: 32px;
    color: white;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
    backdrop-filter: blur(10px);
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.logo p {
    font-size: 16px;
    opacity: 0.9;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

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

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.divider {
    text-align: center;
    margin: 20px 0;
    color: #666;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
    z-index: 1;
}

.divider {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 16px;
    z-index: 2;
    position: relative;
}


/* Página del juego */
#game-page {
    background-image: url('./attached_assets/e5edf338-fe30-4cca-98c2-298eb1ffcc31.png_1757078517068.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Exit button */
.exit-button-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.exit-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.exit-btn:active {
    transform: scale(0.95);
}

/* Progress counter */
.progress-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 8px 16px;
    backdrop-filter: blur(20px);
    z-index: 100;
}

.progress-counter span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 14px;
}


/* Modal de Completación */
.completion-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
    max-width: 400px;
    width: 90%;
    animation: completionSlideIn 0.5s ease;
}

.completion-icon {
    font-size: 64px;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.completion-card h3 {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.completion-card p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.5;
}

@keyframes completionSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Botones del modal de completación */
.completion-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.completion-buttons .btn {
    width: 100%;
    margin: 0;
}

/* Responsive para modal de completación */
@media (max-width: 480px) {
    .completion-card {
        width: 95%;
        max-width: none;
    }
    
    .completion-icon {
        font-size: 48px;
        margin-bottom: 16px;
    }
    
    .completion-card h3 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .completion-card p {
        font-size: 14px;
        margin-bottom: 24px;
    }
}

@media (max-height: 600px) {
    .completion-card {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .completion-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }
    
    .completion-card h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .completion-card p {
        font-size: 13px;
        margin-bottom: 20px;
    }
}

/* Cuadrícula de fotos */
.photos-grid-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 120px;
}

.photo-slot {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.photo-slot.filled {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.8);
    padding: 0;
}

.photo-slot.filled img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

/* CSS del delete-btn eliminado - ya no se usa el botón pequeño en la cuadrícula */

/* Botón disparador de cámara */
.camera-button-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.camera-shutter-btn {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border: 4px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.camera-shutter-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.camera-shutter-btn:active {
    transform: scale(0.95);
}

.shutter-ring {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.shutter-circle {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.camera-shutter-btn:hover .shutter-ring {
    border-color: rgba(255, 255, 255, 1);
}

.camera-shutter-btn:hover .shutter-circle {
    background: rgba(255, 255, 255, 1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cámara */
.camera-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-controls {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 1001;
    padding: 0 20px;
}

.camera-control-btn {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.camera-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.capture-btn {
    width: 80px;
    height: 80px;
    background: white;
    color: #333;
    border: 4px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.capture-btn:hover {
    transform: scale(1.1);
}

/* Colección */

/* Administración */
.admin-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.players-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

.players-list h2 {
    color: white;
    margin-bottom: 16px;
    text-align: center;
}

.table-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.player-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid #e1e5e9;
    align-items: center;
}

.player-row:last-child {
    border-bottom: none;
}

.player-row.header {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.player-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar {
    width: 32px;
    height: 32px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.progress-mini {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-mini-bar {
    width: 40px;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
}

.progress-mini-fill {
    height: 100%;
    background: #667eea;
    transition: width 0.3s ease;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

.status-progress {
    background: #fff3cd;
    color: #856404;
}

/* Sección de fotos enviadas */
.submitted-games-section {
    max-width: 800px;
    margin: 20px auto 0;
    padding: 0 20px 20px;
}

.submitted-games-section h2 {
    color: white;
    margin-bottom: 16px;
    text-align: center;
}

.submitted-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.submitted-game-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.game-card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.room-code {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 8px;
}

.game-card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: #666;
}

.photos-count {
    font-weight: 600;
    color: #667eea;
}

.submit-time {
    font-size: 12px;
}

.photos-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.photo-thumbnail img {
    transition: transform 0.2s ease;
}

.photo-thumbnail img:hover {
    transform: scale(1.05);
}

.more-photos {
    background: #f0f0f0;
    color: #666;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Responsive para dispositivos móviles */
@media (max-width: 768px) {
    .submitted-games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .photos-preview {
        gap: 6px;
    }
    
    .photo-thumbnail img {
        width: 50px !important;
        height: 50px !important;
    }
}

/* Estilos para el panel de administración mejorado */
.admin-controls {
    display: flex;
    gap: 12px;
}

.player-row.clickable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.player-row.clickable:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.btn.btn-warning {
    background: #f39c12;
    color: white;
}

.btn.btn-warning:hover {
    background: #e67e22;
}

.btn.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn.btn-danger:hover {
    background: #c0392b;
}

.btn.btn-success {
    background: #27ae60;
    color: white;
}

.btn.btn-success:hover {
    background: #229954;
}

/* Modales */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.modal-body {
    padding: 20px;
}

/* Grid de fotos del jugador */
.player-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.player-photo-item {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.player-photo-item:hover {
    transform: scale(1.05);
}

.player-photo-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.photo-number {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Puntuación de juegos */
.game-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.game-info p {
    margin: 8px 0;
    color: #333;
}

.scoring-section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #667eea;
    margin-bottom: 20px;
}

.scoring-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.score-input-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.score-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e1e5e9;
    outline: none;
    appearance: none;
}

.score-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.score-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.score-display {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    min-width: 40px;
    text-align: center;
}

/* Grid de fotos del juego */
.game-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
}

.game-photo-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.game-photo-item:hover {
    transform: scale(1.05);
}

.game-photo-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

/* Información de puntaje en tarjetas */
.game-score-info {
    margin: 12px 0;
}

.game-score {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

.game-score:not(.pending) {
    background: #d4edda;
    color: #155724;
}

.game-score.pending {
    background: #fff3cd;
    color: #856404;
}

/* Modal de mantenimiento */
.maintenance-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.maintenance-warning p {
    margin: 8px 0;
    color: #856404;
}

.maintenance-warning ul {
    margin: 12px 0 12px 20px;
    color: #856404;
}

.maintenance-controls {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-controls {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
    }
    
    .player-photos-grid,
    .game-photos-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .maintenance-controls {
        flex-direction: column;
    }
    
    .score-input-container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* Photo viewer modal - más integrado al juego */
.photo-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.photo-viewer-modal.hidden {
    display: none;
}

.photo-viewer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
}

.photo-viewer-content {
    position: relative;
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.4s ease;
}

.photo-viewer-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

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

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

.photo-viewer-close {
    position: absolute;
    top: -70px;
    left: -10px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    min-width: 80px;
    justify-content: center;
}

.photo-viewer-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.photo-viewer-delete {
    position: absolute;
    top: -70px;
    right: -10px;
    background: rgba(255, 75, 87, 0.15);
    border: 2px solid rgba(255, 75, 87, 0.4);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    min-width: 90px;
    justify-content: center;
}

.photo-viewer-delete:hover {
    background: rgba(255, 75, 87, 0.3);
    border-color: rgba(255, 75, 87, 0.6);
    transform: scale(1.05);
}

.button-icon {
    font-size: 16px;
}

.button-text {
    font-size: 13px;
    font-weight: 500;
}

/* Responsive para modal del visor de fotos */
@media (max-height: 700px) {
    /* Para pantallas con poca altura */
    .photo-viewer-content {
        max-height: 75vh;
    }
    
    .photo-viewer-close, .photo-viewer-delete {
        top: -55px;
        padding: 6px 12px;
        font-size: 12px;
        min-width: 70px;
    }
    
    .button-icon {
        font-size: 14px;
    }
    
    .button-text {
        font-size: 11px;
    }
}

@media (max-height: 600px) {
    /* Para pantallas muy bajas */
    .photo-viewer-content {
        max-height: 70vh;
    }
    
    .photo-viewer-close, .photo-viewer-delete {
        top: -50px;
        padding: 5px 10px;
        font-size: 11px;
        min-width: 60px;
    }
    
    .button-icon {
        font-size: 12px;
    }
    
    .button-text {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    /* Para pantallas móviles pequeñas */
    .photo-viewer-content {
        max-width: 95vw;
        max-height: 75vh;
    }
    
    .photo-viewer-close {
        left: -5px;
    }
    
    .photo-viewer-delete {
        right: -5px;
    }
}

@media (max-width: 400px) {
    /* Para pantallas muy pequeñas */
    .photo-viewer-content {
        max-width: 98vw;
        max-height: 70vh;
    }
    
    .photo-viewer-close, .photo-viewer-delete {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 65px;
    }
    
    .photo-viewer-close {
        left: 0px;
    }
    
    .photo-viewer-delete {
        right: 0px;
    }
}

/* Para pantallas muy bajas en orientación landscape */
@media (orientation: landscape) and (max-height: 500px) {
    .photo-viewer-content {
        max-height: 60vh;
    }
    
    .photo-viewer-close, .photo-viewer-delete {
        top: -45px;
        padding: 4px 8px;
        font-size: 10px;
        min-width: 55px;
    }
    
    .button-icon {
        font-size: 11px;
    }
    
    .button-text {
        font-size: 9px;
    }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    backdrop-filter: blur(10px);
    z-index: 1001;
    transition: opacity 0.3s ease;
}

.toast.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Responsive - Página de bienvenida */
@media (max-height: 700px) and (orientation: landscape) {
    /* Para pantallas horizontales pequeñas */
    .container {
        justify-content: flex-start;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .card {
        max-height: 85vh;
        margin-bottom: 8px;
    }
    
    .logo {
        margin-bottom: 16px;
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .logo h1 {
        font-size: 22px;
        margin-bottom: 4px;
    }
    
    .logo p {
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    /* Para pantallas medianas */
    .container {
        padding: 16px;
        max-width: 95%;
    }
    
    .card {
        padding: 20px;
        max-height: 75vh;
    }
    
    .story-section h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .story-section h4 {
        font-size: 16px;
        margin: 16px 0 8px 0;
    }
    
    .story-section p {
        font-size: 13px;
        margin-bottom: 12px;
    }
}

@media (max-width: 400px) {
    /* Para pantallas muy pequeñas */
    .container {
        padding: 12px;
        max-width: 98%;
    }
    
    .card {
        padding: 16px;
        max-height: 70vh;
        border-radius: 12px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .logo h1 {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .logo p {
        font-size: 13px;
    }
    
    .story-section h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .story-section h4 {
        font-size: 15px;
        margin: 12px 0 6px 0;
    }
    
    .story-section p {
        font-size: 12px;
        margin-bottom: 10px;
        line-height: 1.5;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-height: 600px) {
    /* Para pantallas muy bajas */
    .container {
        justify-content: flex-start;
        padding-top: 5px;
        padding-bottom: 5px;
    }
    
    .card {
        max-height: 90vh;
        margin-bottom: 5px;
    }
    
    .logo {
        margin-bottom: 12px;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .logo h1 {
        font-size: 18px;
        margin-bottom: 2px;
    }
    
    .logo p {
        font-size: 12px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .card {
        padding: 20px;
    }
    
    .player-row {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 8px;
        font-size: 14px;
    }
    
    .player-row .room, .player-row .time {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .photos-grid-container {
        padding: 16px;
    }
    
    .photos-grid {
        gap: 10px;
        margin-bottom: 100px;
    }
    
    .photo-slot {
        border-radius: 12px;
    }
    
    .camera-button-container {
        bottom: 30px;
    }
    
    .camera-shutter-btn {
        width: 70px;
        height: 70px;
    }
    
    .shutter-ring {
        width: 50px;
        height: 50px;
    }
    
    .shutter-circle {
        width: 32px;
        height: 32px;
    }
    
    .stat-number {
        font-size: 24px;
    }
}

/* Unified Players Table - Estilo super limpio */
.unified-table-container {
    margin-top: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.unified-player-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr 1fr 1fr;
    gap: 15px;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    color: #333;
    font-size: 14px;
}

.unified-player-row.header {
    background: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    font-size: 12px;
    color: #666;
}

.unified-player-row:hover:not(.header) {
    background: #f8f9fa;
}

/* Estados para la tabla unificada - Super simple */
.server-status.submitted {
    color: #28a745;
    font-weight: 500;
}

.server-status.not-submitted {
    color: #dc3545;
}

.score-display.scored {
    font-weight: 600;
    color: #333;
}

.score-display.unscored {
    color: #6c757d;
}

.local-status {
    color: #333;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #007bff;
    cursor: pointer;
    background: #007bff;
    color: white;
    font-weight: normal;
    transition: background-color 0.2s ease;
}

.btn-small:hover {
    background: #0056b3;
}

.no-actions {
    color: #7f8c8d;
    font-style: italic;
    font-size: 12px;
}

.no-data {
    color: #7f8c8d;
    font-style: italic;
    font-size: 12px;
}

.local-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

/* Tabla uniforme para panel de administración */
.uniform-table {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e6ed;
}

.table-row {
    display: grid;
    grid-template-columns: 2.5fr 1.2fr 1fr 1.8fr 1.2fr 1.3fr;
    align-items: center;
    min-height: 56px;
}

.table-header {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e6ed;
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-data-row {
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.table-data-row:hover {
    background: #f8f9fa;
}

.table-data-row:last-child {
    border-bottom: none;
}

.table-cell {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar {
    width: 36px;
    height: 36px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.player-name {
    font-weight: 500;
    color: #2c3e50;
}

.score-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 80px;
}

.score-assigned {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.score-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.action-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.no-data-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

/* Responsive para tabla unificada */
@media (max-width: 1200px) {
    .table-row {
        grid-template-columns: 2fr 1fr 1fr 1.5fr 1fr 1fr;
        font-size: 13px;
    }
    
    .table-cell {
        padding: 10px 12px;
    }
    
    .player-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

@media (max-width: 968px) {
    .table-row {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 8px;
    }
    
    .table-cell.room-col,
    .table-cell.date-col,
    .table-cell.score-col {
        display: none;
    }
    
    .table-header .room-col,
    .table-header .date-col,
    .table-header .score-col {
        display: none;
    }
}

.unified-player-row {
    grid-template-columns: 2fr 1fr 1.2fr 1fr 1fr 0.8fr 1fr;
    font-size: 12px;
    gap: 10px;
}

@media (max-width: 768px) {
    .unified-player-row {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 8px;
        padding: 10px;
    }
    
    .unified-player-row .local-progress,
    .unified-player-row .local-status,
    .unified-player-row .server-status,
    .unified-player-row .score-display {
        display: none;
    }
}

/* Página de Redes Sociales */
#social-page {
    background: url("attached_assets/d5e01395-1726-4e5c-b9b9-9a583d96e57f.png_1757082156804.jpeg") center center / cover no-repeat;
    background-color: #2d3748; /* Fallback en caso de que no cargue la imagen */
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    padding-bottom: 40px;
}

#social-page.active {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

#social-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 0%, transparent 60%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

.social-container {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 20px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.social-header h1 {
    color: white;
    margin-bottom: 5px;
    font-size: 22px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.social-header p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 20px;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

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

.instagram-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.facebook-btn {
    background: #4267B2;
}

.google-btn {
    background: #4285f4;
}

.social-icon {
    font-size: 18px;
}

.social-back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    margin-top: 15px;
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.social-back-btn:hover {
    background: rgba(108, 117, 125, 1);
}

@media (max-width: 480px) {
    .social-container {
        padding: 15px;
        max-width: 280px;
    }
    
    .social-header h1 {
        font-size: 20px;
    }
    
    .social-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}
