/* Reset & base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #121212;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 750px;
    width: 100%;
    background: #1e1e1e;
    padding: 30px 25px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #bb86fc;
}

.lang-selector select {
    background: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #444;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    outline: none;
    transition: 0.2s;
}
.lang-selector select:hover {
    border-color: #bb86fc;
}

/* Instructions / Example */
.instructions {
    background: #2a2a2a;
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 25px;
}

.instructions h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #cfcfcf;
}

.instructions ul {
    list-style: none;
    padding-left: 0;
}

.instructions li {
    padding: 5px 0;
    border-bottom: 1px solid #333;
    font-size: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 15px;
}
.instructions li:last-child {
    border-bottom: none;
}
.instructions .guess-example {
    color: #ffb74d;
    font-weight: 500;
}
.instructions .feedback-example {
    color: #81c784;
}

/* Game area */
.game-area {
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

#guess-input {
    flex: 1;
    min-width: 170px;
    background: #2d2d2d;
    border: 2px solid #444;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 18px;
    color: #e0e0e0;
    outline: none;
    transition: 0.3s;
    letter-spacing: 2px;
    text-align: center;
}
#guess-input:focus {
    border-color: #bb86fc;
    box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.3);
}
#guess-input:disabled {
    opacity: 0.5;
}

#guess-btn {
    background: #bb86fc;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #121212;
    cursor: pointer;
    transition: 0.2s;
}
#guess-btn:hover {
    background: #a06cdb;
    transform: scale(1.02);
}
#guess-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.message {
    min-height: 28px;
    font-size: 16px;
    padding: 6px 0;
    color: #ffb74d;
}
.message.success {
    color: #81c784;
}
.message.error {
    color: #ef5350;
}

.remaining {
    font-size: 15px;
    color: #aaa;
    margin-top: 4px;
}

/* History table */
.history {
    margin-top: 10px;
    overflow-x: auto;
}

.history h2 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #cfcfcf;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

th {
    background: #2d2d2d;
    padding: 10px 8px;
    text-align: center;
    color: #bb86fc;
    font-weight: 500;
    border-bottom: 2px solid #444;
}

td {
    padding: 9px 8px;
    text-align: center;
    border-bottom: 1px solid #333;
}

tr:hover td {
    background: #2a2a2a;
}

/* Reset button */
.reset-btn {
    display: block;
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    background: #3d3d3d;
    border: none;
    border-radius: 12px;
    color: #e0e0e0;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.reset-btn:hover {
    background: #4d4d4d;
    color: #fff;
}

/* Responsive */
@media (max-width: 500px) {
    .container {
        padding: 20px 15px;
    }
    header h1 {
        font-size: 22px;
    }
    #guess-input {
        font-size: 16px;
        padding: 10px 12px;
    }
    #guess-btn {
        padding: 10px 20px;
        font-size: 16px;
    }
}