/* ====================== Base Variables ====================== */ :root { --bg-color-light: #ffffff; --bg-color-dark: #000000; --text-color-light: #000000; --text-color-dark: #ffffff; --joystick-border-light: rgba(0, 0, 0, 0.3); --joystick-border-dark: rgba(255, 255, 255, 0.3); --joystick-inner-light: rgba(0, 0, 0, 0.4); --joystick-inner-dark: rgba(255, 255, 255, 0.4); --fire-button-light: rgba(0, 0, 0, 0.2); --fire-button-dark: rgba(255, 255, 255, 0.2); } /* ====================== Body ====================== */ body { margin: 0; overflow: hidden; background-color: var(--bg-color-light); color: var(--text-color-light); font-family: Arial, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: start; height: 100vh; position: relative; } body.light { background-color: var(--bg-color-light); color: var(--text-color-light); } body.dark { background-color: var(--bg-color-dark); color: var(--text-color-dark); } /* ====================== Titles (h1, h2) ====================== */ h1, h2 { position: absolute; top: 20px; width: 100%; text-align: center; background: transparent; pointer-events: none; opacity: 0; transform: translateY(-20px); animation: fadeIn 2s ease forwards; } h2 { font-size: 18px; margin-top: 50px; animation-delay: 0.5s; color: #888; } /* ====================== HUD ====================== */ #hud { position: absolute; top: 90px; width: 100%; text-align: center; font-size: 18px; z-index: 10; display: none; background: transparent; pointer-events: none; animation: fadeIn 2s ease forwards; color: #ccc; } /* ====================== Game Over Text ====================== */ #gameover { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 48px; color: red; text-align: center; z-index: 20; display: none; } /* ====================== Theme Toggle Button ====================== */ #themeToggle { position: absolute; top: 10px; right: 10px; width: 30px; /* 🔥 más pequeño */ height: 30px; /* 🔥 más pequeño */ background: none; border: 2px solid currentColor; border-radius: 50%; font-size: 18px; /* 🔥 ícono más pequeño */ color: inherit; cursor: pointer; z-index: 30; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); background-color: rgba(255,255,255,0.2); transition: background-color 0.3s, color 0.3s; } #themeToggle:hover { background-color: rgba(255,255,255,0.3); } /* ====================== Canvas ====================== */ canvas { flex: 1; width: 100%; height: 100%; display: block; } /* ====================== Mobile Controls ====================== */ #joystickContainer { position: fixed; bottom: 5%; /* 🔥 cambiado */ left: 30px; width: 80px; height: 80px; background: transparent; border: 2px solid var(--joystick-border-light); border-radius: 50%; backdrop-filter: blur(5px); touch-action: none; display: none; z-index: 20; align-items: center; justify-content: center; } #fireButton { position: fixed; bottom: 5%; /* 🔥 cambiado */ right: 30px; width: 70px; height: 70px; background: var(--fire-button-light); border: none; border-radius: 50%; font-size: 0px; z-index: 20; display: none; backdrop-filter: blur(5px); touch-action: none; align-items: center; justify-content: center; transition: background-color 0.3s; } #joystick { position: absolute; top: 50%; left: 50%; width: 24px; height: 24px; background: var(--joystick-inner-light); border-radius: 50%; transform: translate(-50%, -50%); transition: transform 0.1s ease-out; } #fireButton:active { transform: scale(0.9); transition: transform 0.1s ease; } /* Mostrar controles solo en móviles */ @media (pointer: coarse) { #joystickContainer, #fireButton { display: flex; } } /* ====================== Dark Mode Overrides ====================== */ body.dark #joystickContainer { border-color: var(--joystick-border-dark); } body.dark #joystick { background: var(--joystick-inner-dark); } body.dark #fireButton { background: var(--fire-button-dark); } /* ====================== Animations ====================== */ @keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }