:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #ff6b6b;
  --text-color: #333;
  --bg-color: #fff;
  --bg-secondary: #f8f9fa;
  --card-bg: #fff;
  --navbar-bg: rgba(102, 126, 234, 0.1);
  --navbar-bg-scroll: rgba(102, 126, 234, 0.2);
  --footer-bg: #2c3e50;
}

[data-theme="dark"] {
  --text-color: #e0e0e0;
  --bg-color: #121212;
  --bg-secondary: #1e1e1e;
  --card-bg: #2d2d2d;
  --navbar-bg: rgba(45, 45, 45, 0.9);
  --navbar-bg-scroll: rgba(45, 45, 45, 0.95);
  --footer-bg: #1a1a1a;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content { flex: 1; }

/* =========================
   Navbar (shared)
   ========================= */
.navbar {
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
  transition: all 0.3s ease !important;
}
.navbar.scrolled {
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: white !important;
}

.nav-link { font-weight: 500; }
.nav-link:hover, .nav-link.active { color: var(--primary-color) !important; }

/* Theme Toggle (shared) */
.theme-toggle {
  background: none;
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  border-radius: 50px;
  padding: 8px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}
.theme-toggle:hover { background: rgba(255,255,255,0.1); transform: scale(1.05); }

/* Dropdowns (shared) */
.dropdown-menu {
  background-color: var(--card-bg);
  border: 1px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .dropdown-menu { border-color: rgba(255, 255, 255, 0.1); }
.dropdown-item { color: var(--text-color); transition: all 0.3s ease; }
.dropdown-item:hover { background-color: var(--bg-secondary); color: var(--primary-color); }

/* =========================
   Footer (shared)
   ========================= */
.footer {
  background-color: var(--footer-bg);
  color: white;
  padding: 40px 0;
  text-align: center;
}
.social-links { margin-bottom: 20px; }
.social-link {
  color: white;
  font-size: 1.5rem;
  margin: 0 15px;
  transition: all 0.3s ease;
}
.social-link:hover { color: var(--accent-color); transform: translateY(-3px); }

/* =========================
   Index page sections
   ========================= */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero-content { text-align: center; }
.hero-title { font-size: 3.5rem; font-weight: 700; margin-bottom: 1rem; animation: fadeInUp 1s ease-out; }
.hero-subtitle { font-size: 1.5rem; font-weight: 300; margin-bottom: 2rem; animation: fadeInUp 1s ease-out 0.2s both; }
.hero-description { font-size: 1.1rem; margin-bottom: 2rem; animation: fadeInUp 1s ease-out 0.4s both; }
.btn-custom {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border: none; padding: 12px 30px; border-radius: 50px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s ease; animation: fadeInUp 1s ease-out 0.6s both;
}
.btn-custom:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.2); }

.section-title { font-size: 2.5rem; font-weight: 600; margin-bottom: 3rem; text-align: center; position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 80px; height: 3px; background: linear-gradient(45deg, #667eea, #764ba2); border-radius: 2px; }

.about-section { padding: 100px 0; background-color: var(--bg-secondary); }
.projects-section { padding: 100px 0; background-color: var(--bg-color); }
.project-card { background: var(--card-bg); border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); transition: all 0.3s ease; margin-bottom: 30px; }
[data-theme="dark"] .project-card { box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.project-card:hover { transform: translateY(-10px); box-shadow: 0 20px 50px rgba(0,0,0,0.15); }
.project-image { height: 200px; background: linear-gradient(45deg, #667eea, #764ba2); display: flex; align-items: center; justify-content: center; color: white; font-size: 3rem; }
.project-content { padding: 30px; }
.project-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 15px; }
.project-description { color: #666; margin-bottom: 20px; }
.project-tech { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.tech-badge { background: linear-gradient(45deg, #667eea, #764ba2); color: white; padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }

.contact-section { padding: 100px 0; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.contact-info { text-align: center; }
.contact-item { margin-bottom: 30px; }
.contact-icon { font-size: 2rem; margin-bottom: 15px; color: #ff6b6b; }
.bitcoin-section { background: rgba(255, 255, 255, 0.1); border-radius: 15px; padding: 30px; margin-top: 40px; backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); }
.bitcoin-icon { font-size: 2.5rem; color: #f7931a; margin-bottom: 15px; }
.bitcoin-address { background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 10px; padding: 15px; font-family: 'Courier New', monospace; font-size: 0.9rem; word-break: break-all; margin: 15px 0; position: relative; }
.copy-btn { background: linear-gradient(45deg, #f7931a, #ff6b6b); border: none; color: white; padding: 8px 20px; border-radius: 20px; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; margin-left: 10px; }
.copy-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(247, 147, 26, 0.3); }
.copy-feedback { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); background: #4CAF50; color: white; padding: 5px 10px; border-radius: 5px; font-size: 0.8rem; opacity: 0; transition: opacity 0.3s ease; }

/* Tools redirect section shown on index */
.tools-redirect-section { padding: 80px 0; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); position: relative; overflow: hidden; }
.tools-redirect-section::before { content: ''; position: absolute; inset: 0; background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>'); opacity: 0.3; }
.tools-redirect-section .container { position: relative; z-index: 2; }
.tools-redirect-title { color: white; font-size: 3rem; font-weight: 700; margin-bottom: 20px; }
.tools-redirect-description { color: rgba(255,255,255,0.9); font-size: 1.3rem; line-height: 1.6; margin-bottom: 30px; }
.tools-redirect-button { background: rgba(255,255,255,0.2); color: white; border: 2px solid rgba(255,255,255,0.3); padding: 15px 40px; border-radius: 50px; font-weight: 600; font-size: 1.1rem; text-decoration: none; transition: all 0.3s ease; display: inline-block; }
.tools-redirect-button:hover { background: rgba(255,255,255,0.3); color: white; transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.tools-redirect-icon { font-size: 8rem; color: rgba(255,255,255,0.3); animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-20px); } }

/* GitHub stats (index) */
.github-stat-item { text-align: center; padding: 15px; }
.github-stat-number { font-size: 2rem; font-weight: 700; color: var(--primary-color); display: block; }
.github-stat-label { font-size: 0.9rem; color: var(--text-color); opacity: 0.7; }
.api-notice { animation: fadeIn 0.5s ease-in; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Index responsive */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px);} to { opacity: 1; transform: translateY(0);} }
@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1.2rem; }
  .section-title { font-size: 2rem; }
}

/* =========================
   Games listing page
   ========================= */
.page-header { padding: 110px 0 30px; text-align:center; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: #fff; }
.page-header h1 { font-weight: 700; color: #fff; }
.page-header p { opacity: .9; color: #fff; }
.game-card { background: var(--card-bg); border-radius: 14px; overflow: hidden; border: 1px solid rgba(0,0,0,0.06); transition: transform .2s ease, box-shadow .2s ease; height: 100%; box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
[data-theme="dark"] .game-card { border-color: rgba(255,255,255,0.08); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.game-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
.thumb { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); border-bottom: 1px solid rgba(0,0,0,0.06); }
[data-theme="dark"] .thumb { border-bottom-color: rgba(255,255,255,0.08); }
.thumb svg { width: 65%; height: auto; }
.game-body { padding: 18px; }
.game-title { font-size: 1.2rem; font-weight: 600; margin: 0 0 6px; }
.game-desc { opacity: 0.8; font-size: .95rem; min-height: 44px; }
.btn-play { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); color: #fff; font-weight: 600; border: none; }
.btn-play:hover { filter: brightness(1.05); transform: translateY(-1px); }
.badge-keys { font-size: .75rem; background: rgba(102,126,234,0.12); color: #637bdf; border: 1px solid rgba(102,126,234,0.25); border-radius: 999px; padding: 4px 10px; }
[data-theme="dark"] .badge-keys { background: rgba(255,255,255,0.08); color: #c9d1f0; border-color: rgba(255,255,255,0.12); }


/* =========================
   Tools page
   ========================= */
.tools-section { padding: 80px 0; background: var(--bg-color); position: relative; }
.tool-card { background: var(--card-bg); border-radius: 20px; padding: 40px; margin-bottom: 30px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); transition: all 0.4s ease; height: 100%; border: 1px solid rgba(102, 126, 234, 0.1); animation: fadeInUp 0.6s ease forwards; }
[data-theme="dark"] .tool-card { background: rgba(255, 255, 255, 0.05); box-shadow: 0 15px 35px rgba(0,0,0,0.3); border: 1px solid rgba(255, 255, 255, 0.1); }
.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }
.tool-card:nth-child(7) { animation-delay: 0.7s; }
.tool-card:nth-child(8) { animation-delay: 0.8s; }
.tool-card:nth-child(9) { animation-delay: 0.9s; }
.tool-card:nth-child(10) { animation-delay: 1.0s; }
.tool-card:nth-child(11) { animation-delay: 1.1s; }
.tool-card:nth-child(12) { animation-delay: 1.2s; }
.tool-header { display: flex; align-items: center; margin-bottom: 25px; }
.tool-icon { font-size: 3rem; margin-right: 20px; color: var(--primary-color); background: linear-gradient(45deg, var(--primary-color), #ff6b6b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.tool-title { font-size: 1.8rem; font-weight: 600; color: var(--text-color); margin: 0; }
.tool-description { color: var(--text-color); opacity: 0.8; margin-bottom: 30px; font-size: 1.1rem; line-height: 1.6; }
.tool-content { margin-top: 20px; }
.tool-input, .tool-textarea { width: 100%; padding: 15px; border: 2px solid var(--primary-color); border-radius: 12px; font-family: 'Poppins', sans-serif; font-size: 1rem; background: var(--card-bg); color: var(--text-color); margin-bottom: 20px; transition: all 0.3s ease; }
.tool-textarea { resize: vertical; min-height: 150px; }
.tool-input:focus, .tool-textarea:focus { outline: none; border-color: #ff6b6b; box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1); transform: translateY(-2px); }
[data-theme="dark"] .tool-input, [data-theme="dark"] .tool-textarea { background: rgba(255, 255, 255, 0.1); border-color: rgba(102, 126, 234, 0.5); }
.tool-button { background: linear-gradient(45deg, var(--primary-color), #ff6b6b); color: white; border: none; padding: 15px 30px; border-radius: 30px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; margin-right: 15px; margin-bottom: 15px; font-size: 1rem; }
.tool-button:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3); }
.tool-button.secondary { background: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.tool-button.secondary:hover { background: var(--primary-color); color: white; }
.tool-output { background: rgba(102, 126, 234, 0.1); border: 2px solid rgba(102, 126, 234, 0.3); border-radius: 12px; padding: 20px; margin-top: 20px; font-family: 'Courier New', monospace; word-break: break-all; max-height: 250px; overflow-y: auto; font-size: 0.95rem; }
.tool-file-input { display: none; }
.tool-file-label { display: inline-block; background: var(--primary-color); color: white; padding: 15px 30px; border-radius: 30px; cursor: pointer; transition: all 0.3s ease; margin-bottom: 20px; font-weight: 600; }
.tool-file-label:hover { background: #ff6b6b; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3); }
.qr-code-canvas { margin-top: 20px; border: 3px solid var(--primary-color); border-radius: 12px; max-width: 100%; }
.lorem-controls { display: flex; gap: 20px; margin-bottom: 25px; flex-wrap: wrap; }
.lorem-control { display: flex; flex-direction: column; min-width: 140px; }
.lorem-control label { font-weight: 600; margin-bottom: 8px; color: var(--text-color); }
.lorem-control input, .lorem-control select { padding: 12px; border: 2px solid var(--primary-color); border-radius: 8px; background: var(--card-bg); color: var(--text-color); font-family: 'Poppins', sans-serif; }
.color-input-group { display: flex; gap: 15px; margin-bottom: 20px; align-items: center; }
.color-picker { width: 60px; height: 50px; border: 2px solid var(--primary-color); border-radius: 8px; cursor: pointer; }
.color-palette { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 15px; margin-top: 20px; }
.color-swatch { aspect-ratio: 1; border-radius: 8px; cursor: pointer; position: relative; border: 2px solid rgba(255,255,255,0.2); transition: transform 0.2s ease; }
.color-swatch:hover { transform: scale(1.05); }
.color-swatch::after { content: attr(data-color); position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%); font-size: 0.8rem; color: var(--text-color); }
.color-formats { margin-top: 20px; display: grid; gap: 10px; }
.color-format { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: rgba(102, 126, 234, 0.1); border-radius: 8px; }
.hash-options { display: flex; gap: 20px; margin: 15px 0; flex-wrap: wrap; }
.hash-options label { display: flex; align-items: center; gap: 8px; color: var(--text-color); cursor: pointer; }
.password-controls { margin-bottom: 20px; }
.password-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 20px 0; }
.password-options label { display: flex; align-items: center; gap: 8px; color: var(--text-color); cursor: pointer; }
.password-strength { margin-top: 15px; padding: 10px; text-align: center; border-radius: 8px; font-weight: 600; }
.strength-weak { background: #ffebee; color: #c62828; }
.strength-medium { background: #fff3e0; color: #ef6c00; }
.strength-strong { background: #e8f5e8; color: #2e7d32; }
.uuid-controls { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.unit-controls { margin-bottom: 20px; }
.conversion-row { display: grid; grid-template-columns: 1fr 1fr auto 1fr 1fr; gap: 15px; align-items: center; margin-bottom: 20px; }
.conversion-arrow { font-size: 1.5rem; color: var(--primary-color); font-weight: bold; }
.conversion-status { padding: 15px; border-radius: 10px; margin-top: 15px; font-weight: 600; }
.conversion-status.success { background: rgba(76, 175, 80, 0.1); border: 2px solid rgba(76, 175, 80, 0.3); color: #4CAF50; }
.conversion-status.error { background: rgba(244, 67, 54, 0.1); border: 2px solid rgba(244, 67, 54, 0.3); color: #F44336; }
@media (max-width: 768px) {
  .conversion-row { grid-template-columns: 1fr; gap: 10px; }
  .conversion-arrow { transform: rotate(90deg); }
  .color-input-group { flex-direction: column; align-items: stretch; }
}

/* Matrix overlay (tools) */
#matrix-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 10000; display: none; }
#matrix-canvas { display: block; }
#matrix-close { position: absolute; top: 20px; right: 30px; color: #0f0; font-size: 2rem; cursor: pointer; z-index: 10001; text-shadow: 0 0 10px #0f0; }

/* =========================
   Game pages (scoped)
   ========================= */

/* ---- Pong ---- */
body.page-pong {
  font-family: 'Orbitron', monospace;
  background: linear-gradient(135deg, #0a0a0f, #000033);
  color: #00ffff;
  --footer-h: 80px;
  margin: 0; padding: 0;
  min-height: 100vh; /* fallback */
  min-height: 100dvh; /* avoid mobile 100vh issues */
  height: auto;
  overflow-x: hidden; /* allow vertical scroll when needed */
  overflow-y: auto;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex; flex-direction: column;
}
.page-pong .game-container { flex: 1 1 auto; min-height: 0; display: flex; justify-content: center; align-items: center; position: relative; padding: 20px; padding-bottom: calc(20px + var(--footer-h, 80px) + env(safe-area-inset-bottom)); }
.page-pong #gameCanvas { border: 3px solid #00ffff; border-radius: 15px; box-shadow: 0 0 30px #00ffff, inset 0 0 30px rgba(0,255,255,0.1); background: rgba(0,0,0,0.8); }
.page-pong .game-header { background: rgba(0, 0, 0, 0.9); padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #00ffff; backdrop-filter: blur(10px); }
.page-pong .game-title { font-size: 2rem; font-weight: 900; background: linear-gradient(45deg, #00ffff, #8b00ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-shadow: 0 0 20px #00ffff; }
.page-pong .game-stats { display: flex; gap: 30px; font-size: 1.5rem; font-weight: 700; }
.page-pong .stat-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.page-pong .stat-label { font-size: 0.8rem; opacity: 0.8; color: #ff6600; }
.page-pong .stat-value { color: #ffff00; text-shadow: 0 0 15px #ffff00; font-size: 2rem; }
.page-pong .menu-overlay { position: absolute; inset: 0; bottom: var(--footer-h, 80px); background: rgba(0,0,0,0.95); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 100; }
.page-pong .menu-title { font-size: 4rem; font-weight: 900; margin-bottom: 2rem; background: linear-gradient(45deg, #00ffff, #8b00ff, #ffff00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: pong-glow 2s ease-in-out infinite alternate; }
@keyframes pong-glow { from { filter: drop-shadow(0 0 5px #00ffff);} to { filter: drop-shadow(0 0 20px #8b00ff);} }
.page-pong .btn-neon { background: transparent; border: 2px solid #00ffff; color: #00ffff; padding: 15px 40px; font-size: 1.2rem; font-weight: 700; font-family: 'Orbitron', monospace; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 2px; margin: 10px; }
.page-pong .btn-neon:hover { color: #0a0a0f; background: #00ffff; box-shadow: 0 0 30px #00ffff; transform: scale(1.05); }
.page-pong .btn-neon: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: all 0.5s; }
.page-pong .btn-neon:hover:before { left: 100%; }
.page-pong .controls-info { position: absolute; bottom: calc(20px + var(--footer-h, 80px) + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); padding: 15px 25px; border-radius: 10px; border: 1px solid #00ffff; font-size: 0.9rem; opacity: 0.8; text-align: center; }
.page-pong .pause-overlay { position: absolute; inset: 0; bottom: var(--footer-h, 80px); background: rgba(0,0,0,0.8); display: none; justify-content: center; align-items: center; z-index: 50; }
.page-pong .pause-content { text-align: center; background: rgba(0,0,0,0.9); padding: 40px; border-radius: 15px; border: 2px solid #00ffff; }
.page-pong .game-over-overlay { position: absolute; inset: 0; bottom: var(--footer-h, 80px); background: rgba(0,0,0,0.95); display: none; justify-content: center; align-items: center; z-index: 200; }
.page-pong .game-over-content { text-align: center; background: rgba(0,0,0,0.9); padding: 50px; border-radius: 20px; border: 3px solid #ffff00; box-shadow: 0 0 50px #ffff00; }
.page-pong .winner-text { font-size: 3rem; font-weight: 900; margin-bottom: 20px; background: linear-gradient(45deg, #ffff00, #00ffff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.page-pong .game-footer { background: rgba(0,0,0,0.8); padding: 15px 30px calc(15px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: center; border-top: 2px solid #00ffff; backdrop-filter: blur(10px); position: fixed; left: 0; right: 0; bottom: 0; width: 100%; z-index: 9999; }
.page-pong .home-button { background: transparent; border: 2px solid #00ffff; color: #00ffff; padding: 10px 15px; border-radius: 50px; text-decoration: none; font-size: 1.2rem; transition: all 0.3s ease; display: flex; align-items: center; gap: 10px; backdrop-filter: blur(10px); }
.page-pong .home-button:hover { background: #00ffff; color: #0a0a0f; box-shadow: 0 0 25px #00ffff; text-decoration: none; }
.page-pong .language-selector { z-index: 9999; }
.page-pong .dropdown-menu { background: rgba(0,0,0,0.9); border: 2px solid #00ffff; border-radius: 10px; }
.page-pong .dropdown-item { color: #00ffff; transition: all 0.3s ease; }
.page-pong .dropdown-item:hover { background: #00ffff; color: #0a0a0f; }
.page-pong .dropdown-toggle { background: transparent; border: 2px solid #00ffff; color: #00ffff; transition: all 0.3s ease; }
.page-pong .dropdown-toggle:hover, .page-pong .dropdown-toggle:focus { background: #00ffff; color: #0a0a0f; border-color: #00ffff; }
.page-pong .music-toggle { background: transparent; border: 2px solid #00ffff; color: #00ffff; padding: 10px 15px; border-radius: 50px; font-size: 1.2rem; transition: all 0.3s ease; cursor: pointer; backdrop-filter: blur(10px); }
.page-pong .music-toggle:hover { background: #00ffff; color: #0a0a0f; box-shadow: 0 0 25px #00ffff; }
.page-pong .music-toggle.disabled { opacity: 0.5; border-color: #666; color: #666; }
.page-pong .music-toggle.disabled:hover { background: transparent; color: #666; box-shadow: none; }
@media (max-width: 768px) {
  .page-pong .game-title { font-size: 1.5rem; }
  .page-pong .game-stats { font-size: 1.2rem; gap: 20px; }
  .page-pong .menu-title { font-size: 2.5rem; }
  .page-pong .btn-neon { padding: 12px 30px; font-size: 1rem; }
  .page-pong .game-footer { padding: 10px 15px calc(10px + env(safe-area-inset-bottom)); flex-direction: column; gap: 15px; }
  .page-pong .home-button { padding: 8px 12px; font-size: 1rem; }
  .page-pong .dropdown-toggle { padding: 8px 12px; font-size: 1rem; }
}

/* ---- Breakout ---- */
/* Scope the reset to the page */
body.page-breakout * { margin: 0; padding: 0; box-sizing: border-box; }
body.page-breakout {
  font-family: 'Orbitron', monospace;
  background: linear-gradient(135deg, #0a0a0a, #050505);
  color: #ff6600;
  --footer-h: 80px;
  overflow-x: hidden; overflow-y: auto;
  min-height: 100vh; /* fallback */
  min-height: 100dvh;
  height: auto;
  display: flex; flex-direction: column;
}
.page-breakout .game-header { background: rgba(0,0,0,0.8); padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #ff6600; backdrop-filter: blur(10px); }
.page-breakout .game-title { font-size: 2rem; font-weight: 900; background: linear-gradient(45deg, #ff6600, #9933ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-shadow: 0 0 20px #ff6600; animation: breakout-glow 3s infinite; }
@keyframes breakout-glow { 0%,100%{ text-shadow:0 0 20px #ff6600;} 50%{ text-shadow:0 0 40px #ff6600,0 0 60px #9933ff; } }
.page-breakout .game-stats { display: flex; gap: 30px; font-size: 1.2rem; font-weight: 700; }
.page-breakout .stat-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.page-breakout .stat-label { font-size: 0.8rem; opacity: 0.8; }
.page-breakout .stat-value { color: #ffff00; text-shadow: 0 0 15px #ffff00; }
.page-breakout .game-container { flex: 1 1 auto; min-height: 0; display: flex; justify-content: center; align-items: center; position: relative; background: radial-gradient(circle at 20% 50%, rgba(255,102,0,0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(153,51,255,0.1) 0%, transparent 50%), radial-gradient(circle at 40% 80%, rgba(255,255,0,0.05) 0%, transparent 50%); padding: 20px; padding-bottom: calc(20px + var(--footer-h, 80px) + env(safe-area-inset-bottom)); }
.page-breakout #gameCanvas { border: 3px solid #ff6600; border-radius: 15px; box-shadow: 0 0 50px #ff6600, inset 0 0 50px rgba(255,102,0,0.1); background: rgba(0,0,0,0.3); backdrop-filter: blur(5px); }
.page-breakout .game-footer { background: rgba(0,0,0,0.8); padding: 15px 30px calc(15px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: center; border-top: 2px solid #ff6600; backdrop-filter: blur(10px); position: fixed; left: 0; right: 0; bottom: 0; width: 100%; z-index: 9999; }
.page-breakout .home-button { background: transparent; border: 2px solid #ff6600; color: #ff6600; padding: 10px 15px; border-radius: 50px; text-decoration: none; font-size: 1.2rem; transition: all 0.3s ease; display: flex; align-items: center; gap: 10px; backdrop-filter: blur(10px); }
.page-breakout .home-button:hover { background: #ff6600; color: #0a0a0a; box-shadow: 0 0 25px #ff6600; text-decoration: none; }
.page-breakout .btn-neon { background: transparent; border: 2px solid #ff6600; color: #ff6600; padding: 12px 30px; border-radius: 50px; font-size: 1.2rem; font-weight: 700; font-family: 'Orbitron', monospace; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 2px; margin: 10px; }
.page-breakout .btn-neon:hover { color: #0a0a0a; background: #ff6600; box-shadow: 0 0 30px #ff6600; transform: scale(1.05); }
.page-breakout .btn-neon: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: all 0.5s; }
.page-breakout .btn-neon:hover:before { left: 100%; }
.page-breakout .controls-info { position: absolute; bottom: calc(20px + var(--footer-h, 80px) + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); padding: 15px 25px; border-radius: 10px; border: 1px solid #ff6600; font-size: 0.9rem; opacity: 0.8; text-align: center; }
.page-breakout .pause-overlay, .page-breakout .menu-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.9); display: none; justify-content: center; align-items: center; flex-direction: column; z-index: 1000; backdrop-filter: blur(10px); bottom: var(--footer-h, 80px); }
.page-breakout .menu-title { font-size: 4rem; font-weight: 900; background: linear-gradient(45deg, #ff6600, #9933ff, #ffff00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-shadow: 0 0 30px #ff6600; margin-bottom: 30px; animation: pulse 2s infinite; }
.page-breakout .menu-description { font-size: 1.3rem; color: #ffff00; text-align: center; margin-bottom: 40px; max-width: 600px; line-height: 1.6; }
.page-breakout .language-selector { z-index: 9999; }
.page-breakout .dropdown-menu { background: rgba(0,0,0,0.9); border: 2px solid #ff6600; border-radius: 10px; }
.page-breakout .dropdown-item { color: #ff6600; transition: all 0.3s ease; }
.page-breakout .dropdown-item:hover { background: #ff6600; color: #0a0a0a; }
.page-breakout .dropdown-toggle { background: transparent; border: 2px solid #ff6600; color: #ff6600; transition: all 0.3s ease; }
.page-breakout .dropdown-toggle:hover, .page-breakout .dropdown-toggle:focus { background: #ff6600; color: #0a0a0a; border-color: #ff6600; }
.page-breakout .music-toggle { background: transparent; border: 2px solid #ff6600; color: #ff6600; padding: 10px 15px; border-radius: 50px; font-size: 1.2rem; transition: all 0.3s ease; cursor: pointer; backdrop-filter: blur(10px); }
.page-breakout .music-toggle:hover { background: #ff6600; color: #0a0a0a; box-shadow: 0 0 25px #ff6600; }
.page-breakout .music-toggle.disabled { opacity: 0.5; border-color: #666; color: #666; }
.page-breakout .music-toggle.disabled:hover { background: transparent; color: #666; box-shadow: none; }
@media (max-width: 768px) {
  .page-breakout .game-header { padding: 10px 15px; flex-direction: column; gap: 15px; }
  .page-breakout .game-footer { padding: 10px 15px calc(10px + env(safe-area-inset-bottom)); flex-direction: column; gap: 15px; }
  .page-breakout .game-title { font-size: 1.5rem; }
  .page-breakout .game-stats { gap: 20px; font-size: 1rem; }
  .page-breakout .menu-title { font-size: 2.5rem; }
  .page-breakout .menu-description { font-size: 1rem; padding: 0 20px; }
  .page-breakout #gameCanvas { max-width: 90vw; height: auto; }
  .page-breakout .home-button { padding: 8px 12px; font-size: 1rem; }
  .page-breakout .dropdown-toggle { padding: 8px 12px; font-size: 1rem; }
}

/* ---- Super Hexagon ---- */
body.page-hexagon {
  font-family: 'Orbitron', monospace;
  background: linear-gradient(135deg, #0a0a0f, #000033);
  color: #00ffff; margin: 0; padding: 0; --footer-h: 80px;
  min-height: 100vh; /* fallback */
  min-height: 100dvh; height: auto;
  overflow-x: hidden; overflow-y: auto;
  transition: background-color 0.3s ease, color 0.3s ease; display: flex; flex-direction: column;
}
.page-hexagon .game-container { flex: 1 1 auto; min-height: 0; display: flex; justify-content: center; align-items: center; position: relative; padding: 20px; padding-bottom: calc(20px + var(--footer-h, 80px) + env(safe-area-inset-bottom)); }
.page-hexagon #gameCanvas { border: 3px solid #00ffff; border-radius: 15px; box-shadow: 0 0 30px #00ffff, inset 0 0 30px rgba(0,255,255,0.1); background: rgba(0,0,0,0.8); }
.page-hexagon .game-header { background: rgba(0,0,0,0.9); padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #00ffff; backdrop-filter: blur(10px); }
.page-hexagon .game-title { font-size: 2rem; font-weight: 900; background: linear-gradient(45deg, #00ffff, #8b00ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-shadow: 0 0 20px #00ffff; animation: hexagon-glow 3s infinite; }
@keyframes hexagon-glow { 0%,100% { text-shadow: 0 0 20px #00ffff; } 50% { text-shadow: 0 0 40px #00ffff, 0 0 60px #8b00ff; } }
.page-hexagon .game-stats { display: flex; gap: 30px; font-size: 1.2rem; font-weight: 700; }
.page-hexagon .stat-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.page-hexagon .stat-label { font-size: 0.8rem; opacity: 0.8; }
.page-hexagon .stat-value { color: #ffff00; text-shadow: 0 0 15px #ffff00; }
.page-hexagon .game-footer { background: rgba(0,0,0,0.8); padding: 15px 30px calc(15px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: center; border-top: 2px solid #00ffff; backdrop-filter: blur(10px); position: fixed; left: 0; right: 0; bottom: 0; width: 100%; z-index: 9999; }
.page-hexagon .home-button { background: transparent; border: 2px solid #00ffff; color: #00ffff; padding: 10px 15px; border-radius: 50px; text-decoration: none; font-size: 1.2rem; transition: all 0.3s ease; display: flex; align-items: center; gap: 10px; backdrop-filter: blur(10px); }
.page-hexagon .home-button:hover { background: #00ffff; color: #0a0a0f; box-shadow: 0 0 25px #00ffff; text-decoration: none; }
.page-hexagon .language-selector { z-index: 9999; }
.page-hexagon .dropdown-menu { background: rgba(0,0,0,0.9); border: 2px solid #00ffff; border-radius: 10px; }
.page-hexagon .dropdown-item { color: #00ffff; transition: all 0.3s ease; }
.page-hexagon .dropdown-item:hover { background: #00ffff; color: #0a0a0f; }
.page-hexagon .dropdown-toggle { background: transparent; border: 2px solid #00ffff; color: #00ffff; transition: all 0.3s ease; }
.page-hexagon .dropdown-toggle:hover, .page-hexagon .dropdown-toggle:focus { background: #00ffff; color: #0a0a0f; border-color: #00ffff; }
.page-hexagon .music-toggle { background: transparent; border: 2px solid #00ffff; color: #00ffff; padding: 10px 15px; border-radius: 50px; font-size: 1.2rem; transition: all 0.3s ease; cursor: pointer; backdrop-filter: blur(10px); }
.page-hexagon .music-toggle:hover { background: #00ffff; color: #0a0a0f; box-shadow: 0 0 25px #00ffff; }
.page-hexagon .music-toggle.disabled { opacity: 0.5; border-color: #666; color: #666; }
.page-hexagon .music-toggle.disabled:hover { background: transparent; color: #666; box-shadow: none; }
.page-hexagon .btn-neon { background: transparent; border: 2px solid #00ffff; color: #00ffff; padding: 12px 30px; border-radius: 50px; font-size: 1.2rem; font-weight: 700; font-family: 'Orbitron', monospace; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 2px; margin: 10px; }
.page-hexagon .btn-neon:hover { color: #0a0a0f; background: #00ffff; box-shadow: 0 0 30px #00ffff; transform: scale(1.05); }
.page-hexagon .btn-neon: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: all 0.5s; }
.page-hexagon .btn-neon:hover:before { left: 100%; }
.page-hexagon .controls-info { position: absolute; bottom: calc(20px + var(--footer-h, 80px) + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); padding: 15px 25px; border-radius: 10px; border: 1px solid #00ffff; font-size: 0.9rem; opacity: 0.8; text-align: center; }
.page-hexagon .menu-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.9); display: flex; justify-content: center; align-items: center; flex-direction: column; z-index: 1000; backdrop-filter: blur(10px); bottom: var(--footer-h, 80px); }
.page-hexagon .menu-title { font-size: 4rem; font-weight: 900; background: linear-gradient(45deg, #00ffff, #8b00ff, #ffff00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-shadow: 0 0 30px #00ffff; margin-bottom: 30px; animation: pulse 2s infinite; }
.page-hexagon .menu-description { font-size: 1.3rem; color: #ffff00; text-align: center; margin-bottom: 40px; max-width: 600px; line-height: 1.6; }
.page-hexagon .difficulty-selection { margin: 30px 0; text-align: center; }
.page-hexagon .difficulty-title { font-size: 1.2rem; color: #ffff00; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
.page-hexagon .difficulty-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-bottom: 20px; }
.page-hexagon .difficulty-btn { padding: 10px 20px; font-size: 1rem; margin: 5px; min-width: 150px; position: relative; }
.page-hexagon .difficulty-btn.active { background: #00ffff; color: #0a0a0f; box-shadow: 0 0 25px #00ffff; }
.page-hexagon .difficulty-btn:hover:not(.active) { border-color: #ffff00; color: #ffff00; box-shadow: 0 0 15px #ffff00; }
.page-hexagon .start-btn { margin-top: 20px; font-size: 1.3rem; padding: 15px 40px; background: linear-gradient(45deg, #00ffff, #8b00ff); border: none; color: #0a0a0f; text-shadow: none; }
.page-hexagon .start-btn:hover { background: linear-gradient(45deg, #8b00ff, #00ffff); transform: scale(1.1); box-shadow: 0 0 40px #00ffff; }
@media (max-width: 768px) {
  .page-hexagon .game-header { padding: 10px 15px; flex-direction: column; gap: 15px; }
  .page-hexagon .game-title { font-size: 1.5rem; }
  .page-hexagon .game-stats { gap: 20px; font-size: 1rem; }
  .page-hexagon .menu-title { font-size: 2.5rem; }
  .page-hexagon .menu-description { font-size: 1rem; padding: 0 20px; }
  .page-hexagon .difficulty-buttons { flex-direction: column; align-items: center; }
  .page-hexagon .difficulty-btn { min-width: 200px; font-size: 0.9rem; }
  .page-hexagon .difficulty-title { font-size: 1rem; }
  .page-hexagon #gameCanvas { max-width: 90vw; height: auto; }
  .page-hexagon .game-footer { padding: 10px 15px calc(10px + env(safe-area-inset-bottom)); flex-direction: column; gap: 15px; }
  .page-hexagon .home-button { padding: 8px 12px; font-size: 1rem; }
  .page-hexagon .dropdown-toggle { padding: 8px 12px; font-size: 1rem; }
}

/* ---- Rhythm Hero ---- */
body.page-rhythm {
  font-family: 'Orbitron', monospace;
  background: linear-gradient(135deg, #0a0a0f, #000033);
  color: #00ffff; margin: 0; padding: 0; --footer-h: 80px;
  min-height: 100vh; /* fallback */
  min-height: 100dvh; height: auto;
  overflow-x: hidden; overflow-y: auto;
  display: flex; flex-direction: column;
}
.page-rhythm .game-header { background: rgba(0,0,0,0.8); padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #00ffff; backdrop-filter: blur(10px); }
.page-rhythm .game-title { font-size: 2rem; font-weight: 900; background: linear-gradient(45deg, #00ffff, #8b00ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-shadow: 0 0 20px #00ffff; }
.page-rhythm .game-stats { display: flex; gap: 30px; font-size: 1.2rem; font-weight: 700; }
.page-rhythm .stat-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.page-rhythm .stat-label { font-size: 0.8rem; opacity: 0.8; }
.page-rhythm .stat-value { color: #ffff00; text-shadow: 0 0 15px #ffff00; }
.page-rhythm .game-container { flex: 1 1 auto; min-height: 0; width: 100%; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: calc(20px + var(--footer-h, 80px) + env(safe-area-inset-bottom)); }
.page-rhythm #gameCanvas { background: radial-gradient(circle at center, rgba(0,255,255,0.1), transparent); border: 2px solid #00ffff; border-radius: 10px; box-shadow: 0 0 30px #00ffff; animation: canvasGlow 2s ease-in-out infinite alternate; }
@keyframes canvasGlow { from { box-shadow: 0 0 30px #00ffff; } to { box-shadow: 0 0 50px #00ffff, 0 0 80px rgba(0,255,255,0.3);} }
.page-rhythm .overlay { position: absolute; inset: 0; bottom: var(--footer-h, 80px); background: rgba(0,0,0,0.9); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(5px); }
.page-rhythm .overlay-content { background: linear-gradient(135deg, rgba(0,255,255,0.1), rgba(139,0,255,0.1)); border: 2px solid #00ffff; border-radius: 20px; padding: 2rem; text-align: center; box-shadow: 0 0 40px rgba(0,255,255,0.3); backdrop-filter: blur(10px); max-width: 500px; max-height: 80vh; margin: 1rem; overflow-y: auto; }
.page-rhythm .title-text { font-size: 2.5rem; font-weight: 900; color: #00ffff; text-shadow: 0 0 20px #00ffff; margin-bottom: 1.5rem; animation: titlePulse 2s ease-in-out infinite alternate; }
@keyframes titlePulse { from { text-shadow: 0 0 20px #00ffff; } to { text-shadow: 0 0 30px #00ffff, 0 0 40px #00ffff; } }
.page-rhythm .subtitle-text { font-size: 1rem; color: #ffff00; margin-bottom: 1.5rem; opacity: 0.9; }
.page-rhythm .upload-area { border: 3px dashed #8b00ff; border-radius: 15px; padding: 2rem; margin: 1.5rem 0; background: linear-gradient(45deg, rgba(139,0,255,0.1), rgba(255,0,127,0.1)); transition: all 0.3s ease; cursor: pointer; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.page-rhythm .upload-area:hover { border-color: #ff007f; background: linear-gradient(45deg, rgba(255,0,127,0.2), rgba(139,0,255,0.2)); transform: scale(1.02); }
.page-rhythm .upload-area.dragover { border-color: #00ff88; background: linear-gradient(45deg, rgba(0,255,136,0.2), rgba(0,255,255,0.2)); }
.page-rhythm .upload-icon { font-size: 4rem; color: #8b00ff; margin-bottom: 1rem; }
.page-rhythm .upload-text { font-size: 1.3rem; color: #8b00ff; font-weight: 600; }
.page-rhythm .upload-subtext { font-size: 0.9rem; color: rgba(139,0,255,0.7); margin-top: 0.5rem; }
.page-rhythm .btn-cyber { background: linear-gradient(45deg, #00ffff, #8b00ff); color: white; border: none; padding: 1rem 2rem; border-radius: 50px; font-weight: 700; font-size: 1.1rem; margin: 0.5rem; transition: all 0.3s ease; box-shadow: 0 0 20px rgba(0,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; }
.page-rhythm .btn-cyber:hover { transform: translateY(-3px); box-shadow: 0 5px 30px rgba(0,255,255,0.5); background: linear-gradient(45deg, #8b00ff, #ff007f); }
.page-rhythm .btn-cyber:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.page-rhythm #gameUI { position: absolute; top: 20px; left: 20px; right: 20px; display: block; z-index: 10; }
.page-rhythm .game-info { display: none; }
.page-rhythm .score-display { font-size: 1.5rem; font-weight: bold; color: #ffff00; text-shadow: 0 0 10px #ffff00; }
.page-rhythm .combo-display { font-size: 1.2rem; color: #ff6600; text-shadow: 0 0 10px #ff6600; }
.page-rhythm .fever-indicator { font-size: 1.8rem; color: #ff007f; text-shadow: 0 0 15px #ff007f; animation: pulse 0.5s ease-in-out infinite alternate; display: none; }
@keyframes pulse { from { transform: scale(1);} to { transform: scale(1.1);} }
.page-rhythm .settings-panel { position: absolute; top: 20px; right: 20px; background: rgba(0,0,0,0.8); border: 1px solid #8b00ff; border-radius: 10px; padding: 15px; display: none; z-index: 50; }
.page-rhythm .setting-item { margin: 10px 0; display: flex; align-items: center; justify-content: space-between; }
.page-rhythm .setting-item label { color: #00ffff; margin-right: 10px; }
.page-rhythm .setting-item input[type="range"] { width: 100px; }
.page-rhythm .high-scores { max-height: 200px; overflow-y: auto; margin-top: 20px; }
.page-rhythm .score-entry { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid rgba(0,255,255,0.3); }
.page-rhythm .controls-hint { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.7); border: 1px solid #00ff88; border-radius: 10px; padding: 10px 20px; display: none; }
.page-rhythm .key-indicator { display: inline-block; width: 30px; height: 30px; margin: 0 5px; background: rgba(255,255,255,0.1); border: 2px solid #00ffff; border-radius: 5px; text-align: center; line-height: 26px; transition: all 0.1s ease; }
.page-rhythm .key-indicator.active { background: #00ffff; color: #000; box-shadow: 0 0 20px #00ffff; }
.page-rhythm .progress-container { position: absolute; bottom: calc(20px + var(--footer-h, 80px) + env(safe-area-inset-bottom)); left: 20px; right: 20px; z-index: 50; }
.page-rhythm .progress-bar { height: 8px; background: rgba(0,0,0,0.8); border-radius: 10px; overflow: hidden; border: 1px solid #00ffff; }
.page-rhythm .progress-fill { height: 100%; background: linear-gradient(90deg, #00ffff, #8b00ff); border-radius: 10px; transition: width 0.1s ease; box-shadow: 0 0 10px #00ffff; }
.page-rhythm .loading-spinner { width: 60px; height: 60px; border: 4px solid rgba(0,255,255,0.3); border-top: 4px solid #00ffff; border-radius: 50%; animation: spin 1s linear infinite; margin: 2rem auto; }
@keyframes spin { 0% { transform: rotate(0deg);} 100% { transform: rotate(360deg);} }
.page-rhythm .processing-text { color: #00ffff; font-size: 1.2rem; margin-top: 1rem; animation: pulse 1.5s ease-in-out infinite; }
.page-rhythm #fileInput { display: none; }
.page-rhythm .difficulty-selector { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin: 1rem 0; }
.page-rhythm .difficulty-btn { background: linear-gradient(45deg, rgba(0,255,255,0.2), rgba(139,0,255,0.2)); color: #00ffff; border: 2px solid #00ffff; padding: 0.75rem 1.5rem; border-radius: 25px; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; backdrop-filter: blur(5px); text-transform: uppercase; letter-spacing: 0.5px; }
.page-rhythm .difficulty-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,255,255,0.3); background: linear-gradient(45deg, rgba(0,255,255,0.3), rgba(139,0,255,0.3)); }
.page-rhythm .difficulty-btn.active { background: linear-gradient(45deg, #00ffff, #8b00ff); color: white; border-color: #8b00ff; box-shadow: 0 0 20px rgba(0,255,255,0.5); }
.page-rhythm .difficulty-btn.active:hover { background: linear-gradient(45deg, #8b00ff, #ff007f); border-color: #ff007f; }
.page-rhythm .progress-container-overlay { width: 100%; margin: 1rem 0; }
.page-rhythm .progress-bar-overlay { height: 12px; background: rgba(0,0,0,0.8); border-radius: 10px; overflow: hidden; border: 2px solid #00ffff; }
.page-rhythm .progress-fill-overlay { height: 100%; background: linear-gradient(90deg, #00ffff, #8b00ff); border-radius: 8px; transition: width 0.3s ease; box-shadow: 0 0 15px #00ffff; }
.page-rhythm #analysisInfo div { opacity: 0.5; transition: all 0.3s ease; margin: 0.3rem 0; }
.page-rhythm #analysisInfo div.active { opacity: 1; color: #ffff00; transform: translateX(10px); }
.page-rhythm #analysisInfo div.completed { opacity: 0.8; color: #00ff88; }
.page-rhythm .game-footer { background: rgba(0,0,0,0.8); padding: 15px 30px calc(15px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: center; border-top: 2px solid #00ffff; backdrop-filter: blur(10px); z-index: 1000; position: fixed; left: 0; right: 0; bottom: 0; width: 100%; }
.page-rhythm .home-button { display: flex; align-items: center; gap: 10px; color: #00ffff; text-decoration: none; padding: 10px 20px; border: 2px solid #00ffff; border-radius: 10px; background: rgba(0,255,255,0.1); transition: all 0.3s ease; font-weight: 700; }
.page-rhythm .home-button:hover { background: rgba(0,255,255,0.2); color: #ffff00; border-color: #ffff00; box-shadow: 0 0 20px rgba(0,255,255,0.5); transform: translateY(-2px); }
.page-rhythm .music-toggle { background: rgba(0,255,255,0.1); border: 2px solid #00ffff; color: #00ffff; border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; font-size: 1.2rem; }
.page-rhythm .music-toggle:hover { background: rgba(0,255,255,0.2); box-shadow: 0 0 20px rgba(0,255,255,0.5); transform: scale(1.1); }
.page-rhythm .language-selector .dropdown-toggle { background: rgba(0,255,255,0.1); border: 2px solid #00ffff; color: #00ffff; border-radius: 10px; padding: 10px 15px; transition: all 0.3s ease; }
.page-rhythm .language-selector .dropdown-toggle:hover { background: rgba(0,255,255,0.2); box-shadow: 0 0 20px rgba(0,255,255,0.5); }
.page-rhythm .language-selector .dropdown-menu { background: rgba(0,0,0,0.9); border: 2px solid #00ffff; border-radius: 10px; backdrop-filter: blur(10px); z-index: 9999 !important; }
.page-rhythm .language-selector .dropdown-item { color: #00ffff; padding: 10px 20px; transition: all 0.3s ease; }
.page-rhythm .language-selector .dropdown-item:hover { background: rgba(0,255,255,0.2); color: #ffff00; }
.page-rhythm .controls-info { position: absolute; bottom: calc(20px + var(--footer-h, 80px) + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); padding: 10px 20px; border-radius: 20px; border: 1px solid #00ffff; color: #00ffff; font-size: 0.9rem; text-align: center; backdrop-filter: blur(10px); }
@media (max-width: 768px) {
  .page-rhythm .title-text { font-size: 2.5rem; }
  .page-rhythm .overlay-content { padding: 2rem; margin: 1rem; }
  .page-rhythm .upload-area { padding: 2rem; }
}
