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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #001a4d 0%, #0033cc 50%, #001a4d 100%);
    color: #fff;
    overflow: hidden;
    height: 100vh;
}

.game-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Game Content Layout */
.game-content {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 30px;
    padding: 40px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Money Ladder */
.money-ladder {
    width: 200px;
    background: rgba(0, 51, 153, 0.7);
    border: 3px solid #ffcc00;
    border-radius: 15px;
    padding: 20px 15px;
    box-shadow: 0 0 40px rgba(255, 204, 0, 0.4), inset 0 0 30px rgba(255, 204, 0, 0.1);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ffcc00 rgba(0, 51, 153, 0.7);
}

.money-ladder::-webkit-scrollbar {
    width: 8px;
}

.money-ladder::-webkit-scrollbar-track {
    background: rgba(0, 51, 153, 0.5);
}

.money-ladder::-webkit-scrollbar-thumb {
    background: #ffcc00;
    border-radius: 4px;
}

.ladder-title {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
    color: #ffcc00;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ladder-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ladder-item {
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 204, 0, 0.3);
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    transition: all 0.3s ease;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ladder-item .level {
    font-size: 10px;
    color: #ffcc00;
    opacity: 0.7;
}

.ladder-item:hover {
    border-color: #ffcc00;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
}

.ladder-item.current {
    background: #ffcc00;
    color: #001a4d;
    border-color: #ffcc00;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
}

.ladder-item.passed {
    background: rgba(76, 175, 80, 0.4);
    border-color: #4caf50;
    color: #a8d5a8;
}

/* Game Board */
.game-board {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 30px;
}

/* Question Section */
.question-section {
    text-align: center;
}

.question-number {
    font-size: 18px;
    color: #ffcc00;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-box {
    background: linear-gradient(135deg, rgba(0, 51, 153, 0.8), rgba(0, 85, 204, 0.8));
    border: 4px solid #ffcc00;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 0 50px rgba(255, 204, 0, 0.4), inset 0 0 30px rgba(255, 204, 0, 0.1);
    animation: questionAppear 0.5s ease;
}

#questionText {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    line-height: 1.4;
}

@keyframes questionAppear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lifelines */
.lifelines {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.lifeline-btn {
    padding: 12px 20px;
    background: rgba(0, 51, 153, 0.7);
    border: 2px solid #ffcc00;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.2);
}

.lifeline-btn:hover:not(:disabled) {
    background: rgba(255, 204, 0, 0.3);
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.5);
    transform: scale(1.05);
}

.lifeline-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255, 204, 0, 0.3);
}

.lifeline-icon {
    font-size: 24px;
}

.lifeline-label {
    font-size: 12px;
}

.lifeline-btn:disabled .lifeline-icon {
    opacity: 0.5;
}

/* Answers Section */
.answers-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.answer-btn {
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 51, 153, 0.6), rgba(0, 85, 204, 0.6));
    border: 3px solid rgba(255, 204, 0, 0.4);
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.1);
}

.answer-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 85, 204, 0.8), rgba(0, 119, 255, 0.8));
    border-color: #ffcc00;
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.4);
    transform: translateY(-5px);
}

.answer-btn:disabled {
    cursor: not-allowed;
}

.answer-btn.selected:not(.locked) {
    background: linear-gradient(135deg, #ffcc00, #ffdd33);
    color: #001a4d;
    border-color: #ffcc00;
    box-shadow: 0 0 40px rgba(255, 204, 0, 0.6);
    transform: translateY(-5px);
}

.answer-btn.locked {
    pointer-events: none;
}

.answer-btn.correct {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    border-color: #4caf50;
    box-shadow: 0 0 40px rgba(76, 175, 80, 0.6);
    animation: correctPulse 0.6s ease;
}

.answer-btn.incorrect {
    background: linear-gradient(135deg, #f44336, #ef5350);
    border-color: #f44336;
    box-shadow: 0 0 40px rgba(244, 67, 54, 0.6);
    animation: shake 0.5s ease;
}

.answer-btn.removed {
    opacity: 0.3;
    pointer-events: none;
}

.answer-letter {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.answer-text {
    text-align: left;
    flex: 1;
}

@keyframes correctPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Control Buttons */
.control-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.control-btn {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #ffcc00;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-btn.primary {
    background: #ffcc00;
    color: #001a4d;
}

.control-btn.primary:hover:not(:disabled) {
    background: #ffdd33;
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.6);
    transform: scale(1.05);
}

.control-btn.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.control-btn.secondary {
    background: rgba(0, 51, 153, 0.7);
    color: #ffcc00;
    border-color: #ffcc00;
}

.control-btn.secondary:hover {
    background: rgba(0, 85, 204, 0.9);
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.4);
    transform: scale(1.05);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, rgba(0, 51, 153, 0.95), rgba(0, 85, 204, 0.95));
    border: 4px solid #ffcc00;
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 0 60px rgba(255, 204, 0, 0.5);
    max-width: 600px;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #ffcc00;
}

.modal-content p {
    font-size: 18px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.modal-content strong {
    color: #ffcc00;
}

/* Start Screen */
.start-screen {
    text-align: center;
    padding: 60px 50px;
}

.logo {
    font-size: 80px;
    margin-bottom: 20px;
}

.start-screen h1 {
    font-size: 48px;
    margin-bottom: 10px;
    color: #ffcc00;
    text-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
}

.subtitle {
    font-size: 24px;
    color: #a8d5a8;
    margin-bottom: 20px;
}

.instructions {
    font-size: 18px;
    margin-bottom: 10px;
}

.details {
    font-size: 14px;
    color: #bbb;
    margin-bottom: 30px;
}

/* Result Modal */
.result {
    text-align: center;
}

.result h2 {
    font-size: 40px;
    margin-bottom: 20px;
}

.result #resultTitle {
    color: #4caf50;
}

.result.game-over #resultTitle {
    color: #f44336;
}

.result.game-won #resultTitle {
    color: #ffcc00;
    font-size: 48px;
}

.result p {
    font-size: 20px;
    margin-bottom: 15px;
}

.result #resultPrize,
.result #gameOverPrize,
.result #gameWonPrize {
    font-size: 24px;
    font-weight: bold;
    color: #ffcc00;
    margin: 20px 0;
}

/* Modal Buttons */
.modal-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.modal-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #ffcc00;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.modal-btn.confirm {
    background: #ffcc00;
    color: #001a4d;
}

.modal-btn.confirm:hover {
    background: #ffdd33;
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.6);
    transform: scale(1.05);
}

.modal-btn.cancel {
    background: rgba(0, 51, 153, 0.7);
    color: #ffcc00;
}

.modal-btn.cancel:hover {
    background: rgba(0, 85, 204, 0.9);
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.4);
    transform: scale(1.05);
}

.modal-btn.large {
    padding: 18px 50px;
    font-size: 18px;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .game-content {
        gap: 20px;
        padding: 30px;
    }

    .money-ladder {
        width: 150px;
        padding: 15px 10px;
    }

    .ladder-item {
        font-size: 11px;
        padding: 8px;
    }

    .question-box {
        padding: 20px;
    }

    #questionText {
        font-size: 20px;
    }

    .answer-btn {
        padding: 15px;
        font-size: 14px;
    }
}

@media (max-width: 1024px) {
    .game-content {
        flex-direction: column;
        gap: 15px;
    }

    .money-ladder {
        width: 100%;
        max-height: 150px;
        display: flex;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 15px;
    }

    .ladder-items {
        flex-direction: row;
        gap: 5px;
    }

    .ladder-item {
        flex: 0 0 auto;
        padding: 8px 5px;
        font-size: 10px;
    }

    .answers-section {
        grid-template-columns: 1fr;
    }

    .control-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }

    .game-container {
        align-items: stretch;
        justify-content: stretch;
    }

    .game-content {
        padding: 20px;
        gap: 10px;
    }

    .question-box {
        padding: 15px;
    }

    #questionText {
        font-size: 18px;
    }

    .modal-content {
        padding: 30px;
        width: 90%;
    }

    .modal-content h2 {
        font-size: 24px;
    }

    .start-screen h1 {
        font-size: 32px;
    }

    .lifelines {
        gap: 10px;
        padding: 10px;
    }

    .lifeline-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
}
