/* Back button */
.back-btn {
    background: none; border: none; font-family: inherit;
    position: fixed; top: 0.4rem; left: 0.4rem;
    z-index: 5; font-size: 1rem; font-weight: 700; color: #8b7e74;
    cursor: pointer; width: 32px; height: 32px;
    border-radius: 50%; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.85); backdrop-filter: blur(4px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.back-btn:hover { color: #e17055; background: #fff; }
.back-btn-sm { width: 28px; height: 28px; font-size: 0.9rem; top: 0.35rem; left: 0.35rem; }

@keyframes popIn {
    0%   { transform: scale(0.85); opacity: 0; }
    55%  { transform: scale(1.04); opacity: 1; }
    75%  { transform: scale(0.97); }
    100% { transform: scale(1);    opacity: 1; }
}
@keyframes slideUpFade {
    0%   { transform: translateY(14px); opacity: 0; }
    100% { transform: translateY(0);    opacity: 1; }
}
@keyframes fadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%      { transform: translateX(-7px); }
    30%      { transform: translateX(7px); }
    45%      { transform: translateX(-5px); }
    60%      { transform: translateX(5px); }
    75%      { transform: translateX(-3px); }
    90%      { transform: translateX(3px); }
}
@keyframes bounceCorrect {
    0%   { transform: scale(0.92); }
    40%  { transform: scale(1.05); }
    65%  { transform: scale(0.97); }
    85%  { transform: scale(1.01); }
    100% { transform: scale(1); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 2px 12px rgba(0,180,120,0.08); }
    50%      { box-shadow: 0 4px 20px rgba(0,180,120,0.16); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastSlideUp {
    0%   { transform: translateX(-50%) translateY(20px); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0);    opacity: 1; }
}
@keyframes confettiFall {
    0%   { transform: translateY(-30px) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translateY(50px) rotate(540deg) scale(0.2); opacity: 0; }
}

/* -- Language selector -------------------------------- */
.options {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}
.options label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #8b7e74;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.options select {
    background: #fff;
    border: 2px solid #e8ddd3;
    color: #2d3436;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.options select:hover { border-color: #f0b89a; transform: scale(1.03); }
.options select:focus {
    outline: none;
    border-color: #e17055;
    box-shadow: 0 0 0 3px rgba(225,112,85,0.15);
}

/* -- Button-group selectors ------------------------ */
.btn-group {
    display: flex;
    gap: 0.35rem;
}
.btn-group-btn {
    background: #fff;
    border: 2px solid #e8ddd3;
    color: #8b7e74;
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s, background 0.2s, color 0.2s;
    white-space: nowrap;
}
.btn-group-btn:hover {
    border-color: #f0b89a;
    transform: scale(1.04);
}
.btn-group-btn.active {
    background: #6c5ce7;
    border-color: #6c5ce7;
    color: #fff;
    box-shadow: 0 2px 8px rgba(108,92,231,0.24);
}
.btn-group-btn.active:hover {
    border-color: #5848c2;
    background: #5848c2;
}
.selector-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #8b7e74;
    white-space: nowrap;
}

/* -- Swipe throw-away animation ----------------- */
.challenge-box.swiping-red {
    border-color: #e17055 !important;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%) !important;
    box-shadow: 0 4px 20px rgba(225,112,85,0.2) !important;
}
.challenge-box.throw-left {
    animation: throwLeft 0.4s ease-in forwards;
}
.challenge-box.throw-right {
    animation: throwRight 0.4s ease-in forwards;
}
@keyframes throwLeft {
    to { transform: translateX(-120%); opacity: 0; }
}
@keyframes throwRight {
    to { transform: translateX(120%); opacity: 0; }
}
.challenge-box.pop-in {
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
