/* Coin message and animation */
#coin-message {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

#coin-message .coin {
    width: 32px;
    height: 32px;
    background: radial-gradient(circle at 60% 40%, #ffe082 70%, #bfa16a 100%);
    border: 3px solid #bfa16a;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.2s;
    box-shadow: 0 2px 8px rgba(30, 16, 8, 0.3);
    position: relative;
}

#coin-message .coin-text {
    color: #ffe082;
    font-family: 'Press Start 2P', cursive, monospace;
    font-size: 1rem;
    text-shadow: 2px 2px 0 #3e2414;
    opacity: 0;
    transition: opacity 0.2s;
}

#coin-message.active .coin {
    animation: coin-pop-fluid 0.8s cubic-bezier(.22, .68, .43, 1.01) forwards;
    opacity: 1;
}
#coin-message.active .coin-text {
    animation: text-fade 0.7s 0.2s forwards;
}

@keyframes coin-pop-fluid {
    0% { opacity: 0; transform: translateY(0) scale(1); }
    10% { opacity: 1; transform: translateY(-10px) scale(1.05); }
    30% { opacity: 1; transform: translateY(-40px) scale(1.18); }
    55% { opacity: 1; transform: translateY(-70px) scale(1.08); }
    75% { opacity: 1; transform: translateY(-90px) scale(1); }
    90% { opacity: 0.8; transform: translateY(-100px) scale(0.92); }
    100% { opacity: 0; transform: translateY(-110px) scale(0.85); }
}

@keyframes text-fade {
    0% { opacity: 0; }
    40% { opacity: 0; }
    60% { opacity: 1; }
    100% { opacity: 0; }
}

input#length {
    background: #3e2414;
    color: #ffe082;
    border: 2px solid #bfa16a;
    border-radius: 6px;
    font-family: 'Press Start 2P', cursive, monospace;
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
    width: 80px;
    text-align: center;
    margin-left: 0.5rem;
    box-shadow: 0 1px 4px rgba(30, 16, 8, 0.2);
}
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    font-family: 'Press Start 2P', cursive, monospace;
    background: #4e2e1e;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    min-height: 100vh;
}

.container {
    background: #7c4f2c;
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(30, 16, 8, 0.7);
    text-align: center;
    border: 4px solid #bfa16a;
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #ffe082;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 0 #3e2414, 4px 4px 0 #bfa16a;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

.settings {
    margin-bottom: 1.5rem;
    width: 100%;
}

.settings label, .settings div {
    display: block;
    margin: 0.7rem 0;
    color: #ffe082;
    font-weight: 700;
    text-align: center;
    font-size: 0.85rem;
    text-shadow: 1px 1px 0 #3e2414;
}

#result {
    width: 100%;
    margin: 1.5rem 0 1rem 0;
    padding: 1rem 0.5rem;
    font-size: 1.1rem;
    text-align: center;
    border: 3px double #bfa16a;
    border-radius: 8px;
    background: #3e2414;
    color: #ffe082;
    font-weight: bold;
    letter-spacing: 0.12em;
    font-family: 'Press Start 2P', cursive, monospace;
    box-shadow: 0 2px 8px rgba(30, 16, 8, 0.3);
}

button {
    padding: 0.8rem 1.5rem;
    margin: 0.3rem;
    font-size: 1rem;
    border: 2px solid #bfa16a;
    border-radius: 8px;
    background: #3e2414;
    color: #ffe082;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Press Start 2P', cursive, monospace;
    transition: background 0.2s, color 0.2s, border 0.2s;
    box-shadow: 0 2px 8px rgba(30, 16, 8, 0.2);
    text-shadow: 1px 1px 0 #3e2414;
}

button:hover {
    background: #bfa16a;
    color: #3e2414;
    border: 2px solid #ffe082;
}
