Files
grepo-remote/static/css/styles.css
2026-05-01 21:16:20 +03:00

462 lines
11 KiB
CSS

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'Segoe UI', sans-serif;
background: #1a1a2e;
color: #e0e0e0;
min-height: 100vh;
}
header {
background: #16213e;
border-bottom: 2px solid #c8a44a;
padding: 12px 24px;
display: flex;
align-items: center;
gap: 16px;
}
header h1 {
font-size: 1.3rem;
color: #c8a44a;
letter-spacing: 1px;
}
.status-indicator {
margin-left: auto;
display: flex;
gap: 10px;
align-items: center;
}
.conn-badge {
font-size: 0.8rem;
padding: 4px 10px;
border-radius: 12px;
background: #333;
}
.conn-badge.online { background: #1a4a1a; color: #6fcf6f; }
.conn-badge.offline { background: #4a1a1a; color: #cf6f6f; }
/* ---- Captcha alert banner ---- */
#captcha-banner {
display: flex;
align-items: center;
gap: 12px;
background: #5a0a0a;
border-bottom: 2px solid #ff4444;
padding: 10px 24px;
font-size: 0.9rem;
color: #ffaaaa;
animation: captchaPulse 1.2s ease-in-out infinite;
}
#captcha-banner span:first-child { font-size: 1.2rem; flex-shrink: 0; }
#captcha-banner span:nth-child(2) { flex: 1; font-weight: 500; }
#captcha-dismiss {
background: #ff4444;
color: #fff;
border: none;
border-radius: 4px;
padding: 5px 12px;
cursor: pointer;
font-size: 0.8rem;
font-weight: 600;
flex-shrink: 0;
}
#captcha-dismiss:hover { background: #cc2222; }
@keyframes captchaPulse {
0%, 100% { background: #5a0a0a; }
50% { background: #7a1010; }
}
.layout {
display: grid;
grid-template-columns: 320px 1fr;
grid-template-rows: auto 1fr;
gap: 0;
height: calc(100vh - 57px);
}
/* ---- Town list (left panel) ---- */
#town-panel {
grid-row: 1 / 3;
background: #16213e;
border-right: 1px solid #2a2a4a;
overflow-y: auto;
padding: 12px;
}
#town-panel h2 {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 1px;
color: #888;
margin-bottom: 10px;
padding-bottom: 6px;
border-bottom: 1px solid #2a2a4a;
}
.town-card {
background: #0f3460;
border: 1px solid #2a2a6a;
border-radius: 6px;
padding: 10px;
margin-bottom: 8px;
cursor: pointer;
transition: border-color 0.15s;
}
.town-card:hover { border-color: #c8a44a; }
.town-card.selected { border-color: #c8a44a; background: #1a4070; }
.town-card .town-name { font-weight: 600; font-size: 0.95rem; color: #c8a44a; }
.town-card .town-meta { font-size: 0.72rem; color: #888; margin-top: 2px; }
.town-card .town-res {
display: flex; gap: 8px;
margin-top: 6px; font-size: 0.78rem;
}
.res-item { display: flex; align-items: center; gap: 3px; }
.res-icon { width: 12px; height: 12px; border-radius: 2px; }
.res-wood { background: #8B6914; }
.res-stone { background: #888; }
.res-iron { background: #5588aa; }
.res-pop { background: #88aa55; }
.town-stale { opacity: 0.5; }
/* ---- Command panel (top right) ---- */
#command-panel {
padding: 16px 20px;
background: #1a1a2e;
border-bottom: 1px solid #2a2a4a;
}
#command-panel h2 {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 1px;
color: #888;
margin-bottom: 12px;
}
.command-form {
display: flex;
flex-wrap: wrap;
gap: 10px;
align-items: flex-end;
}
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 0.72rem; color: #aaa; text-transform: uppercase; letter-spacing: 0.5px; }
select, input[type=number] {
background: #0f3460;
border: 1px solid #2a2a6a;
color: #e0e0e0;
padding: 7px 10px;
border-radius: 4px;
font-size: 0.85rem;
min-width: 140px;
}
select:focus, input:focus { outline: none; border-color: #c8a44a; }
.btn {
padding: 8px 18px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.85rem;
font-weight: 600;
letter-spacing: 0.5px;
transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn-gold { background: #c8a44a; color: #1a1a2e; }
.btn-danger { background: #8b2222; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 0.75rem; }
#no-town-selected {
color: #666;
font-size: 0.85rem;
padding: 8px 0;
}
/* Build queue preview */
#build-queue-preview {
margin-top: 10px;
font-size: 0.78rem;
color: #aaa;
}
#build-queue-preview span {
background: #0f3460;
border: 1px solid #2a4a6a;
border-radius: 3px;
padding: 2px 7px;
margin-right: 4px;
display: inline-block;
margin-bottom: 4px;
}
/* ---- Command log (bottom right) ---- */
#log-panel {
padding: 16px 20px;
overflow-y: auto;
background: #1a1a2e;
}
#log-panel h2 {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 1px;
color: #888;
margin-bottom: 10px;
}
table {
width: 100%;
border-collapse: collapse;
font-size: 0.8rem;
}
th {
text-align: left;
color: #888;
font-weight: 500;
padding: 4px 8px;
border-bottom: 1px solid #2a2a4a;
white-space: nowrap;
}
td {
padding: 5px 8px;
border-bottom: 1px solid #1e1e3a;
vertical-align: middle;
}
tr:hover td { background: #1e1e40; }
.status-badge {
padding: 2px 8px;
border-radius: 10px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
white-space: nowrap;
}
.status-pending { background: #3a3a00; color: #cccc00; }
.status-executing { background: #003a4a; color: #00ccee; }
.status-done { background: #003a00; color: #00cc66; }
.status-failed { background: #4a0000; color: #ee4444; }
.status-cancelled { background: #2a2a2a; color: #888; }
#empty-log { color: #444; font-size: 0.85rem; padding: 12px 0; }
/* ==========================================================================
Mobile Responsiveness (Styles below only apply on phones/tablets viewing < 768px)
========================================================================== */
@media (max-width: 768px) {
/* Collapse the 2-column grid into a single vertical stack */
.layout {
display: flex;
flex-direction: column;
height: auto;
min-height: calc(100vh - 57px);
}
/* Optimize header to ensure title and badges fit */
header {
flex-wrap: wrap;
padding: 10px 15px;
justify-content: space-between;
}
header h1 {
font-size: 1.1rem;
}
/* Town panel becomes a horizontal swipable carousel at the top */
#town-panel {
border-right: none;
border-bottom: 2px solid #2a2a4a;
display: flex;
flex-direction: row;
overflow-x: auto;
overflow-y: hidden;
padding: 10px;
/* Optional: helps snap cards into view on swipe */
scroll-snap-type: x mandatory;
}
/* Hide the "TOWNS" header inside the panel to save vertical space */
#town-panel h2 {
display: none;
}
/* Convert town cards from vertical blocks into horizontal list items */
.town-card {
min-width: 160px;
margin-right: 12px;
margin-bottom: 0;
scroll-snap-align: start;
flex-shrink: 0; /* Prevents cards from squishing */
}
/* Make the command form full-width for easy tapping (fat-finger friendly) */
#command-panel {
padding: 16px 15px;
}
.command-form {
flex-direction: column;
align-items: stretch;
gap: 15px;
}
.form-group {
width: 100%;
}
/* Enlarge inputs and buttons heavily for thumbs */
select, input[type=number], .btn {
width: 100%;
padding: 12px 10px;
font-size: 1rem;
}
/* Shrink log table padding so it fits narrow screens better */
#log-panel {
padding: 16px 10px;
}
th, td {
padding: 8px 4px;
font-size: 0.72rem;
}
}
/* ==========================================================================
Building, Academy & Unit Picker Modals
========================================================================== */
#building-modal-overlay, #academy-modal-overlay, #unit-modal-overlay {
display: none;
position: fixed;
inset: 0;
background: rgba(0,0,0,0.75);
z-index: 1000;
align-items: center;
justify-content: center;
}
#building-modal-overlay.open, #academy-modal-overlay.open, #unit-modal-overlay.open { display: flex; }
#building-modal, #academy-modal, #unit-modal {
background: #16213e;
border: 2px solid #c8a44a;
border-radius: 10px;
padding: 20px 24px;
width: min(860px, 96vw);
max-height: 88vh;
overflow-y: auto;
position: relative;
animation: modalIn 0.18s ease-out;
}
@keyframes modalIn {
from { transform: scale(0.92); opacity: 0; }
to { transform: scale(1); opacity: 1; }
}
#building-modal-header, #academy-modal-header, .modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
padding-bottom: 10px;
border-bottom: 1px solid #2a4a6a;
}
#building-modal-header h3, #academy-modal-header h3, .modal-header h3 {
color: #c8a44a;
font-size: 1rem;
letter-spacing: 0.5px;
}
#building-modal-close, #academy-modal-close, #unit-modal-close {
background: none;
border: none;
color: #888;
font-size: 1.4rem;
cursor: pointer;
line-height: 1;
padding: 0 4px;
}
#building-modal-close:hover, #academy-modal-close:hover, #unit-modal-close:hover { color: #fff; }
#building-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
}
.bld-card {
background: #0f2a50;
border: 2px solid #2a4a6a;
border-radius: 8px;
padding: 10px 8px 8px;
cursor: pointer;
transition: border-color 0.15s, transform 0.1s;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
gap: 4px;
position: relative;
}
.bld-card:hover { border-color: #c8a44a; transform: translateY(-2px); }
.bld-card.bld-selected { border-color: #c8a44a; background: #1a4070; }
.bld-card.bld-maxed { border-color: #2a6a2a; opacity: 0.7; cursor: default; }
.bld-card.bld-locked { border-color: #6a2a2a; opacity: 0.6; cursor: default; }
.bld-level {
position: absolute;
top: 6px;
left: 8px;
font-size: 0.7rem;
font-weight: 700;
background: #1a1a2e;
color: #c8a44a;
border-radius: 3px;
padding: 1px 5px;
}
.bld-icon { font-size: 1.6rem; line-height: 1; margin-top: 4px; }
.bld-name { font-size: 0.72rem; font-weight: 600; color: #ddd; margin-top: 2px; }
.bld-status {
font-size: 0.65rem;
padding: 2px 6px;
border-radius: 8px;
margin-top: 2px;
font-weight: 600;
white-space: nowrap;
}
.bld-status.can-build { background: #1a4a1a; color: #6fcf6f; }
.bld-status.no-resources { background: #4a2a00; color: #ffaa44; }
.bld-status.queue-warn { background: #3a3a00; color: #cccc44; }
.bld-status.locked { background: #4a0a0a; color: #ff6666; }
.bld-status.maxed { background: #1a3a1a; color: #44aa44; }
.bld-cost { font-size: 0.62rem; color: #666; margin-top: 2px; }
#building-modal-queue {
margin-top: 16px;
padding-top: 10px;
border-top: 1px solid #2a4a6a;
font-size: 0.75rem;
color: #888;
}
#building-modal-queue-title {
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 6px;
}
/* Responsive: 2 columns on small screens */
@media (max-width: 600px) {
#building-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Academy Grid specific styling */
#academy-grid {
display: flex;
gap: 12px;
overflow-x: auto;
padding-bottom: 12px;
}
.academy-col {
display: flex;
flex-direction: column;
gap: 8px;
min-width: 140px;
}
.academy-col-header {
text-align: center;
font-size: 0.8rem;
color: #c8a44a;
border-bottom: 1px solid #2a4a6a;
padding-bottom: 4px;
margin-bottom: 4px;
}