mirror of
https://github.com/Xevion/smart-rgb.git
synced 2025-12-09 04:08:42 -06:00
251 lines
4.8 KiB
CSS
251 lines
4.8 KiB
CSS
@import "tailwindcss";
|
|
|
|
@theme {
|
|
--font-oswald: "Oswald", sans-serif;
|
|
--font-inter: "Inter Variable", Inter, Avenir, Helvetica, Arial, sans-serif;
|
|
}
|
|
|
|
:root {
|
|
font-family: "Inter Variable", Inter, Avenir, Helvetica, Arial, sans-serif;
|
|
font-size: 16px;
|
|
line-height: 2.8em;
|
|
font-weight: 400;
|
|
|
|
color: #1e293b;
|
|
background-color: transparent; /* Transparent to show game canvas */
|
|
|
|
font-synthesis: none;
|
|
text-rendering: optimizeLegibility;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-text-size-adjust: 100%;
|
|
}
|
|
|
|
/**
|
|
* Input blocking system for desktop mode:
|
|
*
|
|
* In desktop mode, the InputForwarder component captures all input events
|
|
* (mouse, keyboard, wheel) from the window and forwards them to the Bevy game engine.
|
|
*
|
|
* To prevent UI elements (menus, overlays, etc.) from accidentally forwarding clicks
|
|
* to the game, those elements should be tagged with the 'block-game-input' class.
|
|
*
|
|
* The InputForwarder checks `event.target.closest('.block-game-input')` and skips
|
|
* forwarding if the event originated from within a blocking element.
|
|
*
|
|
* For overlays that SHOULD allow clicks through (like spawn phase instructions),
|
|
* simply don't add the 'block-game-input' class.
|
|
*/
|
|
.block-game-input {
|
|
/* This class serves as a marker - no styles needed */
|
|
}
|
|
|
|
html,
|
|
body,
|
|
#root {
|
|
@apply fixed top-0 left-0;
|
|
}
|
|
|
|
.container {
|
|
margin: 0;
|
|
padding-top: 10vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
text-align: center;
|
|
pointer-events: none; /* Let clicks pass through to interaction layer */
|
|
position: relative;
|
|
z-index: 1; /* Above interaction layer */
|
|
}
|
|
|
|
/* Game canvas - PixiJS renderer layer */
|
|
.game-canvas {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
pointer-events: auto; /* Capture input events */
|
|
z-index: 0; /* Behind all UI elements */
|
|
}
|
|
|
|
.game-ui {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
pointer-events: none; /* Let clicks pass through to interaction layer */
|
|
z-index: 1; /* Above interaction layer and canvas */
|
|
}
|
|
|
|
/* Leaderboard styles */
|
|
.no-drag {
|
|
-webkit-app-region: no-drag;
|
|
}
|
|
|
|
/* Attacks styles */
|
|
.attacks {
|
|
user-select: none;
|
|
opacity: 0.6;
|
|
transition: opacity 400ms ease;
|
|
font-size: 13px; /* Base font size for scaling everything */
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
.attacks:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
.attacks__row {
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 0.5em 0.83em;
|
|
border: none;
|
|
background: rgba(15, 23, 42, 0.6);
|
|
backdrop-filter: blur(2px);
|
|
color: white;
|
|
cursor: pointer;
|
|
transition: background-color 0.15s ease;
|
|
font-size: 1.1em;
|
|
font-family: inherit;
|
|
width: 21.67em;
|
|
border-radius: 0.5em;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.attacks__row:hover {
|
|
background: rgba(15, 23, 42, 0.75);
|
|
}
|
|
|
|
.attacks__background {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
height: 100%;
|
|
pointer-events: none;
|
|
transition: width 0.3s ease;
|
|
}
|
|
|
|
.attacks__nation {
|
|
text-align: left;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
flex: 1;
|
|
padding-right: 1em;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.attacks__troops {
|
|
text-align: right;
|
|
font-variant-numeric: tabular-nums;
|
|
white-space: nowrap;
|
|
min-width: 5em;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
@media (max-width: 1200px) {
|
|
.attacks {
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 1000px) {
|
|
.attacks {
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 800px) {
|
|
.attacks {
|
|
font-size: 11.5px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.attacks {
|
|
font-size: 10px;
|
|
}
|
|
}
|
|
|
|
/* Attack Controls styles */
|
|
.attack-controls {
|
|
position: fixed;
|
|
bottom: 12px;
|
|
left: 12px;
|
|
z-index: 10;
|
|
user-select: none;
|
|
opacity: 0.95;
|
|
transition: opacity 400ms ease;
|
|
font-size: 15.6px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.attack-controls:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
.attack-controls__content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.attack-controls__header {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: flex-end;
|
|
gap: 0.5em;
|
|
min-width: 26em;
|
|
}
|
|
|
|
.attack-controls__percentage {
|
|
position: absolute;
|
|
left: 0.8em;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
font-size: 1.15em;
|
|
font-weight: 500;
|
|
font-variant-numeric: tabular-nums;
|
|
color: white;
|
|
pointer-events: none;
|
|
z-index: 1;
|
|
opacity: 0.85;
|
|
text-shadow:
|
|
0 1px 2px rgba(0, 0, 0, 0.4),
|
|
0 2px 4px rgba(0, 0, 0, 0.4),
|
|
1px 0 2px rgba(0, 0, 0, 0.4),
|
|
-1px 0 2px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
@media (max-width: 1200px) {
|
|
.attack-controls {
|
|
font-size: 14.4px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 1000px) {
|
|
.attack-controls {
|
|
font-size: 14.4px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 800px) {
|
|
.attack-controls {
|
|
font-size: 13.8px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.attack-controls {
|
|
font-size: 12px;
|
|
}
|
|
}
|