.board-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.board-row {
    display: flex;
}

.tile {
    width: 60px;
    height: 60px;
    border: 2px solid #ccc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 2px;
    text-transform: uppercase;
    background-color: white;
    transition: background-color 0.4s ease;
}

/* 타일 뒤집기 */
.flip {
    transform: rotateX(90deg);
    transition: transform 0.15s ease;
}
.flip.reveal {
    transform: rotateX(0);
}

/* 없는 단어: 흔들림 */
.shake {
    animation: shake 0.3s ease-in-out 0s 2;
}
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-8px); }
    100% { transform: translateX(0); }
}

/* 정답 맞췄을 때: 점프 */
.jump {
    animation: jump 0.5s ease;
}
@keyframes jump {
    0%   { transform: translateY(0); }
    30%  { transform: translateY(-20px); }
    60%  { transform: translateY(5px); }
    100% { transform: translateY(0); }
}


.tile.correct {
    background-color: #6aaa64; /* 초록 */
    color: white;
}

.tile.present {
    background-color: #c9b458; /* 노랑 */
    color: white;
}

.tile.absent {
    background-color: #787c7e; /* 회색 */
    color: white;
}

.keyboard-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
}

.keyboard-row {
    display: flex;
    margin: 3px 0;
}

.key {
    margin: 2px;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background-color: #d3d6da;
    color: black;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.key.wide {
    flex: 1.5;
}

.key.correct {
    background-color: #6aaa64; /* 초록 */
    color: white;
}
.key.present {
    background-color: #c9b458; /* 노랑 */
    color: white;
}
.key.absent {
    background-color: #787c7e; /* 회색 */
    color: white;
}
.key.active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

.wordle-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ranking-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-color);
    color: white;
    font-size: 1.2rem;
    padding: 12px 40px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(72, 58, 160, 0.4);
    font-weight: 600;
    margin-top: 20px;
    text-decoration: none;
}

.ranking-btn:hover {
    background-color: var(--primary-color);
    box-shadow: 0 3px 7px rgba(5, 5, 5, 0.7);
    color: white;
    text-decoration: none;
}

.new-game-link {
    background: none;
    background-color: transparent;
    border: none;
    padding: 0;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.new-game-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

