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

:root {
    --gold: #FFD700;
    --dark-gold: #DAA520;
    --light-gold: #FFF4CC;
    --red: #DC143C;
    --green: #228B22;
    --blue: #1E3A8A;
    --dark-blue: #0F172A;
    --light-blue: #3B82F6;
    --shadow: rgba(0, 0, 0, 0.5);
    --glow-gold: rgba(255, 215, 0, 0.8);
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #334155 100%);
    color: white;
    overflow: hidden;
    min-height: 100vh;
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 1.5rem;
}

#game-screen {
    padding: 1rem 1.5rem;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Title Styles */
.main-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 8rem;
    letter-spacing: 0.2em;
    text-align: center;
    background: linear-gradient(45deg, var(--gold), var(--light-gold), var(--gold));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--glow-gold);
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 2rem;
    color: var(--light-gold);
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
}

.screen-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 5rem;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

/* Shine Animation */
.shine {
    position: relative;
    overflow: hidden;
}

.shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

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

/* Buttons */
.btn-huge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    padding: 1.5rem 3rem;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn-huge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-huge:hover::before {
    width: 400px;
    height: 400px;
}

.btn-huge:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow);
}

.btn-huge:active {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--dark-gold));
    color: var(--dark-blue);
}

.btn-success {
    background: linear-gradient(135deg, #22C55E, var(--green));
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444, var(--red));
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
}

/* Start Screen */
.title-container {
    margin-bottom: 4rem;
}

.start-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.prize-preview {
    display: flex;
    gap: 3rem;
    margin-bottom: 2rem;
}

.prize-item {
    font-size: 1.8rem;
    padding: 1.5rem 3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.prize-item.highlight {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(218, 165, 32, 0.2));
    border: 2px solid var(--gold);
    box-shadow: 0 0 30px var(--glow-gold);
}

/* Case Grid */
.case-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0.8rem;
    width: 100%;
    margin: 0 auto;
}

.case {
    aspect-ratio: 1;
    background: linear-gradient(145deg, #2C3E50, #1a252f);
    border: 3px solid var(--gold);
    border-radius: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px var(--shadow);
    position: relative;
    overflow: hidden;
}

.case::before {
    content: '💼';
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.case:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 50px var(--glow-gold);
    border-color: var(--light-gold);
}

.case.opened {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(0.9);
    border-color: #555;
}

.case.player-case {
    background: linear-gradient(145deg, var(--dark-gold), #B8860B);
    border-color: var(--light-gold);
    box-shadow: 0 0 50px var(--glow-gold);
    animation: pulse 2s infinite;
}

.case.disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Game Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.round-info, .player-case-info, .cases-remaining-info {
    text-align: center;
}

.round-label, .player-case-label, .remaining-label {
    font-size: 1rem;
    color: var(--light-gold);
    letter-spacing: 0.2em;
}

.round-number, .player-case-number, .cases-to-open-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--gold);
    text-shadow: 0 0 20px var(--glow-gold);
}

.game-main {
    display: grid;
    grid-template-columns: 350px 1fr 350px;
    gap: 1.5rem;
    height: calc(100vh - 180px);
    align-items: stretch;
}

.left-panel, .right-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.center-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.panel-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--gold);
    letter-spacing: 0.1em;
    flex-shrink: 0;
}

/* Prize Board */
.prize-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    flex: 1;
    align-content: start;
}

.prize-item-board {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.4rem;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    border: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.prize-item-board.revealed {
    opacity: 0.3;
    text-decoration: line-through;
    border-color: #555;
}

.prize-item-board.high {
    color: #22C55E;
}

.prize-item-board.medium {
    color: var(--gold);
}

.prize-item-board.low {
    color: #EF4444;
}

/* Game Message */
.game-message {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--gold);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    flex-shrink: 0;
}

#case-grid {
    flex: 1;
    align-content: center;
    display: grid;
}

/* Opened Cases */
.opened-cases-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    flex: 1;
    align-content: start;
}

.opened-case-item {
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.4rem;
    border-left: 4px solid var(--gold);
}

.opened-case-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--gold);
}

.opened-case-amount {
    font-size: 0.95rem;
    color: white;
    font-weight: bold;
}

/* Banker Screen */
.banker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    height: 100%;
}

.phone-icon {
    font-size: 6rem;
    animation: pulse 1s infinite, rotate 2s infinite;
}

@keyframes rotate {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.banker-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    letter-spacing: 0.2em;
}

.offer-container {
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem 3rem;
    border-radius: 1.5rem;
    border: 4px solid var(--gold);
    box-shadow: 0 0 60px var(--glow-gold);
}

.offer-label {
    font-size: 1.5rem;
    text-align: center;
    color: var(--light-gold);
    margin-bottom: 0.75rem;
    letter-spacing: 0.2em;
}

.banker-offer {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 5rem;
    text-align: center;
    color: var(--gold);
    text-shadow: 0 0 40px var(--glow-gold);
}

.decision-question {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 0.2em;
}

.banker-buttons {
    display: flex;
    gap: 2rem;
}

/* Final Screen */
.final-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    height: 100%;
}

.final-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    letter-spacing: 0.2em;
}

.final-cases {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 1rem 0;
}

.final-case {
    text-align: center;
}

.final-case-label {
    font-size: 1.2rem;
    color: var(--light-gold);
    margin-bottom: 0.75rem;
}

.final-case-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    color: var(--gold);
    background: rgba(0, 0, 0, 0.5);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    border: 4px solid var(--gold);
    box-shadow: 0 0 40px var(--glow-gold);
}

.vs {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--gold);
}

.final-amounts {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem 2.5rem;
    border-radius: 1rem;
    text-align: center;
}

.final-amount-label {
    font-size: 1.2rem;
    color: var(--light-gold);
    margin: 0.75rem 0;
}

.final-amount {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.final-question {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 0.2em;
}

.final-buttons {
    display: flex;
    gap: 2rem;
}

/* Game Over Screen */
.gameover-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    height: 100%;
}

.gameover-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4.5rem;
    letter-spacing: 0.2em;
}

.result-container {
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem 3.5rem;
    border-radius: 1.5rem;
    border: 5px solid var(--gold);
    box-shadow: 0 0 80px var(--glow-gold);
}

.result-label {
    font-size: 2rem;
    text-align: center;
    color: var(--light-gold);
    margin-bottom: 0.75rem;
    letter-spacing: 0.3em;
}

.final-winnings {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 5.5rem;
    text-align: center;
    color: var(--gold);
    text-shadow: 0 0 60px var(--glow-gold);
    animation: pulse 2s infinite;
}

.reveal-info {
    font-size: 1.4rem;
    text-align: center;
    max-width: 800px;
    line-height: 1.5;
}

/* Reveal Overlay */
.reveal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.reveal-overlay.active {
    display: flex;
}

.reveal-content {
    text-align: center;
    animation: scaleIn 0.5s ease;
}

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

.reveal-case-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    color: var(--light-gold);
    margin-bottom: 2rem;
    letter-spacing: 0.2em;
}

.reveal-amount {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 10rem;
    color: var(--gold);
    text-shadow: 0 0 80px var(--glow-gold);
}

/* Instruction */
.instruction {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--light-gold);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--light-gold);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1600px) {
    .game-main {
        grid-template-columns: 300px 1fr 300px;
    }
}

@media (max-width: 1400px) {
    .game-main {
        grid-template-columns: 250px 1fr 250px;
    }
}

@media (max-width: 1024px) {
    .main-title {
        font-size: 5rem;
    }

    .game-main {
        grid-template-columns: 1fr;
    }

    .left-panel, .right-panel {
        display: none;
    }
}
