* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #1a0033 0%, #05000d 100%);
    color: white;
    overflow: hidden;
}

#bgm-container {
    position: fixed;
    top: 75px;
    right: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #ffcc00;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

#bgm-container label {
    font-size: 0.8rem;
    color: #ffcc00;
    font-weight: bold;
}

#bgm-slider {
    width: 120px;
    cursor: pointer;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('../images/biboquiz/background.jpg');
    background-size: cover;
    background-position: center;
}

.hidden {
    display: none !important;
}

.game-title {
    font-size: 4rem;
    color: #ffcc00;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
}

.game-subtitle {
    font-size: 1rem;
    color: #ffcc00;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu-btn {
    padding: 15px 40px;
    font-size: 1.5rem;
    background: #4b0082;
    color: white;
    border: 3px solid #ffcc00;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.menu-btn:hover {
    background: #6a0dad;
    transform: scale(1.05);
}

.char-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.char-card {
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid #444;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.char-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
}

.char-card span {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.char-card.selected, .char-card:hover {
    border-color: #ffcc00;
    background: rgba(255, 204, 0, 0.1);
    transform: translateY(-5px);
}

#game-screen {
    flex-direction: row;
    justify-content: space-between;
    padding: 40px;
}

.side-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 20%;
}

.side-panel img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border: 4px solid #ffcc00;
    border-radius: 50%;
    background: #111;
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.4);
}

.name-tag {
    margin-top: 15px;
    font-size: 1.2rem;
    background: #222;
    padding: 5px 15px;
    border-radius: 5px;
    border: 1px solid #ffcc00;
}

.quiz-container {
    width: 55%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.question-box {
    background: linear-gradient(135deg, #2c003e, #1f002b);
    border: 4px solid #ffcc00;
    border-radius: 15px;
    padding: 30px;
    font-size: 1.6rem;
    text-align: center;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.answer-btn {
    background: linear-gradient(135deg, #1b0033, #0f001a);
    border: 3px solid #8a2be2;
    border-radius: 10px;
    padding: 20px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    text-align: left;
    transition: 0.2s;
    min-height: 70px;
}

.answer-btn:hover:not(:disabled) {
    border-color: #ffcc00;
    background: linear-gradient(135deg, #2c003e, #1a0033);
}

.answer-btn.correct {
    background: #008000 !important;
    border-color: #adff2f !important;
}

.answer-btn.wrong {
    background: #b22222 !important;
    border-color: #ff4500 !important;
}

#timer-box {
    text-align: center;
    font-size: 1.5rem;
    color: #ffcc00;
}

#wheel-screen {
    background-color: rgba(0, 0, 0, 0.9);
}

.wheel-container {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 30px 0;
}

#wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid #ffcc00;
    position: relative;
    overflow: hidden;
    transition: transform 4s cubic-bezier(0.15, 0, 0.15, 1);
}

.slice {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    left: 0; 
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: black;
    border: 1px solid rgba(0,0,0,0.2);
    font-size: 0.85rem;
}

.slice:nth-child(1) { background: #ff4d4d; transform: rotate(0deg) skewY(-45deg); }
.slice:nth-child(2) { background: #ffa64d; transform: rotate(45deg) skewY(-45deg); }
.slice:nth-child(3) { background: #ffff4d; transform: rotate(90deg) skewY(-45deg); }
.slice:nth-child(4) { background: #4dff4d; transform: rotate(135deg) skewY(-45deg); }
.slice:nth-child(5) { background: #4da6ff; transform: rotate(180deg) skewY(-45deg); }
.slice:nth-child(6) { background: #994dff; transform: rotate(225deg) skewY(-45deg); }
.slice:nth-child(7) { background: #ff4dda; transform: rotate(270deg) skewY(-45deg); }
.slice:nth-child(8) { background: #4dffff; transform: rotate(315deg) skewY(-45deg); }

#pointer {
    position: absolute;
    top: -20px;
    left: calc(50% - 10px);
    width: 0; 
    height: 0; 
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 25px solid white;
    z-index: 10;
}

#video-screen {
    background: black;
    z-index: 100;
}

#punishment-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.game-over-title {
    font-size: 5rem;
    color: #ff3333;
    margin-bottom: 30px;
    text-shadow: 0 0 25px rgba(255, 51, 51, 0.8);
}

#intro-screen {
    z-index: 9999;
    background: #000;
    opacity: 1;
    transition: opacity 0.8s ease;
}

#intro-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

#intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}