* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

h1 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 15px;
}

.stats-container {
    display: flex;
    justify-content: space-between;
    background: #fff;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-weight: bold;
    font-size: 0.9rem;
}

.stat-good { color: #2ecc71; }
.stat-bad { color: #e74c3c; }

.card-container {
    perspective: 1000px;
    width: 100%;
    height: 280px;
    margin-bottom: 20px;
    cursor: pointer;
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-radius: 15px;
}

.card.is-flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
}

.card-front { background-color: #ffffff; color: #2c3e50; }
.card-back { background-color: #34495e; color: #ffffff; transform: rotateY(180deg); }

.phrase { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
.card-front .phrase { color: #2980b9; }

.example {
    margin-top: 15px;
    font-size: 0.95rem;
    font-style: italic;
    color: #bdc3c7;
    border-top: 1px solid #4f5d73;
    padding-top: 12px;
    width: 100%;
}

.answer-controls, .controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 15px;
    transition: opacity 0.3s ease;
}

.id-hidden {
    opacity: 0.2;
    pointer-events: none;
}

.btn {
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
    max-width: 200px;
    transition: background 0.2s, transform 0.1s;
}

.btn:active { transform: scale(0.97); }
.btn-success { background-color: #2ecc71; color: white; }
.btn-success:hover { background-color: #27ae60; }
.btn-danger { background-color: #e74c3c; color: white; }
.btn-danger:hover { background-color: #c0392b; }
.btn-neutral { background-color: #95a5a6; color: white; }
.btn-neutral:hover { background-color: #7f8c8d; }
.btn-secondary { background-color: #3498db; color: white; }
.btn-secondary:hover { background-color: #2980b9; }
.counter { font-size: 0.85rem; color: #7f8c8d; }
