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

body {
    background: linear-gradient(rgba(17, 17, 17, 0.88), rgba(17, 17, 17, 0.88)), url('r1.jpeg') center/cover fixed;
    color: #fff;
    font-family: 'Arial', sans-serif;
    padding: 20px;
    padding-bottom: 70px;
    
    /* Cursor personalizado */
    cursor: url('totem.png'), auto; 
}

/* Forzar el cursor en botones y enlaces */
a, button, input {
    cursor: url(''), pointer;
}

/* Barra superior */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(17, 17, 17, 0.95); /* Fondo para que las cámaras no se transparenten al hacer scroll */
    padding-top: 10px; /* Espacio extra superior */
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
}

h1 {
    font-size: 26px;
    color: #e0e0e0;
    letter-spacing: 2px;
    font-weight: bold;
}

.logo-titulo {
    max-height: 80px;
    width: auto;
}

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

/* Botones */
.filter-btn, .refresh-btn {
    padding: 10px 15px;
    background-color: #222;
    color: #aaa;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.filter-btn:hover, .refresh-btn:hover {
    background-color: #333;
}

.filter-btn.active {
    background-color: #ff3333;
    color: white;
    border-color: #ff3333;
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.5);
}

/* Buscador */
.search-container {
    position: relative;
}

#searchInput {
    padding: 10px 35px 10px 15px;
    border-radius: 5px;
    border: 1px solid #444;
    background-color: #222;
    color: #fff;
    font-size: 16px;
    width: 230px;
    outline: none;
}

#searchInput:focus {
    border-color: #007bff;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Animacion de entrada para la cuadricula */
.camera-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    animation: fadeIn 1.2s ease-out;
}

/* Efecto de desvanecimiento hacia arriba */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.camera-feed {
    display: block;
    position: relative;
    background-color: #000;
    border: 3px solid #333;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    height: 160px;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}

.camera-feed:hover {
    transform: scale(1.03);
    border-color: #666;
}

/* Pantalla y Miniatura */
.screen {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: repeating-linear-gradient(0deg, #111, #111 2px, #222 2px, #222 4px);
    position: relative;
}

.stream-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.offline-screen {
    background: #0a0a0a;
}

.no-signal-text {
    color: #444;
    font-weight: bold;
    font-family: monospace;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.streamer-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.85);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 10;
}

/* Indicadores de Estado */
.status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 10;
}

.online {
    background-color: #33ff33;
    box-shadow: 0 0 10px #33ff33, 0 0 20px #33ff33;
    animation: blink-green 2s infinite;
}

.offline {
    background-color: #ff3333;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

@keyframes blink-green {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}
.footer-link {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #33ff33;
    text-decoration: underline;
}

/* Footer pegajoso */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #0a0a0a;
    color: #777;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    font-size: 13px;
    border-top: 1px solid #222;
    letter-spacing: 1.5px;
    z-index: 100;
}

/* Pantallas medianas (Tablets) */
@media (max-width: 992px) {
    .camera-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Pantallas pequeñas (Celulares verticales) */
@media (max-width: 768px) {
    .camera-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .controls {
        flex-direction: column;
        width: 100%;
    }

    #searchInput {
        width: 100%;
    }

    .sticky-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Celulares muy estrechos */
@media (max-width: 480px) {
    .camera-grid {
        grid-template-columns: 1fr;
    }
    .camera-feed {
        height: 200px;
    }
}

/* Cuadricula especifica para los Roleplayers */
.roleplayers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px;
    animation: fadeIn 1.2s ease-out;
}

.roleplayer-card {
    background-color: #111;
    border: 2px solid #333;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
    text-align: center;
}

.roleplayer-card:hover {
    transform: translateY(-8px);
    border-color: #aa55ff;
    box-shadow: 0 8px 20px rgba(170, 85, 255, 0.4);
}

.roleplayer-img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 2px solid #333;
}

.roleplayer-info {
    padding: 20px 15px;
}

.roleplayer-info h3 {
    color: #fff;
    margin-bottom: 5px;
    font-size: 22px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.roleplayer-info p {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Botones de redes sociales en cada tarjeta */
.social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.social-links a {
    background-color: #222;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #444;
    transition: all 0.2s;
}

.social-links a:hover {
    background-color: #aa55ff;
    color: #fff;
    border-color: #aa55ff;
}