/* ── Grundlayout ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Arial', sans-serif;
    background: url('bg.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    color: #eee;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px 60px;
}

/* ── Container ── */
.container, footer {
    position: relative;
    background: rgba(22, 33, 62, 0.8);
    border-radius: 15px;
    box-shadow: 0 0 30px rgb(253, 177, 9);
    padding: 30px;
    width: fit-content;
    max-width: 90vw;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

footer { margin-top: 30px;}

/* ── Header ── */
.header-row {
    margin-bottom: 8px;
}
h1 { font-size: 2.5rem; font-weight: 900; color: #e0c060; }
.subtitle { color: #aaa; margin-bottom: 12px; font-size: 0.95rem; }

/* ── Score-Boxen ── */
.scores-row { display: flex; gap: 8px; justify-content: center;}
.score-box {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 8px 16px;
    text-align: center;
    min-width: 90px;
}
.score-box span {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
}
.score-box strong { display: block; font-size: 1.3rem; color: #e0c060; }

/* ── Info-Zeile ── */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}
#newGameBtn, .logout-link, #submitBtn, #clearBtn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: opacity 0.2s;
}
#newGameBtn    { background: #0f3460; color: #eee; margin-right: 6px; }
.logout-link   { background: #e74c3c; color: #fff; }
#newGameBtn:hover, .logout-link:hover { opacity: 0.85; }

/* ── Schwierigkeit ── */
.difficulty-row {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #aaa;
}
select {
    background: #16213e;
    color: #eee;
    border: 1px solid #0f3460;
    border-radius: 6px;
    padding: 4px 8px;
    margin-left: 6px;
    font-size: 0.9rem;
}

/* ── Farbwähler ── */
.color-picker {
    background: #16213e;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
    text-align: center;
}
.color-picker p { font-size: 0.85rem; color: #aaa; margin-bottom: 8px; }
.pick-hint { font-size: 0.75rem; margin-top: 8px; color: #666; }

#colorBtns {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.color-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    transition: transform 0.15s, border-color 0.15s;
}
.color-btn:hover { transform: scale(1.15); border-color: #fff; }

/* ── Spielfeld ── */
#board {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.guess-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #16213e;
    border-radius: 10px;
    padding: 10px 14px;
}
.guess-row.current {
    border: 2px solid #e0c060;
}
.guess-row.reveal {
    border: 2px solid #2ecc71;
    background: #0d2b1a;
}

.circles {
    display: flex;
    gap: 10px;
}

.color-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 2px solid rgba(255,255,255,0.1);
    transition: transform 0.15s, border-color 0.15s;
}
.color-circle.clickable { cursor: pointer; }
.color-circle.clickable:hover { transform: scale(1.1); border-color: #fff; }
.color-circle.selected-slot {
    border-color: #e0c060;
    box-shadow: 0 0 10px #e0c060;
}

/* ── Feedback-Pins ── */
.pins {
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: center;
    min-width: 110px;
}
.pin {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
}
.black-pin { background: #111; border: 2px solid #fff; }
.white-pin { background: #fff; border: 2px solid #aaa; }
.empty-pin { background: #333; border: 2px solid #555; }

/* ── Aktions-Buttons ── */
.action-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
#submitBtn {
    background: #2ecc71;
    color: #fff;
    flex: 1;
    font-size: 1rem;
}
#submitBtn:disabled { background: #444; cursor: not-allowed; }
#clearBtn {
    background: #c0392b;
    color: #fff;
}
#submitBtn:not(:disabled):hover { opacity: 0.85; }
#clearBtn:hover { opacity: 0.85; }

/* ── Nachrichten ── */
#message {
    text-align: center;
    font-size: 1.1rem;
    min-height: 1.6em;
    margin-bottom: 8px;
    padding: 6px;
    border-radius: 6px;
}
.msg-win  { background: rgba(46,204,113,0.15); color: #2ecc71; }
.msg-lose { background: rgba(231,76,60,0.15);  color: #e74c3c; }

/* ── Login ── */
.login-form {
    display: flex; flex-direction: column;
    gap: 10px; margin: 16px 0; align-items: center;
}
.login-form input {
    font-size: 1rem; padding: 10px 16px;
    border-radius: 8px; border: 2px solid #0f3460;
    width: 280px; outline: none; background: #16213e; color: #eee;
    transition: border-color 0.2s;
}
.login-form input:focus { border-color: #e0c060; }
.login-form button {
    background: #0f3460; color: #fff; border: none;
    border-radius: 8px; padding: 10px 30px;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: opacity 0.2s;
}
.login-form button:hover { opacity: 0.85; }
.hint  { color: #aaa; font-size: 0.85rem; text-align: center; }
.error { color: #e74c3c; font-weight: bold; margin: 8px 0; text-align: center; }

/* ── Regeln ── */
.rules-box {
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 20px;
    text-align: left;
}
.rules-box h3 { margin-bottom: 10px; color: #e0c060; }
.rules-box ul { padding-left: 20px; }
.rules-box li { margin: 6px 0; color: #ccc; font-size: 0.9rem; }

/* ── Highscore ── */
.highscore-box {
    width: 100%; max-width: 520px;
    margin-top: 28px; background: rgba(22, 33, 62, 0.8);
    border-radius: 10px; padding: 20px; box-shadow: 0 0 30px rgb(253, 177, 9);
    border: 1px solid #0f3460;
}
.highscore-box h2 { margin-bottom: 12px; color: #e0c060; }
.highscore-box table { width: 100%; border-collapse: collapse; }
.highscore-box th, .highscore-box td {
    padding: 8px 10px; text-align: center;
    border-bottom: 1px solid #0f3460; color: #eee;
}
.highscore-box th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: #aaa; }
tr.rank-1 { background: rgba(255,215,0,0.15); }
tr.rank-2 { background: rgba(192,192,192,0.1); }
tr.rank-3 { background: rgba(205,127,50,0.1); }
tr.own-score td { color: #e0c060; font-weight: bold; }

/* ── Responsive ── */
@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    .color-circle { width: 36px; height: 36px; font-size: 1rem; }
    .color-btn    { width: 36px; height: 36px; font-size: 1.1rem; }
}