:root {
    --bg-pink: #ffe6ea;
    --text-dark: #2c3e50;
    --btn-color: #27ae60;
    --btn-surrender: #e74c3c;
    --accent: #e84393;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body,
html {
    width: 100%;
    height: 100dvh;
    min-height: 100vh;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    overflow: hidden;
    background-color: var(--bg-pink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

#progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 100;
}

#progress-fill {
    height: 100%;
    width: 25%;
    background: var(--btn-color);
    transition: width 0.5s ease;
}

#status-text {
    position: absolute;
    top: 15px;
    left: 20px;
    font-weight: bold;
    color: var(--accent);
    z-index: 100;
    background: rgba(255, 255, 255, 0.7);
    padding: 5px 15px;
    border-radius: 20px;
}

.stage {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    padding: 60px 20px 20px 20px;
    text-align: center;
}

.stage.active {
    opacity: 1;
    pointer-events: all;
}

.stage.hidden {
    display: none;
}

.title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2rem, 8vw, 3.5rem);
    color: var(--accent);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1.1rem;
    color: #636e72;
    margin-bottom: 5px;
}

.subtitle.fade {
    color: #b2bec3;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.taunt-text {
    font-weight: bold;
    color: #d63031;
    font-size: 1.1rem;
    height: 25px;
    transition: opacity 0.3s;
    margin-top: 15px;
}

.taunt-text.hidden {
    opacity: 0;
}

.play-area {
    position: relative;
    width: 100%;
    flex-grow: 1;
    max-height: 50vh;
    border-radius: 20px;
    border: 2px dashed rgba(232, 67, 147, 0.3);
    overflow: hidden;
}

.troll-btn {
    position: absolute;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    background-color: var(--btn-color);
    border: none;
    border-radius: 30px;
    box-shadow: 0 10px 20px rgba(39, 174, 96, 0.4);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: transform 0.1s;
}

.troll-btn:active {
    transform: scale(0.95) !important;
    filter: brightness(0.9);
}

/* Vòng 2 clones */
.clone-btn {
    background-color: #f39c12;
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
    font-size: 1rem;
    padding: 10px 20px;
}

/* Vòng 3 Slider */
.slider-container {
    width: 90%;
    max-width: 400px;
    margin-top: 5vh;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    margin-top: -16px;
    box-shadow: 0 5px 15px rgba(232, 67, 147, 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: #dfe6e9;
    border-radius: 10px;
}

#slider-hold-text {
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.5rem;
    color: #d63031;
}

/* Vòng 4 Gyroscope */
.normal-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    background: #0984e3;
    color: white;
    border: none;
    border-radius: 30px;
    margin-top: 20px;
}

.maze-area {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 20px auto;
    background: white;
    border-radius: 50%;
    border: 10px solid #ffeaa7;
    box-shadow: inset 0 10px 30px rgba(0, 0, 0, 0.1);
}

#hole {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #2d3436;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.8);
}

#ball {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 10px 10px, #ff7675, #d63031);
    border-radius: 50%;
    top: 20px;
    left: 20px;
    box-shadow: 2px 5px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s linear;
}

/* Final */
.final-bg {
    background: linear-gradient(135deg, #fce38a, #f38181);
}

.huge-text {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 0 #d63031;
    margin-bottom: 20px;
}

.bounce {
    animation: bounceIn 1s cubic-bezier(0.28, 0.84, 0.42, 1);
}

.meme-container {
    width: clamp(250px, 70vw, 350px);
    height: clamp(250px, 70vw, 350px);
    border-radius: 20px;
    border: 8px solid #fff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    overflow: hidden;
    transform: rotate(-3deg);
    background: #fff;
}

#meme-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-box {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    max-width: 90%;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.1);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}