/* Reset and Base Styles */
body {
    margin: 0;
    padding: 0;
    background-image: url('background.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center; 
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
}

#welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.welcome-logo {
    max-width: 90%;
    max-height: 60vh;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(0, 100, 255, 0.8);
}

.start-game-btn {
    background: linear-gradient(180deg, #1c941c 0%, #2dc92d 100%);
    border: 3px solid #ffd700;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    padding: 15px 60px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    text-shadow: 2px 2px 2px black;
    transition: transform 0.2s, box-shadow 0.2s;
}

.money-ladder {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column; 
    gap: 5px;
    z-index: 20;
    padding: 20px 10px;
    background: rgba(0,0,0,0.3); 
    border-radius: 0 20px 20px 0;
}

.money-step {
    background: linear-gradient(180deg, rgba(32,58,139,0.9) 0%, rgba(63,94,251,0.9) 50%, rgba(32,58,139,0.9) 100%);
    border: 2px solid #bba53d;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    color: #ffd700;
    font-weight: bold;
    text-align: center;
    text-shadow: 1px 1px 1px black;
    border-radius: 10px; 
    width: 200px;         
    padding: 10px 0;
    font-size: 1.15rem;   
    cursor: default;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.money-step.active-step {
    background: linear-gradient(180deg, rgb(255, 160, 27) 0%, rgb(255, 120, 0) 100%);
    border-color: #fff;
    color: #fff;
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 0 20px rgba(255, 140, 0, 1);
    z-index: 2;
}

.money-step.passed-step {
    opacity: 1;
    color: #fff;
    border-color: #ffd700;
}

.game-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    position: relative; 
    z-index: 5;
    height: 100vh; 
    margin-left: 220px; 
    width: calc(100% - 220px);
}

.game-button {
    background: linear-gradient(180deg, rgba(32,58,139,1) 0%, rgba(63,94,251,1) 50%, rgba(32,58,139,1) 100%);
    border: 3px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7), inset 0 0 15px rgba(0,0,0,0.4);
    color: white;
    font-weight: bold;
    text-align: center;
    text-shadow: 1px 1px 2px black;
    border-radius: 50px; 
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

.restart-btn {
    display: block;
    margin: 20px auto 0 auto;
    background: linear-gradient(180deg, #b71c1c 0%, #ff5252 50%, #b71c1c 100%);
    border: 3px solid #ffd700;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px 30px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.lifelines {
    position: absolute;
    top: 20px; 
    right: 20px; 
    display: flex;
    gap: 15px;
    z-index: 10; 
}

.lifeline-btn {
    width: 70px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; 
}

.lifeline-svg {
    width: 28px;
    height: 28px;
    fill: #ffd700; 
}

.icon-text {
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: 900;
}

.question-display-area {
    background: linear-gradient(180deg, rgba(32,58,139,0.95) 0%, rgba(63,94,251,0.95) 50%, rgba(32,58,139,0.95) 100%);
    border: 4px solid #ffd700;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    padding: 30px 50px;
    border-radius: 20px; 
    min-height: 120px; 
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px; 
}

.main-connector {
    height: 3px;
    background: #ffd700;
    margin: 20px 100px;
}

.answers-section {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 20px 60px; 
}

.answer-connector-line {
    position: absolute;
    height: 2px;
    background: #ffd700;
    top: 50%; 
    left: -20px;
    right: -20px;
    z-index: 1; 
}

.answer-btn {
    font-size: 1.3rem;
    display: flex;
    justify-content: flex-start;
}

.label {
    color: #ffd700; 
    margin-right: 15px;
}

@keyframes flash-orange {
    0% { background: linear-gradient(180deg, rgba(32,58,139,1) 0%, rgba(63,94,251,1) 100%); }
    50% { background: orange; border-color: white; }
    100% { background: linear-gradient(180deg, rgba(32,58,139,1) 0%, rgba(63,94,251,1) 100%); }
}

.flash-selected {
    animation: flash-orange 0.5s linear 3;
}

.correct-bg {
    background: linear-gradient(180deg, rgb(28, 148, 28) 0%, rgb(45, 201, 45) 100%) !important;
    border-color: #fff !important;
}

.wrong-bg {
    background: linear-gradient(180deg, rgb(161, 29, 29) 0%, rgb(221, 55, 55) 100%) !important;
    border-color: #fff !important;
}

@media (max-width: 1100px) {
    .money-ladder {
        display: flex; 
        position: absolute; 
        top: 75px; 
        left: 50%;
        transform: translateX(-50%);
        background: none; 
        border: none;
    }
    .money-step { display: none; }
    .money-step.active-step {
        display: flex;
        width: auto;
        min-width: 140px;
        padding: 5px 25px;
        transform: none;
    }
    .game-container { margin-left: 0; width: 100%; }
}

@media (max-width: 768px) {
    /* Kept 80% Zoom */
    body { zoom: 0.8; }
    .lifelines { top: 10px; right: 50%; transform: translateX(50%); }
    .answers-section { grid-template-columns: 1fr; }
    .question-display-area { font-size: 1.1rem; margin-top: 100px; }
    .answer-connector-line, .main-connector { display: none; }
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* --- CUSTOM MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-box {
    background: linear-gradient(180deg, rgba(32,58,139,1) 0%, rgba(63,94,251,1) 50%, rgba(32,58,139,1) 100%);
    border: 4px solid #ffd700;
    border-radius: 20px;
    padding: 35px 50px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), inset 0 0 20px rgba(0,0,0,0.5);
    position: relative;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 20px;
}

.modal-overlay.hidden .modal-box {
    transform: scale(0.7);
}

.modal-icon-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(180deg, #1c3c94 0%, #002776 100%);
    border: 3px solid #ffd700;
    border-radius: 50%;
    /* This centers the icon and pulls it slightly above the top border */
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.modal-svg {
    width: 35px;
    height: 35px;
    fill: #ffd700;
}

#modal-title {
    color: #ffd700;
    margin: 20px 0 15px 0;
    font-size: 1.8rem;
    text-transform: uppercase;
    text-shadow: 2px 2px 2px black;
}

.modal-text {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    line-height: 1.4;
    text-shadow: 1px 1px 1px black;
}

.modal-ok-btn {
    background: linear-gradient(180deg, #1c941c 0%, #2dc92d 100%);
    border: 2px solid #ffd700;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px 40px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    transition: transform 0.2s;
    text-shadow: 1px 1px 1px black;
}

.modal-ok-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(180deg, #2dc92d 0%, #1c941c 100%);
}