/* တစ်ကိုယ်လုံးစာအတွက် font နဲ့ နောက်ခံအရောင် */
body {
    background-color: #f0f2f5;
    font-family: 'Helvetica Neue', 'Hiragino Sans', 'Meiryo', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
}

.container {
    background-color: white;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.app-version {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 0.8rem;
    color: #b0b0b0;
    margin: 0;
}

h1 {
    color: #333;
    margin-top: 0;
}

/* --- Level Buttons --- */
.level-buttons {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    gap: 10px;
    position: relative;
    background-color: #e9ecef;
    border-radius: 8px;
    padding: 5px;
}

.highlight-bar {
    position: absolute;
    top: 5px;
    left: 0;
    height: calc(100% - 10px);
    background-color: #BF2A2A;
    border-radius: 5px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.level-btn {
    background-color: transparent;
    color: #495057;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.level-btn.selected {
    color: white;
}

/* --- Card Animation --- */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kanji-card-container {
    perspective: 1000px;
    min-height: 184px;
    margin: 20px 0;
}

.kanji-card-container.is-sliding {
    animation: slideInFromTop 0.5s ease-out forwards;
}

#kanji-card {
    width: 100%;
    height: 184px;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

#kanji-card.is-flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    box-sizing: border-box;
    padding: 10px;
}

.card-front, .card-back {
    background-color: #fff;
    border: 2px solid #ddd;
}

.card-back {
    transform: rotateY(180deg);
}

#kanji-display {
    font-size: 7rem;
    font-weight: bold;
    color: #333;
    line-height: 1.1;
    white-space: nowrap;
}

#answer-display .reading {
    font-size: 2.5rem;
    color: #BF2A2A;
    margin: 0;
}

#answer-display .meaning {
    font-size: 1.2rem;
    color: #555;
    margin-top: 10px;
    font-style: italic;
}

/* --- General Button Styles --- */
.button-group {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

button:hover {
    background-color: #5a6268;
}

button:active {
    transform: scale(0.95);
}

button.primary {
    background-color: #BF2A2A;
}

button.primary:hover {
    background-color: #a12323;
}

footer {
    margin-top: 30px;
    text-align: center;
    color: #888;
}