@font-face {
    font-family: 'CustomFont';
    src: url('../assets/fonts/font.ttf') format('truetype');
}

body {
    margin: 0;
    font-family: 'CustomFont', sans-serif;
    background: linear-gradient(135deg, #e0e0e0, #34495e);
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    position: relative;
    touch-action: manipulation;
}

.game-container {
    width: 86vw;
    max-width: 380px;
    background: #1e1e1e;
    border-radius: 15px;
    padding: 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
    text-align: center;
    position: relative;
    margin-bottom: 100px;
    font-family: 'CustomFont', sans-serif;
}

.home-link {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #333;
    border: 2px solid #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ecf0f1;
    font-size: 0.9em;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}

.home-link:active {
    background: #1EE6FF;
    border-color: #1EE6FF;
    transform: scale(0.9);
}

.score-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.score-box {
    background: #2a2a2a;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #e6e6e6;
    min-width: 60px;
    text-align: center;
}

.timer-bar {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    margin-bottom: 12px;
    overflow: hidden;
}

.timer-fill {
    height: 100%;
    width: 100%;
    background: #1EE6FF;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.hole {
    aspect-ratio: 1;
    background: #2a2a2a;
    border: 2px solid #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2em;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    overflow: hidden;
}

.hole:active {
    transform: scale(0.9);
}

.hole.mole {
    border-color: #F50055;
    background: #3a1a1a;
    animation: popUp 0.2s ease;
}

.hole.whacked {
    border-color: #66FF0E;
    background: #1a3a1a;
    animation: whack 0.3s ease;
}

.hole.bomb {
    border-color: #FFE300;
    background: #3a3a1a;
}

@keyframes popUp {
    0% { transform: scale(0.7); }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes whack {
    0% { transform: scale(1); }
    30% { transform: scale(0.85); }
    100% { transform: scale(1); }
}

.status {
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: #ecf0f1;
    font-family: 'CustomFont', sans-serif;
}

.result {
    font-size: 1.2em;
    font-weight: bold;
    display: none;
    color: #ecf0f1;
    margin-bottom: 8px;
    font-family: 'CustomFont', sans-serif;
}

.result.win {
    color: #66FF0E;
    transform: scale(1.1);
}

.result.lose {
    color: #F50055;
    transform: scale(1.1);
}

.button-container {
    display: flex;
    justify-content: center;
}

.play-again {
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    margin-top: 6px;
    font-family: 'CustomFont', sans-serif;
    background: #28a745;
    color: #fff;
    border: none;
}

.play-again:active {
    color: #28a745;
    background: #fff;
}

*:focus, *:active {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ecf0f1;
    font-size: 0.8em;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    padding: 10px 20px;
    box-sizing: border-box;
    background: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    font-family: 'CustomFont', sans-serif;
}

.footer-content {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 10px;
}

.footer-links {
    text-align: center;
    margin-top: 10px;
}

.terms-link {
    color: #8a2be2;
    text-decoration: none;
}

@media (max-width: 420px) {
    .game-container {
        padding: 12px;
        margin-bottom: 80px;
    }
    .hole {
        font-size: 1.8em;
    }
    .score-box {
        padding: 6px 8px;
        min-width: 55px;
        font-size: 0.8rem;
    }
}
