<title>Classroom - Gaming Platform</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--bg-primary: #0a0e27;
--bg-secondary: #1a1f3a;
--bg-tertiary: #252d4a;
--text-primary: #ffffff;
--text-secondary: #b0b9cc;
--accent-primary: #7c3aed;
--accent-secondary: #ec4899;
--accent-tertiary: #06b6d4;
--success: #10b981;
--danger: #ef4444;
--warning: #f59e0b;
}
body.light-mode {
--bg-primary: #f8fafc;
--bg-secondary: #f1f5f9;
--bg-tertiary: #e2e8f0;
--text-primary: #0f172a;
--text-secondary: #475569;
--accent-primary: #6d28d9;
--accent-secondary: #db2777;
--accent-tertiary: #0891b2;
}
html, body {
width: 100%;
height: 100%;
background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
color: var(--text-primary);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
overflow: hidden;
}
#pantalla-menu {
display: flex;
flex-direction: column;
height: 100vh;
width: 100vw;
overflow-y: auto;
overflow-x: hidden;
padding: 20px;
gap: 30px;
align-items: center;
}
#pantalla-juego, #pantalla-chat {
display: none;
flex-direction: column;
height: 100vh;
width: 100vw;
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
max-width: 1200px;
padding: 20px 30px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 16px;
backdrop-filter: blur(10px);
gap: 20px;
}
.logo-section {
display: flex;
align-items: center;
gap: 15px;
}
.logo-icon {
width: 50px;
height: 50px;
background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}
.logo-text {
display: flex;
flex-direction: column;
gap: 2px;
}
.logo-text h1 {
font-size: 32px;
font-weight: 800;
background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin: 0;
}
.logo-text p {
font-size: 12px;
color: var(--text-secondary);
margin: 0;
letter-spacing: 1px;
}
.controls-header {
display: flex;
gap: 15px;
align-items: center;
}
.search-box {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 50px;
padding: 10px 18px;
color: var(--text-primary);
width: 250px;
transition: all 0.3s ease;
font-size: 14px;
}
.search-box::placeholder {
color: var(--text-secondary);
}
.search-box:focus {
outline: none;
background: rgba(255, 255, 255, 0.08);
border-color: var(--accent-primary);
box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}
.theme-toggle {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 50%;
width: 44px;
height: 44px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 20px;
transition: all 0.3s ease;
}
.theme-toggle:hover {
background: rgba(255, 255, 255, 0.08);
border-color: var(--accent-primary);
transform: scale(1.05) rotate(20deg);
}
.stats-banner {
display: flex;
justify-content: space-around;
align-items: center;
width: 100%;
max-width: 1200px;
padding: 20px 30px;
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 16px;
backdrop-filter: blur(10px);
}
.stat-item {
text-align: center;
}
.stat-number {
font-size: 28px;
font-weight: 700;
background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.stat-label {
font-size: 12px;
color: var(--text-secondary);
margin-top: 5px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.section-header {
width: 100%;
max-width: 1200px;
display: flex;
justify-content: space-between;
align-items: center;
}
.section-title {
font-size: 20px;
font-weight: 700;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 10px;
}
.section-title::before {
content: '';
width: 4px;
height: 24px;
background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
border-radius: 2px;
}
.games-container {
width: 100%;
max-width: 1200px;
}
.games-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 20px;
width: 100%;
}
.game-card {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 16px;
overflow: hidden;
cursor: pointer;
aspect-ratio: 1;
position: relative;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 16px;
background-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 70%);
backdrop-filter: blur(10px);
}
.game-card:hover {
transform: translateY(-8px);
border-color: var(--accent-primary);
box-shadow: 0 20px 40px rgba(124, 58, 237, 0.2);
background: rgba(124, 58, 237, 0.05);
}
.game-card-content {
position: relative;
z-index: 2;
}
.game-name {
font-size: 15px;
font-weight: 700;
color: var(--text-primary);
line-height: 1.3;
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.game-meta {
font-size: 11px;
color: var(--accent-tertiary);
margin-top: 6px;
display: flex;
align-items: center;
gap: 4px;
text-transform: uppercase;
letter-spacing: 0.5px;
font-weight: 600;
}
.like-button {
position: absolute;
top: 12px;
right: 12px;
width: 40px;
height: 40px;
background: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(8px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 18px;
transition: all 0.3s ease;
z-index: 3;
}
.like-button:hover {
background: rgba(0, 0, 0, 0.5);
transform: scale(1.15);
border-color: var(--accent-secondary);
}
.like-button.liked {
color: var(--accent-secondary);
}
.actions-container {
display: flex;
gap: 15px;
width: 100%;
max-width: 1200px;
flex-wrap: wrap;
justify-content: center;
}
.btn {
padding: 14px 32px;
border: none;
border-radius: 50px;
font-weight: 600;
font-size: 15px;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 8px;
text-decoration: none;
}
.btn-primary {
background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
color: white;
box-shadow: 0 10px 25px rgba(124, 58, 237, 0.3);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 15px 35px rgba(124, 58, 237, 0.4);
}
.btn-classroom {
background: #137333;
color: white;
box-shadow: 0 10px 25px rgba(19, 115, 51, 0.3);
}
.btn-classroom:hover {
background: #0f5b28;
transform: translateY(-2px);
box-shadow: 0 15px 35px rgba(19, 115, 51, 0.4);
}
.toolbar {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
height: 70px;
padding: 0 25px;
background: rgba(255, 255, 255, 0.02);
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
backdrop-filter: blur(10px);
}
.toolbar-left, .toolbar-right {
display: flex;
align-items: center;
gap: 15px;
}
.toolbar-title {
font-size: 18px;
font-weight: 700;
color: var(--text-primary);
}
.btn-toolbar {
padding: 10px 20px;
border: none;
border-radius: 8px;
font-weight: 600;
font-size: 14px;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 6px;
}
.btn-back {
background: var(--danger);
color: white;
}
.btn-back:hover {
background: #dc2626;
transform: translateX(-2px);
}
.btn-share {
background: var(--accent-primary);
color: white;
}
.btn-share:hover {
background: #6d28d9;
transform: translateX(2px);
}
.iframe-container {
flex: 1;
width: 100%;
background: var(--bg-primary);
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: none;
display: block;
}
.toast {
position: fixed;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
color: white;
padding: 16px 28px;
border-radius: 12px;
box-shadow: 0 10px 35px rgba(16, 185, 129, 0.3);
font-size: 15px;
font-weight: 600;
animation: slideUp 0.4s ease-out, slideDown 0.4s ease-in 2.6s forwards;
z-index: 9999;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateX(-50%) translateY(20px);
}
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}
@keyframes slideDown {
to {
opacity: 0;
transform: translateX(-50%) translateY(20px);
}
}
.panic-note {
font-size: 12px;
color: var(--text-secondary);
text-align: center;
margin-top: 30px;
letter-spacing: 1px;
opacity: 0.7;
}
@media (max-width: 768px) {
.header {
flex-direction: column;
padding: 15px 20px;
}
.search-box {
width: 100%;
}
.games-grid {
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
gap: 15px;
}
.game-name {
font-size: 13px;
}
.section-title {
font-size: 18px;
}
.actions-container {
gap: 10px;
}
.btn {
padding: 12px 24px;
font-size: 14px;
}
#pantalla-menu {
padding: 15px;
gap: 20px;
}
.stats-banner {
padding: 15px 20px;
}
}
@media (max-width: 480px) {
.logo-text h1 {
font-size: 24px;
}
.search-box {
width: 100%;
font-size: 13px;
}
.games-grid {
grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
gap: 12px;
}
.game-name {
font-size: 12px;
}
.game-meta {
font-size: 10px;
}
.actions-container {
flex-direction: column;
}
.btn {
width: 100%;
justify-content: center;
}
}
</style>
<script>
const TARGET_URL = "https://classroom.google.com/c/NzMwNTEyNjQ0MTY1/a/ODU2MjMwODQ1MzYw/details";
const URL_CHAT = "https://organizations.minnit.chat/435303691368009/Main";
const GAMES = [
{ id: 'retro', name: 'Retro Bowl' },
{ id: 'slope', name: 'Slope' },
{ id: 'tetris', name: 'Tetris' },
{ id: 'dino', name: 'Chrome Dino' },
{ id: 'tentrix', name: 'Tentrix' },
{ id: 'pacman', name: 'Pac-Man' },
{ id: 'tapgoal', name: 'Tap Goal' },
{ id: 'basket', name: 'Basket Random' },
{ id: 'moregames', name: 'More Games' },
{ id: 'lec6x', name: 'Lección 6x' },
{ id: 'lecgoogle', name: 'Lección Google' },
{ id: 'poki', name: 'Poki' },
{ id: '1001juegos', name: '1001 Juegos' },
{ id: 'glacier', name: 'Glacier' },
{ id: 'xbox', name: 'Xbox Cloud' },
{ id: 'geforce', name: 'GeForce Now' }
];
function inicializarTema() {
const temaSaved = localStorage.getItem('classroom-theme');
if (temaSaved === 'light') {
document.body.classList.add('light-mode');
document.querySelector('.theme-toggle').textContent = '☀️';
} else {
document.querySelector('.theme-toggle').textContent = '🌙';
}
}
function cambiarTema() {
document.body.classList.toggle('light-mode');
const isLight = document.body.classList.contains('light-mode');
localStorage.setItem('classroom-theme', isLight ? 'light' : 'dark');
document.querySelector('.theme-toggle').textContent = isLight ? '☀️' : '🌙';
}
function abrirJuego(url, requiereNuevaPestana = false) {
if (requiereNuevaPestana) {
window.open(url, '_blank');
} else {
const gameCard = event.currentTarget;
const gameName = gameCard.querySelector('.game-name')?.textContent || 'Juego';
document.getElementById('game-title').textContent = gameName;
document.getElementById('pantalla-menu').style.display = 'none';
document.getElementById('pantalla-juego').style.display = 'flex';
document.getElementById('iframe-juego').src = url;
}
}
function abrirChat() {
document.getElementById('pantalla-menu').style.display = 'none';
document.getElementById('pantalla-chat').style.display = 'flex';
document.getElementById('iframe-chat').src = URL_CHAT;
}
function volverAlMenu(pantallaActual) {
document.getElementById(pantallaActual).style.display = 'none';
document.getElementById('pantalla-menu').style.display = 'flex';
document.getElementById('iframe-juego').src = '';
document.getElementById('iframe-chat').src = '';
}
function mostrarToast(mensaje) {
const toast = document.createElement('div');
toast.className = 'toast';
toast.textContent = mensaje;
document.body.appendChild(toast);
setTimeout(() => toast.remove(), 3000);
}
function toggleLike(event) {
const button = event.target.closest('.like-button');
const idJuego = button.getAttribute('data-id');
const isLiked = localStorage.getItem('like_juego_' + idJuego) === 'true';
if (isLiked) {
localStorage.removeItem('like_juego_' + idJuego);
button.innerHTML = '🤍';
button.classList.remove('liked');
} else {
localStorage.setItem('like_juego_' + idJuego, 'true');
button.innerHTML = '❤️';
button.classList.add('liked');
}
actualizarContadorFavoritos();
}
function inicializarLikes() {
document.querySelectorAll('.like-button').forEach(button => {
const idJuego = button.getAttribute('data-id');
if (localStorage.getItem('like_juego_' + idJuego) === 'true') {
button.innerHTML = '❤️';
button.classList.add('liked');
}
});
actualizarContadorFavoritos();
}
function actualizarContadorFavoritos() {
let count = 0;
GAMES.forEach(game => {
if (localStorage.getItem('like_juego_' + game.id) === 'true') {
count++;
}
});
document.getElementById('favorites-count').textContent = count;
}
function compartirWeb() {
const url = window.location.href;
if (navigator.share) {
navigator.share({
title: 'Classroom - Gaming Platform',
text: '¡Descubre nuestra plataforma de juegos!',
url: url
}).catch(() => {
copiarAlPortapapeles(url);
});
} else {
copiarAlPortapapeles(url);
}
}
function copiarAlPortapapeles(texto) {
navigator.clipboard.writeText(texto).then(() => {
mostrarToast('✓ Enlace copiado al portapapeles');
}).catch(() => {
mostrarToast('✗ No se pudo copiar el enlace');
});
}
document.getElementById('search-input').addEventListener('input', function(e) {
const termino = e.target.value.toLowerCase();
const cards = document.querySelectorAll('.game-card');
let visible = 0;
cards.forEach(card => {
const nombre = card.querySelector('.game-name').textContent.toLowerCase();
if (nombre.includes(termino)) {
card.style.display = '';
visible++;
} else {
card.style.display = 'none';
}
});
if (visible === 0 && termino.length > 0) {
mostrarToast('No se encontraron resultados');
}
});
// Control de teclado para redirigir directamente
window.addEventListener('keydown', function(e) {
// Ignorar si se está escribiendo dentro de un campo de texto
if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') {
return;
}
if (e.key === '0' || e.code === 'Digit0' || e.code === 'Numpad0') {
try {
window.top.location.href = TARGET_URL;
} catch (err) {
window.location.href = TARGET_URL;
}
}
}, true);
// Inicializaciones al cargar la página
inicializarTema();
inicializarLikes();
</script>
Classroom
Gaming Platform