/* Стили для игры "Угадай слово" с изоляцией через префикс wordle- */
.wordle-game-wrapper {
    width: 100%;
    max-width: 500px;
    height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wordle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #2c3e50;
    color: white;
    flex-shrink: 0;
}

.wordle-header-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.wordle-header-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.wordle-title {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
    text-align: center;
    margin: 0;
}

.wordle-game-container {
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
    flex: 1;
    overflow: hidden;
}

.wordle-board {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 4px;
    margin-bottom: 10px;
    height: 220px;
}

.wordle-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

.wordle-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid #d3d6da;
    border-radius: 4px;
    background-color: white;
    text-transform: uppercase;
}

.wordle-cell.wordle-filled {
    border-color: #878a8c;
    animation: wordle-pop 0.1s;
}

@keyframes wordle-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.wordle-correct {
    background-color: #6aaa64;
    border-color: #6aaa64;
    color: white;
}

.wordle-present {
    background-color: #c9b458;
    border-color: #c9b458;
    color: white;
}

.wordle-absent {
    background-color: #787c7e;
    border-color: #787c7e;
    color: white;
}

.wordle-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.wordle-control-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.wordle-control-btn {
    flex: 1;
    padding: 10px;
    background: #d3d6da;
    color: #2c3e50;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.wordle-control-btn:active {
    background: #bdc3c7;
}

.wordle-control-btn.wordle-primary {
    background: #6aaa64;
    color: white;
}

.wordle-control-btn.wordle-primary:active {
    background: #5b9955;
}

.wordle-control-btn.wordle-warning {
    background: #c9b458;
    color: white;
}

.wordle-control-btn.wordle-warning:active {
    background: #b8a44e;
}

.wordle-hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wordle-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    z-index: 10000;
    text-align: center;
    display: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid #e0e0e0;
    width: 80%;
    max-width: 300px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wordle-message.wordle-show {
    display: block;
    animation: wordle-fadeIn 0.3s;
}

@keyframes wordle-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wordle-message h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #2c3e50;
}

.wordle-message p {
    margin-bottom: 15px;
    line-height: 1.4;
    color: #7f8c8d;
    font-size: 14px;
}

.wordle-message-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.wordle-message-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    flex: 1;
}

.wordle-message-btn.wordle-primary {
    background: #6aaa64;
    color: white;
}

.wordle-message-btn.wordle-secondary {
    background: #3498db;
    color: white;
}

.wordle-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
}

.wordle-overlay.wordle-show {
    display: block;
}

.wordle-header-right-buttons {
    display: flex;
    gap: 5px;
}

/* Адаптивность */
@media (max-width: 500px) {
    .wordle-game-wrapper {
        height: 380px;
    }
    
    .wordle-cell {
        font-size: 16px;
    }
    
    .wordle-control-btn {
        padding: 8px;
        font-size: 12px;
    }
}