body {
    font-family: 'Arial', sans-serif;
    margin: 0; padding: 0;
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh;
    flex-direction: column;
    overflow: hidden;
    background-color: #ffe0f0;
}

.main-container {
    width: 90%; max-width: 500px;
    background-color: transparent;
    padding: 0; border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative; z-index: 1;
    overflow: hidden;
}

.screen {
    background-size: cover; background-position: center 30%; background-repeat: no-repeat;
    background-image: linear-gradient(rgba(255, 255, 255, 0.0), rgba(255, 255, 255, 0.0)), var(--screen-background-image) !important;
    padding: 40px;
    border-radius: inherit;
    min-height: 400px;
    display: flex; flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%; box-sizing: border-box;
}

#pre-quiz-screen { --screen-background-image: url('background1.webp'); }
#quiz-screen { --screen-background-image: url('background.webp'); }

#quiz-screen.quiz-finished-bg {
    background-image: url('background2.webp') !important;
    background-color: transparent !important;
    padding-top: 100px;
    justify-content: flex-start;
}

#pre-quiz-screen h2 { font-size: 28px; color: #2c3e50; margin-bottom: 15px; }
#pre-quiz-screen p { font-size: 18px; color: #666; margin-bottom: 25px; }
#employee-id-input {
    width: calc(100% - 40px);
    padding: 12px 20px;
    margin-top: 220px; margin-bottom: 30px;
    border: 1px solid #ddd; border-radius: 5px;
    font-size: 16px; box-sizing: border-box;
}

.button-group {
    display: flex; justify-content: center; align-items: center;
    flex-wrap: nowrap;
    gap: 10px; margin-top: 0px; width: 100%;
}

#question {
    font-size: 28px; color: #2c3e50;
    margin-bottom: 0px;
    height: 180px;
    display: flex; align-items: center; justify-content: center;
    word-break: keep-all; line-height: 1.3;
}

.buttons {
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 0px; margin-top: 20px;
    gap: 50px;
}

.btn {
    background-color: #3498db;
    color: white; border: 3px solid transparent;
    padding: 12px 18px; font-size: 18px; border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease-out, box-shadow 0.1s ease-out;
    flex-grow: 1; flex-shrink: 1; flex-basis: auto; max-width: 180px;
}

.btn:hover { background-color: #2980b9; }

.o-btn {
    background-image: url('o_button.png');
    background-size: contain; background-repeat: no-repeat; background-position: center;
    background-color: transparent;
    padding: 20px 25px; font-size: 0; color: transparent;
}

.o-btn:hover { background-color: rgba(33, 147, 80, 0.1); }

.x-btn {
    background-image: url('x_button.png');
    background-size: contain; background-repeat: no-repeat; background-position: center;
    background-color: transparent;
    padding: 20px 25px; font-size: 0; color: transparent;
}

.x-btn:hover { background-color: rgba(192, 57, 43, 0.1); }

.o-btn:active, .x-btn:active {
    transform: translateY(2px);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.correct-btn { border: 3px solid #27ae60; }
.incorrect-btn { border: 3px solid #e74c3c; }

#result-message {
    font-size: 24px; font-weight: bold;
    height: 30px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    margin-top: 20px;
}

#score-display { font-size: 22px; margin-top: 20px; color: #333; }

.timer-display { font-size: 22px; font-weight: bold; color: #333; margin-bottom: 20px; }

.ranking-section { background-color: transparent; box-shadow: none; }

#ranking-section-final {
    background-color: #e0f2f7;
    background-image: none; background-blend-mode: normal;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 15px; margin-top: 20px; border-radius: 8px;
    max-width: 450px; max-height: 280px;
    overflow-y: auto;
    margin-left: auto; margin-right: auto;
    box-sizing: border-box;
    position: relative; z-index: 2;
}

.ranking-section h2, .ranking-section h3 { font-size: 24px; color: #333; margin-bottom: 20px; }

.ranking-list { list-style: none; padding: 0; text-align: left; margin-bottom: 20px; border-top: 1px solid rgba(238, 238, 238, 0.8); }

.ranking-list li {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 12px 15px; border-bottom: 1px solid rgba(238, 238, 238, 0.8);
    font-size: 14px; color: #555;
    display: flex; justify-content: space-between; align-items: center;
}

.ranking-list li:first-child { border-top: none; }
.ranking-list li:nth-child(odd) { background-color: rgba(252, 252, 252, 0.8); }
.ranking-list li .rank-number { font-weight: bold; color: #007bff; margin-right: 10px; min-width: 20px; }
.ranking-list li .player-info { flex-grow: 1; }
.ranking-list li .score-time { font-weight: bold; color: #28a745; margin-left: 10px; white-space: nowrap; }

.restart-btn { background-color: #f39c12; }
.restart-btn:hover { background-color: #e67e22; }

.question-counter { font-size: 18px; color: #888; margin-bottom: 10px; font-weight: bold; }

#custom-alert-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex; justify-content: center; align-items: center; z-index: 1000;
}

#custom-alert-box {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px; border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 400px; width: 90%; text-align: center;
}

#custom-alert-title { font-size: 26px; color: #2c3e50; margin-bottom: 15px; }
#custom-alert-message { font-size: 18px; color: #666; margin-bottom: 25px; }
#custom-alert-ok-btn { background-color: #3498db; padding: 10px 25px; font-size: 18px; }
#custom-alert-ok-btn:hover { background-color: #2980b9; }

#ranking-modal-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex; justify-content: center; align-items: center; z-index: 1010;
}

#ranking-modal-box {
    background-color: #e0f2f7;
    padding: 30px; border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 400px; width: 90%; text-align: center;
    box-sizing: border-box;
    max-height: 80vh; overflow-y: auto;
}
#ranking-modal-box h3 { font-size: 26px; color: #333; margin-bottom: 20px; }
#ranking-modal-box .ranking-list { margin-bottom: 20px; }
#ranking-modal-close-btn { background-color: #555; }
#ranking-modal-close-btn:hover { background-color: #333; }






#start-quiz-btn,
#restart-button,
#show-initial-ranking-btn {
    width: 195px; /* 🚨🚨🚨 버튼의 가로 길이 명시 */
    height: 60px; /* 🚨🚨🚨 버튼의 세로 길이 명시 */

    background-image: none; /* 일단 배경 이미지 제거 (아래서 다시 설정) */
    background-color: transparent !important; /* 버튼 배경색 투명하게 */
    border: none !important; /* 버튼 테두리 제거 */
    box-shadow: none !important; /* 그림자 제거 */

    padding: 0 !important; /* 내부 패딩 제거 */
    font-size: 0 !important; /* 텍스트 크기 0으로 */
    color: transparent !important; /* 텍스트 색상 투명하게 */

    /* 버튼 내 이미지 관련 */
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover; /* 🚨🚨🚨 버튼 영역을 이미지가 꽉 채우도록 */

    /* 클릭 시 애니메이션 */
    transition: transform 0.1s ease;
}

#start-quiz-btn:active,
#restart-button:active,
#show-initial-ranking-btn:active {
    transform: scale(0.98); /* 버튼 누르면 살짝 줄어드는 효과 */
}

/* 각 버튼 이미지 적용 */
#start-quiz-btn {
    background-image: url('sta.webp');
}

#restart-button {
    background-image: url('re.webp');
}

#show-initial-ranking-btn {
    background-image: url('ran.webp');

}



