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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

#container {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* Start Screen */
#start-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#start-screen h1 {
    color: #ffffff;
    font-size: 4rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: 3px;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d, #6bcf7f, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #ff6b6b;
    }
    to {
        text-shadow: 0 0 30px #fff, 0 0 40px #fff, 0 0 50px #4ecdc4;
    }
}

.start-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

#playerName {
    padding: 15px 25px;
    font-size: 1.2rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 300px;
}

#playerName:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.model-select {
    padding: 15px 25px;
    font-size: 1.2rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 300px;
    cursor: pointer;
    color: #333;
}

.model-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.start-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px rgba(255, 107, 107, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 107, 107, 0.4);
    background: linear-gradient(45deg, #ff7979, #fd79a8);
}

.start-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.3);
}

.start-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Game Screen */
#game-screen {
    padding: 20px;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#game-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

#game-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#game-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    font-size: 1.1rem;
    font-weight: bold;
}

#ai-action-display {
    text-align: center;
    margin-top: 15px;
    padding: 12px 20px;
    background: rgba(255, 193, 7, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 193, 7, 0.5);
    animation: fadeIn 0.5s ease-in-out;
}

#ai-action-text {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7);
}

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

#game-content {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Dice Area */
#dice-area {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
}

#dice-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: nowrap;
}

.dice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.dice:hover {
    transform: translateY(-5px);
}

.dice.selected {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4);
}

.dice-face {
    width: 60px;
    height: 60px;
    background: white;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dice-keep {
    display: none;
}

.dice label {
    display: none;
}

.roll-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    color: white;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px rgba(255, 107, 107, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.roll-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 107, 107, 0.4);
    background: linear-gradient(45deg, #ff7979, #fd79a8);
}

.roll-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Scorecard */
#scorecard {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#scorecard h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.score-section {
    margin-bottom: 20px;
}

.score-section h4 {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 10px;
    margin: 0 0 10px 0;
    border-radius: 8px;
    text-align: center;
}

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.score-row:last-child {
    border-bottom: none;
}

.score-row.used {
    background: #f0f0f0;
    opacity: 0.7;
}

.score-value {
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.book-btn {
    background: linear-gradient(45deg, #00b894, #00cec9);
    border: none;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.book-btn:hover {
    background: linear-gradient(45deg, #00a085, #00b2b8);
    transform: translateY(-2px);
}

.book-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Players Scores */
#players-scores {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.player-score {
    flex: 1;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.player-score h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.player-score.current-player {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4);
}

/* Game Over Screen */
#game-over-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

#game-over-screen h2 {
    font-size: 3rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#final-scores {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    font-size: 1.2rem;
}

.final-score-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.final-score-row:last-of-type {
    border-bottom: none;
}

.winner {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #game-content {
        flex-direction: column;
        gap: 20px;
    }
    
    #dice-container {
        gap: 10px;
    }
    
    .dice {
        padding: 10px;
    }
    
    .dice-face {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    #game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    #start-screen h1 {
        font-size: 2.5rem;
    }
    
    #playerName {
        min-width: 250px;
    }
}

@media (max-width: 480px) {
    #start-screen h1 {
        font-size: 2rem;
    }
    
    #playerName {
        min-width: 200px;
        font-size: 1rem;
    }
    
    .start-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    #game-screen {
        padding: 10px;
    }
    
    #scorecard {
        padding: 15px;
    }
}