body {
    background: #1a1a2e;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.5s ease;
}

body.correct-bg {
    background-color: #163d2f;
}

body.wrong-bg {
    background-color: #3d161a;
}

.uk-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    min-width: 320px;
}
.header {
    text-align: center;
    margin-bottom: 30px;
}
.header .bits {
    font-size: 1.5rem;
    color: #e94560;
    font-weight: bold;
    user-select: none;
    -webkit-user-select: none;
}


.number-display {
    text-align: center;
    font-size: 3rem;
    font-weight: bold;
    padding: 40px 20px;
    background: #16213e;
    border-radius: 10px;
    margin-bottom: 30px;
    word-break: break-all;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.number-pop {
    animation: pop 0.3s ease-out;
}

@keyframes pop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}
.buttons button {
    flex: 1;
    padding: 20px;
    font-size: 1.3rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.1s;
}
.buttons button:active {
    transform: scale(0.95);
}
.btn-yes {
    background: #4ecca3;
    color: #1a1a2e;
}
.btn-no {
    background: #e94560;
    color: #fff;
}
.keyboard-focus,
.buttons button:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
}
.result {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
    transition: all 0.3s ease;
}
.result.correct {
    background: #4ecca3;
    color: #1a1a2e;
    display: block;
    box-shadow: 0 0 20px rgba(78, 204, 163, 0.5);
    animation: pulse 0.5s ease-out;
}
.result.wrong {
    background: #e94560;
    color: #fff;
    display: block;
    animation: shake 0.4s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}
.result .factor {
    font-size: 1.2rem;
    margin-top: 10px;
    opacity: 0.9;
}
.next-btn {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 1.2rem;
    background: #fff;
    color: #1a1a2e;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.result.cheat-mode::before {
    content: '👀 作弊模式';
    display: block;
    font-size: 0.9rem;
    margin-bottom: 10px;
    opacity: 0.8;
}
