315 lines
7.2 KiB
CSS
315 lines
7.2 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;
|
|
}
|
|
}
|