rabukasim / web_ui /css /layout.css
deploy
batch 5: deployment_scripts + web_ui html/css/js/decks
ab6077c
Raw History Blame Contribute Delete
12.5 kB
/* --- Layout Structure --- */
.header-utilities {
display: flex;
gap: 12px;
align-items: center;
background: rgba(255, 255, 255, 0.05);
padding: 2px 8px;
border-radius: 4px;
}
.pills-player-group {
display: flex;
align-items: center;
gap: 4px;
}
.pills-label {
font-size: 0.65rem;
font-weight: bold;
color: var(--text-muted);
text-transform: uppercase;
}
.pill-btn {
background: var(--bg-secondary);
border: 1px solid var(--border);
color: var(--text-dim);
font-size: 0.7rem;
padding: 1px 4px;
border-radius: 3px;
cursor: pointer;
min-width: 32px;
text-align: center;
}
.pill-btn:hover {
background: var(--bg-tertiary);
border-color: var(--accent-blue);
color: var(--text);
}
.pill-btn.energy {
border-color: rgba(74, 158, 255, 0.3);
}
.pill-btn.discard {
border-color: rgba(239, 68, 68, 0.3);
}
.header {
display: flex;
flex-direction: column;
background: var(--bg-secondary);
border-bottom: 1px solid var(--border);
z-index: var(--z-header);
position: sticky;
top: 0;
}
.header-main-row {
display: none;
}
.header h1 {
margin: 0;
font-size: var(--font-size-lg);
font-weight: 800;
letter-spacing: -0.5px;
white-space: nowrap;
background: linear-gradient(to right, #fff, #aaa);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
.controls {
display: flex;
align-items: center;
gap: 3px;
flex-shrink: 0;
}
.controls .btn {
padding: 1px 5px;
font-size: 0.65rem;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
}
.info-bar {
display: flex;
align-items: stretch;
gap: 8px;
flex-wrap: nowrap;
overflow-x: auto;
overflow-y: visible;
}
.header-col {
display: flex;
flex-direction: column;
justify-content: center;
gap: 1px;
flex-shrink: 0;
font-size: clamp(0.5rem, 1.2vw, 0.7rem);
white-space: nowrap;
color: var(--text-dim);
padding: 1px 4px;
border-right: 1px solid rgba(255,255,255,0.05);
}
.header-col:last-of-type {
border-right: none;
}
.controls {
margin-left: auto;
}
.header-col .stat-group {
display: flex;
align-items: center;
gap: 4px;
flex-wrap: wrap;
}
.header-stat-row {
display: flex;
align-items: center;
gap: 3px;
line-height: 1.2;
}
.header-stat-row strong {
color: var(--text);
font-weight: 700;
}
.header-stat-row .stat-label {
font-weight: 600;
min-width: 14px;
}
.hearts-blades-row {
display: flex;
align-items: center;
gap: 2px;
}
.summary-pips {
display: flex;
align-items: center;
gap: 1px;
}
.summary-pips div {
display: flex;
align-items: center;
gap: 1px;
}
.summary-hearts-row {
display: flex;
align-items: center;
gap: 1px;
min-height: 20px;
}
.controls {
display: flex;
align-items: center;
gap: 3px;
flex-shrink: 0;
}
.stat-group {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
}
.stat {
display: flex;
align-items: center;
gap: 2px;
font-size: clamp(0.55rem, 1.5vw, 0.7rem);
white-space: nowrap;
color: var(--text-dim);
}
.stat strong {
color: var(--text);
font-weight: 700;
}
.stat-label {
font-weight: 600;
margin-right: 2px;
}
.stat-icon {
display: inline-flex;
align-items: center;
justify-content: center;
}
.room-display {
display: flex;
align-items: center;
gap: var(--space-xs);
flex-shrink: 0;
}
.room-display-pill {
font-size: 0.7rem;
background: rgba(46, 204, 113, 0.1);
padding: 2px 12px;
border-radius: var(--radius-full);
border: 1px solid var(--accent-valid);
display: flex;
align-items: center;
gap: 8px;
color: var(--text-dim);
white-space: nowrap;
}
.room-display-pill #room-code-header {
color: var(--accent-gold);
font-weight: bold;
}
.room-label {
font-size: 0.75rem;
font-weight: 600;
letter-spacing: 0.05em;
color: var(--accent-valid);
}
.player-section {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
background: rgba(0, 0, 0, 0.1);
padding: 0;
margin: 0;
overflow-y: hidden;
overflow-x: visible;
}
.board-inner {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
padding: 1px;
gap: 1px;
overflow: hidden;
}
.live-group-row {
width: 100%;
flex: 0 0 calc(var(--zone-total) * 0.20);
--card-loc-h: calc(var(--card-h) * 720 / 512 * 0.5 / var(--section-count, 1));
background: rgba(0, 0, 0, 0.2);
border-bottom: 1px solid var(--border);
display: flex;
justify-content: center;
min-height: 0;
}
.live-group {
width: 100%;
display: flex;
flex-direction: column;
}
/* Board Toggle (Tabbed View) */
.board-toggle {
display: flex;
gap: 0;
background: rgba(0, 0, 0, 0.2);
padding: 0;
border-bottom: 1px solid var(--border);
justify-content: center;
}
.board-toggle .btn-toggle {
flex: 1;
max-width: 300px;
padding: 2px 6px;
font-size: 0.7rem;
font-weight: 700;
border-radius: 4px;
background: transparent;
border: 1px solid transparent;
color: var(--text-dim);
}
.board-toggle .btn-toggle.active {
background: var(--bg-tertiary);
border-color: var(--accent-blue);
color: var(--accent-blue);
box-shadow: var(--glow-blue);
}
/* Both-mode: sections split remaining space after board-toggle equally */
.game-board.both-mode {
--section-count: 2;
overflow: hidden;
}
.game-board.both-mode .player-section {
flex: 1;
min-height: 0;
overflow: hidden;
}
.game-board.both-mode .board-inner {
flex: 1;
min-height: 0;
overflow: hidden;
}
/* Opponent perspective: hand at top, live at bottom (across-the-table view) */
.game-board.both-mode .player-section.opponent .board-inner {
flex-direction: column-reverse;
}
/* Mirror opponent stage: their left is on the viewer's right */
.game-board.both-mode #opp-stage {
flex-direction: row-reverse;
}
/* Flip perspective: put player on top */
.game-board.both-mode-flipped .player-section.opponent {
order: 1;
}
/* Sidebar & Containers */
.game-container {
display: flex;
flex: 1;
min-height: 0;
width: 100vw;
overflow: hidden;
position: relative;
}
.main-content {
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
min-height: 0;
overflow: hidden;
padding: 0 !important;
}
.sidebar-left,
.sidebar-right {
width: 280px;
max-width: 25%;
background: var(--glass-bg);
backdrop-filter: var(--glass-blur);
border-left: 1px solid var(--glass-border);
border-right: 1px solid var(--glass-border);
display: flex;
flex-direction: column;
overflow-y: auto;
padding: 0;
z-index: var(--z-sidebar);
position: relative;
flex-shrink: 0;
}
.sidebar-right .sidebar-section {
padding: 0;
border-bottom: 1px solid var(--border);
}
.sidebar-right > .sidebar-section:first-child {
display: flex;
flex-direction: column;
}
.sidebar-section-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 10px 12px 8px;
}
.sidebar-section-header h3 {
margin: 0;
}
.sidebar-close-btn {
display: none;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: 1px solid var(--border);
border-radius: var(--radius-full);
background: rgba(255, 255, 255, 0.06);
color: var(--text);
font-size: 1.1rem;
line-height: 1;
cursor: pointer;
flex-shrink: 0;
transition: border-color var(--transition-base);
}
.sidebar-close-btn:hover {
background: rgba(255, 255, 255, 0.12);
border-color: var(--accent-pink);
transform: scale(1.05);
}
.sidebar-right #actions {
overflow: visible;
padding-right: 0;
}
.game-board {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
overflow: hidden;
padding: 0;
margin: 0;
--section-count: 1;
--zone-total: calc(var(--card-h) * 2.5 / var(--section-count, 1));
}
.sidebar-left:hover,
.sidebar-right:hover {
background: rgba(255, 255, 255, 0.05);
}
.panel-container {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
gap: 0;
}
.resizer {
width: 6px;
cursor: col-resize;
background: transparent;
z-index: 60;
position: relative;
}
.resizer:hover {
background: rgba(74, 158, 255, 0.2);
width: 8px;
}
.resizer:active {
background: var(--accent-blue);
}
/* Mobile Sidebar & Toggle */
#mobile-sidebar-toggle {
position: fixed;
bottom: 20px;
right: 20px;
z-index: var(--z-overlay);
background: var(--accent-pink);
border-radius: var(--radius-full);
width: 60px;
height: 60px;
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
box-shadow: var(--shadow-md);
border: none;
color: white;
cursor: pointer;
}
/* Mobile action bar — hidden by default (unused element) */
.mobile-action-bar {
display: none;
}
/* Mobile right-edge button group */
.mobile-btn-group {
display: none;
position: fixed;
right: 0;
top: 50%;
transform: translateY(-50%);
z-index: calc(var(--z-modal) - 1);
flex-direction: column;
background: var(--bg-secondary);
border: 1px solid rgba(255,255,255,0.1);
border-right: none;
border-radius: 6px 0 0 6px;
overflow: hidden;
}
.mobile-toggle-btn {
display: flex;
width: 40px;
height: 40px;
background: transparent;
color: #ccc;
border: none;
cursor: pointer;
align-items: center;
justify-content: center;
padding: 0;
font-size: 0.6rem;
font-weight: 700;
line-height: 1;
text-align: center;
position: relative;
touch-action: manipulation;
}
.mobile-toggle-btn:first-child { border-radius: 6px 0 0 0; }
.mobile-toggle-btn:last-child { border-radius: 0 0 0 6px; }
.mobile-toggle-btn#mobile-toggle-actions,
.mobile-toggle-btn#mobile-choice-btn { margin-top: 4px; }
.mobile-toggle-btn:hover { background: rgba(255,255,255,0.06); }
.mobile-toggle-btn.active { background: rgba(255,255,255,0.1); }
.mobile-toggle-btn.hidden { display: none; }
.action-badge {
position: absolute;
top: 2px;
right: 2px;
background: rgba(255,255,255,0.15);
color: #fff;
font-size: 0.4rem;
font-weight: 800;
min-width: 14px;
height: 14px;
border-radius: 3px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 3px;
line-height: 1;
}
#mobile-pass-btn.mobile-toggle-btn {
background: var(--accent-green);
color: var(--text);
}
#mobile-pass-btn.mobile-toggle-btn:hover { background: #27ae60; }
/* Mobile / Tablet Responsive Mode */
@media (orientation: portrait), (max-aspect-ratio: 13/9) {
.mobile-btn-group {
display: flex;
}
#ui-mode-toggle {
display: none;
}
#ability-queue-btn {
display: none;
}
.mobile-action-bar {
display: block;
}
/* Stage & Live Zone: scroll to full content instead of centering (which splits overflow 50/50) */
.card-area.stage,
.live-zone-cards {
justify-content: flex-start;
overflow-x: scroll;
}
/* Ensure field containers can scroll horizontally too */
.field-row,
.live-group-row {
overflow-x: auto;
}
.sidebar-left,
.sidebar-right {
position: fixed;
right: -100%;
width: 85vw;
max-width: 320px;
height: 100dvh;
top: 0;
z-index: calc(var(--z-modal) - 2);
box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}
/* Left sidebar slides from left instead */
.sidebar-left {
left: -100%;
right: auto;
}
.sidebar.active {
right: 0;
}
.sidebar-left.active {
left: 0;
right: auto;
}
.sidebar-close-btn {
display: inline-flex;
}
/* Overlay backdrop when sidebar is open */
body.sidebar-open::after {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100dvh;
background: rgba(0, 0, 0, 0.55);
z-index: calc(var(--z-sidebar) - 1);
pointer-events: auto;
}
}