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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #1a1a1a;
    overflow-x: hidden;
    line-height: 1.6;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.game-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.game-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.game-header p {
    font-size: 1.25rem;
    color: #6c757d;
    font-weight: 400;
}

.game-area {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Money Ladder */
.money-ladder {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    border: 1px solid #e9ecef;
}

.ladder-item {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e9ecef;
    color: #6c757d;
}

.ladder-item.current {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 700;
}

.ladder-item.passed {
    background: #e8f5e8;
    border-color: #28a745;
    color: #28a745;
}

.ladder-item.guaranteed {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

/* Question Area */
.question-area {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.question-number {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 24px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.question-text {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.3;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
}

.answers-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.answer-btn {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.answer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #1a1a1a;
}

.answer-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.answer-btn.selected {
    background: #1a1a1a;
    color: #ffffff;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: #1a1a1a;
    font-weight: 600;
}

.answer-btn.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
    animation: correctPulse 0.5s ease-in-out;
}

.answer-btn.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
    animation: incorrectShake 0.5s ease-in-out;
}

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

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.answer-letter {
    background: #f8f9fa;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
    border: 1px solid #e9ecef;
    color: #6c757d;
}

.answer-text {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.4;
}

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

.lifeline-btn {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px 24px;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    font-weight: 500;
}

.lifeline-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #1a1a1a;
}

.lifeline-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f8f9fa;
    border-color: #e9ecef;
}

.lifeline-icon {
    font-size: 1.75rem;
    font-weight: bold;
}

.lifeline-text {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.action-btn {
    background: #1a1a1a;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-btn.walk-away {
    background: #6c757d;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.action-btn.walk-away:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    color: #333;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.modal-header h3 {
    color: #333;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

.modal-body p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.name-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 20px;
    font-family: inherit;
}

.name-input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.leaderboard-section {
    margin: 24px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.leaderboard-section h4 {
    margin-bottom: 16px;
    color: #1a1a1a;
    text-align: center;
}

.leaderboard-list {
    max-height: 200px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 4px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.leaderboard-item.current-player {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.leaderboard-rank {
    font-weight: 600;
    color: #6c757d;
    min-width: 30px;
}

.leaderboard-name {
    flex: 1;
    margin: 0 12px;
    font-weight: 500;
}

.leaderboard-score {
    font-weight: 600;
    color: #28a745;
}

.leaderboard-item.current-player .leaderboard-rank,
.leaderboard-item.current-player .leaderboard-score {
    color: #ffffff;
}

/* Instructions */
.instructions {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
}

.instructions h3 {
    color: #FFD700;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.instructions ul {
    list-style: none;
    padding-left: 0;
}

.instructions li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #ccc;
    line-height: 1.5;
}

.instructions li::before {
    content: "💰";
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

/* Celebration Animation */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: celebrationFadeIn 0.5s ease-out;
}

.celebration-content {
    text-align: center;
    background: #ffffff;
    color: #1a1a1a;
    padding: 48px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
    animation: celebrationBounce 0.6s ease-out;
    max-width: 600px;
    width: 90%;
}

.celebration-text {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: #1a1a1a;
    animation: celebrationPulse 1s infinite;
}

.celebration-amount {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #28a745;
    text-shadow: none;
}

.celebration-message {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.celebration-info {
    margin-bottom: 30px;
    text-align: left;
    max-width: 500px;
}

.next-question-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.safety-net-info {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-top: 10px;
}

.safety-net-available {
    background: rgba(76, 175, 80, 0.3);
    border: 2px solid #4CAF50;
    color: #2E7D32;
}

.safety-net-none {
    background: rgba(244, 67, 54, 0.3);
    border: 2px solid #f44336;
    color: #C62828;
}

.celebration-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.celebration-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 220px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.continue-btn {
    background: #28a745;
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.walk-away-btn {
    background: #dc3545;
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.walk-away-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

@keyframes celebrationFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes celebrationBounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .game-area {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .money-ladder {
        order: 2;
        flex-direction: row;
        overflow-x: auto;
        padding: 15px;
    }
    
    .ladder-item {
        min-width: 80px;
        font-size: 0.9rem;
        padding: 8px 10px;
    }
    
    .answers-container {
        grid-template-columns: 1fr;
    }
    
    .lifelines {
        flex-wrap: wrap;
    }
    
    .lifeline-btn {
        min-width: 100px;
        padding: 12px 15px;
    }
    
    .game-header h1 {
        font-size: 2rem;
    }
    
    .question-text {
        font-size: 1.4rem;
    }
}