/* ==========================================================
   MONOPOLY ONLINE - retro-terminal / arcade-cabinet theme.
   Same palette and voice as before; this pass adds the depth,
   motion and tactility of a real app shell on top of it:
   layered neon-tinted shadows instead of flat borders, rounded
   "cabinet" corners, a faint CRT scanline field behind
   everything, and buttons/inputs that actually feel pressable.
   ========================================================== */

:root {
    --bg: #0b0f14;
    --panel: #111826;
    --panel2: #0f1722;
    --accent: #00e5ff;
    --accent2: #ffcc00;
    --danger: #ff4d4d;
    --success: #00ff88;
    --text: #e6f1ff;
    --muted: #93a4bd;

    --line: #1f2a3a;
    --line-soft: #1a2636;
    --field: #0b0f14;

    --accent-rgb: 0, 229, 255;
    --accent2-rgb: 255, 204, 0;
    --danger-rgb: 255, 77, 77;

    --radius-lg: 14px;
    --radius: 10px;
    --radius-sm: 6px;

    --shadow-ambient: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-panel: var(--shadow-ambient), 0 0 0 1px var(--line) inset, 0 0 22px rgba(var(--accent-rgb), 0.06);

    --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
    --fast: 0.14s;
}

* {
    box-sizing: border-box;
}

::selection {
    background: rgba(var(--accent-rgb), 0.35);
    color: #fff;
}

html {
    scrollbar-color: #24405a var(--panel2);
    scrollbar-width: thin;
}

body {
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.014) 0px,
            rgba(255, 255, 255, 0.014) 1px,
            transparent 1px,
            transparent 3px
        ),
        radial-gradient(circle at top, #111826, #05070a 70%);
    background-attachment: fixed;
    color: var(--text);
    font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px;
}

/* ---------- FOCUS / MOTION BASELINE ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- NAV BAR ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: linear-gradient(145deg, var(--panel), var(--panel2));
    backdrop-filter: blur(6px);
    border-bottom: 2px solid var(--accent);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(var(--accent-rgb), 0.25);
    padding: 12px 16px;
    margin-bottom: 14px;
}

.nav a {
    color: var(--accent);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    padding: 4px 2px;
    border-bottom: 2px solid transparent;
    transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.nav a:hover {
    color: #fff;
    text-decoration: none;
    border-bottom-color: var(--accent2);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.nav .logout-link {
    color: var(--danger);
}

.nav .logout-link:hover {
    border-bottom-color: var(--danger);
}

/* ---------- LAYOUT / PANELS ---------- */
.panel {
    background: linear-gradient(145deg, var(--panel), var(--panel2));
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-panel);
}

.panel.compact {
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-items: start;
}

@media (max-width: 760px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }

    .nav {
        justify-content: center;
        text-align: center;
    }

    body {
        font-size: 15px;
    }

    .container {
        padding: 10px;
    }
}

h1, h2, h3 {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

h1 { font-size: 19px; }
h2 {
    font-size: 15px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
h3 { font-size: 13px; color: var(--accent2); }

/* ---------- LANDING PAGE HERO ---------- */
.hero {
    text-align: center;
    padding: 56px 14px 40px;
    margin-bottom: 18px;
}

.hero-title {
    font-size: 36px;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-shadow: 0 0 4px rgba(var(--accent-rgb), 0.6), 0 0 32px rgba(var(--accent-rgb), 0.35);
}

.hero-tagline {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 26px;
    max-width: 46ch;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.hero-cta button {
    font-size: 14px;
    padding: 14px 24px;
}

@media (max-width: 760px) {
    .hero {
        padding: 30px 8px 24px;
    }

    .hero-title {
        font-size: 26px;
    }
}

p {
    margin: 4px 0;
}

/* ---------- FORMS ---------- */
label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin: 8px 0 2px;
}

input, select {
    width: 100%;
    padding: 11px 12px;
    margin: 4px 0;
    background: var(--field);
    border: 1px solid #2a3b52;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

input::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

input:hover, select:hover {
    border-color: #3a5170;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

/* Inputs sharing a row with a button (chat box, trade cash fields
   inline with a partner select) shouldn't force width:100% and push
   siblings onto their own line. */
.list-inline input, .list-inline select {
    width: auto;
    flex: 1 1 160px;
    margin: 0;
}

button {
    padding: 11px 16px;
    background: linear-gradient(160deg, #17e6ff, var(--accent) 55%);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    color: #001217;
    font-weight: bold;
    cursor: pointer;
    margin: 4px 4px 4px 0;
    transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), filter var(--fast) var(--ease);
    font-family: inherit;
    font-size: 13px;
    min-height: 42px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3), 0 6px 16px rgba(var(--accent-rgb), 0.22);
}

button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3), 0 10px 20px rgba(var(--accent-rgb), 0.3);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 4px 10px rgba(var(--accent-rgb), 0.25);
}

button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.4);
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

button.secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid #2a3b52;
    box-shadow: none;
}

button.secondary:hover {
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.25);
}

button.danger-btn {
    background: linear-gradient(160deg, #ff7a7a, var(--danger) 60%);
    color: #2a0000;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3), 0 6px 16px rgba(var(--danger-rgb), 0.25);
}

a {
    color: var(--accent2);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---------- COMPACT ROWS (players / properties / log) ---------- */
.row-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.row-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.row-item.self {
    border-left: 3px solid var(--accent2);
    background: rgba(var(--accent2-rgb), 0.05);
}

.row-item .name {
    font-weight: bold;
    min-width: 70px;
}

.owner-header {
    color: var(--accent2);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    margin: 12px 0 4px 0;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.row-list > .owner-header:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.group-header {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 6px 0 2px 4px;
}

.log-list, #chat-messages {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    /* Newest entries are placed first in the DOM (see game.php), so a
       normal top-to-bottom column keeps scrollTop=0 == "showing the
       latest" reliably. column-reverse was used here before, but
       browsers are inconsistent about where a reversed flex/scroll
       container starts scrolled to by default. */
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.log-list::-webkit-scrollbar, #chat-messages::-webkit-scrollbar {
    width: 8px;
}

.log-list::-webkit-scrollbar-track, #chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.log-list::-webkit-scrollbar-thumb, #chat-messages::-webkit-scrollbar-thumb {
    background: #24405a;
    border-radius: 8px;
}

.log-list p, #chat-messages p {
    margin: 0;
    padding: 5px 8px;
    border-bottom: 1px solid var(--line-soft);
}

.log-list p:last-child, #chat-messages p:last-child {
    border-bottom: none;
}

@keyframes logFlash {
    from { background: rgba(255, 204, 0, 0.35); }
    to { background: transparent; }
}

.log-list p.newest {
    animation: logFlash 2.5s ease-out;
}

/* ---------- BADGES ---------- */
.badge {
    display: inline-block;
    padding: 4px 9px;
    background: #1a2636;
    border: 1px solid #2a3b52;
    border-radius: 999px;
    font-size: 11px;
    white-space: nowrap;
}

.badge.gold {
    background: rgba(var(--accent2-rgb), 0.12);
    border-color: var(--accent2);
    color: var(--accent2);
}

.donator-name {
    color: var(--accent2);
    font-weight: bold;
    text-shadow: 0 0 6px rgba(255, 204, 0, 0.5);
}

.danger {
    color: var(--danger);
}

.success {
    color: var(--success);
}

.muted {
    color: var(--muted);
    font-size: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    display: block;
    overflow-x: auto;
}

table th, table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line-soft);
}

table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

table th {
    color: var(--accent);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.list-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

ul {
    margin: 6px 0;
    padding-left: 22px;
}

ul li {
    margin: 4px 0;
}
