/* Base Setup & Animated Background */
:root {
    /* Fix iOS viewport height issue */
    --vh: 100svh;
}

body {
    margin: 0;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    color: #333;
    touch-action: none;
    /* Khóa hoàn toàn scroll và zoom */
    overscroll-behavior: none;
    -webkit-user-select: none;
    /* Chống bôi đen text */
    user-select: none;
    height: var(--vh);
    width: 100vw;
    display: flex;
    flex-direction: column;
}

/* Chống kéo thả ảnh */
img {
    -webkit-user-drag: none;
}

.bg-gradient-animated {
    background: linear-gradient(-45deg, #00a1e9, #ffffff, #ffcc00, #ff0000);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Glassmorphism Classes */
.glass {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Ergonomic Mobile Controls */
.control-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08), inset 0 3px 5px rgba(255, 255, 255, 0.9);
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #00a1e9;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.control-btn.active,
.control-btn:active {
    transform: scale(0.9) translateY(4px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.05);
    color: #ff0000;
}

.control-btn svg {
    width: 26px;
    /* Đã thu nhỏ icon */
    height: 26px;
    stroke: currentColor;
    stroke-width: 3.5;
}

/* Premium Play Button */
.btn-play {
    background: linear-gradient(135deg, #00a1e9 0%, #007bb5 100%);
    box-shadow: 0 10px 20px rgba(0, 161, 233, 0.3);
    transition: all 0.2s ease;
}

.btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(0, 161, 233, 0.4);
}

.btn-play:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 5px 10px rgba(0, 161, 233, 0.3);
}

/* Character Select Button Styling */
.char-btn.active {
    border-color: #00a1e9;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 4px rgba(0, 161, 233, 0.3);
    transform: scale(1.05);
}

/* Custom Scrollbar for Settings Menu */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 161, 233, 0.4);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 161, 233, 0.6);
}