.wg-section {
    padding: 2em 1em;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    margin-bottom: 1em;
}

.timer {
    font-weight: bold;
    color: #4a90e2;
}

.panel {
    max-width: 680px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 14px;
    padding: 1em;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    align-items: center;
    justify-content: center;
    margin-bottom: 1em;
}

.controls button {
    padding: 0.6em 1.1em;
    background: #4a90e2;
    color: #fff;
    border: 1px solid #4a90e2;
    border-radius: 10px;
    cursor: pointer;
    transition: .25s;
}
.controls button[disabled]{
    opacity: .6;
    cursor: not-allowed;
}
.controls button:hover:not([disabled]) {
    background: #fff;
    color: #4a90e2;
}

.controls .tries {
    font-size: 0.95em;
    color: #555;
}

.board {
    display: grid;
    grid-auto-rows: 52px;
    row-gap: 8px;
    margin-bottom: 1em;
}

.row {
    display: grid;
    grid-template-columns: repeat(5, 52px);
    gap: 8px;
    justify-content: center;
}

.cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #d7dbe0;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    background: #f9fbfd;
}

.cell.correct  { background: #27ae60; color: #fff; border-color: #27ae60; }
.cell.present  { background: #f1c40f; color: #222; border-color: #d4aa0a; }
.cell.absent   { background: #bdc3c7; color: #fff; border-color: #b0b7bb; }

.input-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.75em;
}

.guess-input {
    width: 220px;
    padding: 0.6em 0.8em;
    border: 2px solid #4a90e2;
    border-radius: 10px;
    font-size: 1rem;
    text-transform: uppercase;
    background: #f9f9f9;
}

.input-row button {
    padding: 0.6em 1.1em;
    background: #e67e22;
    color: #fff;
    border: 1px solid #e67e22;
    border-radius: 10px;
    cursor: pointer;
    transition: .25s;
}
.input-row button:disabled { opacity: .6; cursor: not-allowed; }
.input-row button:hover:not([disabled]) {
    background: #fff;
    color: #e67e22;
}

.keyboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 680px;
    margin: 0.75em auto 0;
    user-select: none;
}

.kb-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.key {
    padding: 10px 0;
    text-align: center;
    border: 1px solid #cfd6dd;
    border-radius: 8px;
    background: #f0f4f8;
    font-weight: 700;
    cursor: pointer;
    transition: transform .05s ease, background .2s ease, color .2s ease;
    min-width: 28px;
}
.key:active { transform: scale(0.98); }
.key.disabled { opacity: .6; cursor: not-allowed; }

.key.correct { background: #27ae60; color: #fff; border-color: #27ae60; }
.key.present { background: #f1c40f; color: #222; border-color: #d4aa0a; }
.key.absent  { background: #bdc3c7; color: #fff; border-color: #b0b7bb; }

.hint {
    text-align: center;
    color: #666;
    margin-top: .75em;
    font-size: .95em;
}

/* 适配移动端 */
@media (max-width: 600px) {
    .row { grid-template-columns: repeat(5, 48px); }
    .cell { font-size: 1rem; }
    .guess-input { width: 58vw; }
    .key { min-width: 24px; padding: 8px 0; }
}