:root {
            --bg1: #ead4a5;
            --bg2: #f7edd3;
            --panel: rgba(98, 53, 27, 0.95);
            --text: #fff;
            --green: #37b24d;
            --red: #d94841;
            --blue: #4c8bf5;
            --gold: #d9a441;
            --purple: #8b5cf6;
        }

        * {
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        html, body {
            margin: 0;
            padding: 0;
            min-height: 100%;
            font-family: Arial, Helvetica, sans-serif;
            background: linear-gradient(180deg, var(--bg1), var(--bg2));
        }

        body {
            color: #222;
        }

        .wrap {
            width: min(1180px, 94vw);
            margin: 0 auto;
            padding: 28px 0 40px;
        }

        .hero {
            text-align: center;
            padding: 18px 0 12px;
        }

        .hero h1 {
            margin: 0;
            font-size: clamp(34px, 7vw, 68px);
            color: #6e3018;
            text-shadow: 0 3px 0 rgba(255,255,255,0.45);
        }

        .hero p {
            margin: 10px 0 0;
            color: #7a4b2a;
            font-size: 16px;
            font-weight: 700;
        }

        .grid {
            display: grid;
            grid-template-columns: 420px 1fr;
            gap: 18px;
            margin-top: 22px;
        }

        .panel {
            background: var(--panel);
            color: var(--text);
            border-radius: 20px;
            padding: 22px;
            box-shadow: 0 18px 40px rgba(0,0,0,0.18);
        }

        .panel h2 {
            margin: 0 0 14px;
        }

        label {
            display: block;
            font-weight: 800;
            margin: 0 0 8px;
        }

        input {
            width: 100%;
            border: none;
            outline: none;
            border-radius: 12px;
            padding: 14px;
            font-size: 16px;
            margin-bottom: 10px;
        }

        .hint {
            font-size: 12px;
            opacity: 0.86;
            margin-bottom: 10px;
        }

        .rowBtns {
            display: flex;
            gap: 12px;
            margin-top: 14px;
            flex-wrap: wrap;
        }

        button, a.gameBtn {
            border: none;
            cursor: pointer;
            border-radius: 12px;
            padding: 12px 16px;
            font-size: 15px;
            font-weight: 900;
            color: #fff;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .btn-green { background: linear-gradient(180deg, #3acb54, #2ca544); }
        .btn-blue { background: linear-gradient(180deg, #62a4ff, #387cf0); }
        .btn-red { background: linear-gradient(180deg, #ec5c5c, #cf3e3e); }
        .btn-gold { background: linear-gradient(180deg, #f6c35d, #dfa132); }
        .btn-purple { background: linear-gradient(180deg, #a67cff, #7c4dff); }
        .btn-gray { background: linear-gradient(180deg, #8f8f8f, #6f6f6f); }

        #authMessage {
            min-height: 24px;
            margin-top: 14px;
            color: #ffe8a3;
            font-weight: 800;
        }

        #userCard {
            display: none;
            background: rgba(255,255,255,0.12);
            border-radius: 16px;
            padding: 14px;
            margin-top: 16px;
        }

        #welcomeText {
            font-weight: 900;
            font-size: 18px;
            margin-bottom: 8px;
        }

        #identityText {
            font-size: 13px;
            color: #ffe9b4;
            font-weight: 800;
            margin-bottom: 8px;
        }

        .statsBlock {
            background: rgba(255,255,255,0.09);
            border-radius: 14px;
            padding: 12px;
            margin-top: 10px;
        }

        .statsBlockTitle {
            font-size: 14px;
            font-weight: 900;
            color: #ffe9b4;
            margin-bottom: 6px;
        }

        .statsLine {
            font-size: 14px;
            line-height: 1.6;
            color: #fff;
        }

        .guestNotice {
            margin-top: 10px;
            font-size: 14px;
            line-height: 1.7;
            color: #fff4c7;
            background: rgba(255,255,255,0.08);
            border-radius: 12px;
            padding: 10px 12px;
        }

        .gameList {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 14px;
        }

        .gameItem {
            background: rgba(255,255,255,0.09);
            border-radius: 18px;
            padding: 18px;
            min-height: 210px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .gameItem h3 {
            margin: 0 0 8px;
            font-size: 24px;
        }

        .gameItem p {
            margin: 0 0 14px;
            line-height: 1.7;
            color: rgba(255,255,255,0.9);
            font-size: 14px;
        }

        .statusLine {
            margin-top: 10px;
            font-size: 13px;
            color: #ffe4ad;
        }

        .miniStats {
            margin-top: 10px;
            font-size: 13px;
            line-height: 1.6;
            color: #f8ebc8;
            white-space: pre-line;
        }

        @media (max-width: 900px) {
            .grid {
                grid-template-columns: 1fr;
            }
        }