/* PicnicDays — blocky/voxel arcade theme */

:root {
    --bg: #fdeaf0;          /* light subtle pink */
    --bg-deep: #f6c6d5;
    --panel: #fffdf5;
    --ink: #3d2333;        /* deep plum — pairs with the pink bg */
    --brand: #f5c93c;       /* gold */
    --brand-dark: #b58a12;
    --accent: #3a63c4;      /* lapis */
    --danger: #d84f3f;
    --shadow: #3d2333;
    --radius: 4px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Nunito', system-ui, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(rgba(255, 255, 255, 0.04) 50%, transparent 50%) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 50%, transparent 50%) 0 0 / 32px 32px,
        var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, .logo, .btn, .tile-badge, .bucks-chip {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-weight: 600;
}

/* ---------- header ---------- */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 20px;
    background: var(--ink);
    border-bottom: 6px solid var(--brand);
}

.logo {
    color: #fff;
    font-size: 26px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-block {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--brand);
    color: var(--ink);
    border: 3px solid #fff;
    box-shadow: 3px 3px 0 var(--brand-dark);
}

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

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 900;
}

.nav-link:hover { color: var(--brand); }

.nav-cta {
    background: var(--brand);
    color: var(--ink);
    padding: 8px 12px;
    border: 3px solid #fff;
    box-shadow: 3px 3px 0 var(--brand-dark);
}

.nav-cta:hover { color: var(--ink); transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--brand-dark); }

.nav-user { color: #f0d0e0; font-weight: 900; }

.bucks-chip {
    background: #56304a;
    color: var(--brand);
    font-size: 15px;
    padding: 6px 12px;
    border: 2px solid var(--brand);
}

/* ---------- layout ---------- */

.site-main {
    flex: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.site-footer {
    text-align: center;
    padding: 18px;
    background: var(--ink);
    color: #f0d0e0;
    font-weight: 700;
}

/* ---------- hero ---------- */

.hero {
    text-align: center;
    padding: 30px 10px 10px;
}

.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.25; }
.hero-accent { color: #e05a80; text-shadow: 3px 3px 0 var(--shadow); }
.hero p { font-size: 18px; font-weight: 700; }

/* ---------- buttons ---------- */

.btn {
    display: inline-block;
    background: var(--brand);
    color: var(--ink);
    border: 3px solid var(--ink);
    box-shadow: 4px 4px 0 var(--shadow);
    padding: 12px 20px;
    font-size: 17px;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-big { font-size: 19px; }

/* ---------- game tiles ---------- */

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 28px;
}

.tile {
    background: var(--panel);
    border: 4px solid var(--ink);
    box-shadow: 6px 6px 0 var(--shadow);
    padding: 18px;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.tile h2 { font-size: 21px; margin: 6px 0 0; line-height: 1.25; }
.tile p { margin: 0; font-weight: 700; }

.tile-art {
    font-size: 54px;
    line-height: 1;
    background: var(--bg-deep);
    border: 3px solid var(--ink);
    padding: 18px 0;
    text-align: center;
}

.tile-live:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--shadow); }

.tile-soon { opacity: 0.82; }
.tile-soon .tile-art { filter: grayscale(0.35); }

.tile-best { color: var(--accent); }

.tile-badge {
    align-self: flex-start;
    font-size: 14px;
    padding: 7px 10px;
    border: 2px solid var(--ink);
    margin-top: auto;
}

.badge-play { background: var(--brand); }
.badge-soon { background: #d8d3c2; }

.tile-market { border-color: var(--accent); }

/* ---------- auth forms ---------- */

.auth-card {
    max-width: 460px;
    margin: 30px auto;
    background: var(--panel);
    border: 4px solid var(--ink);
    box-shadow: 6px 6px 0 var(--shadow);
    padding: 26px;
}

.auth-card h1 { font-size: 27px; line-height: 1.25; }
.auth-sub { font-weight: 700; }

.auth-card label {
    display: block;
    font-weight: 900;
    margin: 16px 0 6px;
}

.auth-card input {
    width: 100%;
    padding: 12px;
    font: inherit;
    font-weight: 700;
    border: 3px solid var(--ink);
    background: #fff;
}

.auth-card input:focus { outline: 3px solid var(--brand); }
.auth-card .btn { margin-top: 22px; width: 100%; text-align: center; }
.auth-alt { margin-top: 18px; font-weight: 700; }

.alert {
    background: #fdeae7;
    border: 3px solid var(--danger);
    padding: 4px 14px;
    font-weight: 700;
    margin: 14px 0;
}

/* ---------- game page ---------- */

.game-wrap {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 10px;
}

.game-title { font-size: 25px; line-height: 1.25; margin: 0 0 14px; }

.game-side {
    background: var(--panel);
    border: 4px solid var(--ink);
    box-shadow: 6px 6px 0 var(--shadow);
    padding: 18px;
    width: 200px;
}

.stat-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px dashed #c9c2ac;
    padding: 8px 0;
    font-weight: 900;
}

.stat-box strong { font-family: 'Fredoka', 'Nunito', sans-serif; font-size: 19px; }

.next-box { flex-direction: column; align-items: flex-start; gap: 8px; }
.next-box canvas { border: 3px solid var(--ink); background: #101418; align-self: center; }

.controls-hint { font-size: 13px; font-weight: 700; color: #8a6a7c; line-height: 1.7; }

.game-stage { position: relative; }

#game-canvas {
    border: 4px solid var(--ink);
    box-shadow: 6px 6px 0 var(--shadow);
    background: #101418;
    display: block;
    max-width: 100%;
    height: auto;
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 20, 24, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.game-overlay.hidden { display: none; }

.overlay-card {
    background: var(--panel);
    border: 4px solid var(--ink);
    box-shadow: 6px 6px 0 #000;
    padding: 22px;
    text-align: center;
    max-width: 260px;
}

.overlay-card h2 { font-size: 21px; line-height: 1.25; }
.overlay-card p { font-weight: 700; }

/* ---------- touch controls ---------- */

.touch-controls {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(61, 35, 51, 0.95);
    padding: 10px;
    justify-content: center;
    gap: 10px;
    z-index: 50;
}

.touch-btn {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 20px;
    background: var(--panel);
    border: 3px solid var(--ink);
    box-shadow: 3px 3px 0 #000;
    padding: 14px 18px;
    cursor: pointer;
}

.touch-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.touch-drop { background: var(--brand); font-size: 15px; }

@media (pointer: coarse) {
    .touch-controls { display: flex; }
    .site-main { padding-bottom: 120px; }
}

@media (max-width: 640px) {
    .tile-grid { grid-template-columns: 1fr; }
    .game-side { width: 100%; max-width: 300px; }
}
