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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #3a6b4d;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.game-container {
    width: 400px;
    height: auto;
    max-height: 90vh;
    background: #2c5943;
    border-radius: 12px;
    padding: 18px;
    color: #f5f5dc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-title {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    color: #f5f5dc;
    letter-spacing: 2px;
    margin-bottom: 0;
}

.dice-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0;
}

.die {
    width: 60px;
    height: 60px;
    background: #f5f5dc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

.die:hover {
    transform: scale(1.05);
}

.die.held {
    background: #ffeb3b;
    box-shadow: 0 0 10px rgba(255, 235, 59, 0.6);
}

.die-face {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dot {
    width: 8px;
    height: 8px;
    background: #2c5943;
    border-radius: 50%;
    position: absolute;
}

.dot-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.dot-top-left {
    top: 18%;
    left: 18%;
}

.dot-top-right {
    top: 18%;
    right: 18%;
}

.dot-bottom-left {
    bottom: 18%;
    left: 18%;
}

.dot-bottom-right {
    bottom: 18%;
    right: 18%;
}

.dot-middle-left {
    top: 50%;
    left: 18%;
    transform: translateY(-50%);
}

.dot-middle-right {
    top: 50%;
    right: 18%;
    transform: translateY(-50%);
}

.buttons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-roll {
    background: #2c5943;
    border: 2px solid #4a7a5d;
}

.btn-roll:hover {
    background: #3a6b4d;
}

.btn-confirm {
    background: #8b4513;
    border: 2px solid #a0522d;
}

.btn-confirm:hover {
    background: #a0522d;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.game-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #f5f5dc;
}

.info-text {
    font-weight: 500;
}

.info-separator {
    color: #f5f5dc;
    opacity: 0.7;
}

.scorecard {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    height: fit-content;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
    min-height: 32px;
}

.score-item:hover {
    background: rgba(245, 245, 220, 0.1);
    border-left-color: rgba(245, 245, 220, 0.4);
}

.score-item:nth-child(odd) {
    background: rgba(255, 255, 255, 0.05);
}

.score-item:nth-child(odd):hover {
    background: rgba(245, 245, 220, 0.08);
}

.score-item.available {
    background: rgba(76, 175, 80, 0.2);
    border-left-color: #4caf50;
}

.score-item.available:hover {
    background: rgba(76, 175, 80, 0.3);
}

.score-item.selected {
    background: rgba(255, 193, 7, 0.25);
    border-left-color: #ffc107;
}

.score-item.potential {
    background: rgba(255, 152, 0, 0.15);
    border-left-color: #ff9800;
}

.score-item.potential:hover {
    background: rgba(255, 152, 0, 0.25);
}

.score-item.completed {
    background: rgba(96, 125, 139, 0.15);
    border-left-color: #607d8b;
    opacity: 0.9;
}

.score-item.completed:hover {
    background: rgba(96, 125, 139, 0.25);
}

.score-label {
    font-size: 13px;
    font-weight: 500;
    color: #f5f5dc;
    flex: 1;
}

.score-value {
    font-size: 13px;
    font-weight: bold;
    color: #f5f5dc;
    min-width: 40px;
    text-align: right;
}

.score-item.potential .score-value {
    color: #ff9800;
    font-style: italic;
}

.score-item.completed .score-value {
    color: #90a4ae;
}

.score-item.available .score-value {
    color: #66bb6a;
}

.score-item.selected .score-value {
    color: #ffc107;
}

/* Tech info - stopka */
.tech-info {
    margin-top: 15px;
    text-align: center;
    color: #f5f5dc;
    opacity: 0.8;
    font-size: 12px;
}

.tech-stack {
    margin-bottom: 5px;
    font-weight: 500;
    letter-spacing: 1px;
}

.author-info {
    font-size: 11px;
    opacity: 0.9;
}

.author-info strong {
    color: #4ecdc4;
    font-weight: bold;
}

/* Animation for score changes */
.score-value.updating {
    animation: scoreUpdate 0.5s ease;
}

@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: #4caf50; }
    100% { transform: scale(1); }
}

/* Game Over Modal */
.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(58, 107, 77, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.game-over-modal {
    width: 400px;
    background: #2c5943;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: #f5f5dc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transform: scale(0.8);
    animation: modalPop 0.5s ease forwards;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.game-over-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #f5f5dc;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    letter-spacing: 2px;
}

.game-over-score {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #f5f5dc;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4ecdc4;
}

.game-over-bonus {
    font-size: 16px;
    color: #66bb6a;
    margin-bottom: 20px;
    font-style: italic;
    background: rgba(102, 187, 106, 0.2);
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #66bb6a;
}

.game-over-rating {
    font-size: 20px;
    font-weight: bold;
    margin: 20px 0;
    color: #ff9800;
    background: rgba(255, 152, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ff9800;
}

.game-over-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.game-over-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 100px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.btn-play-again {
    background: #2c5943;
    color: #f5f5dc;
    border: 2px solid #4a7a5d;
}

.btn-play-again:hover {
    background: #3a6b4d;
    transform: translateY(-2px);
}

.btn-close {
    background: #8b4513;
    color: white;
    border: 2px solid #a0522d;
}

.btn-close:hover {
    background: #a0522d;
    transform: translateY(-2px);
}

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

@keyframes modalPop {
    0% { 
        transform: scale(0.8); 
        opacity: 0;
    }
    100% { 
        transform: scale(1); 
        opacity: 1;
    }
}

.confetti {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #ffd700;
    animation: confetti-fall 3s ease-out forwards;
    z-index: 999;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@media (max-width: 480px) {
    .game-container {
        width: 95vw;
        height: auto;
        max-height: 85vh;
        padding: 15px;
    }
    
    .game-title {
        font-size: 28px;
    }
    
    .die {
        width: 50px;
        height: 50px;
    }
    
    .dot {
        width: 6px;
        height: 6px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .score-item {
        padding: 6px 12px;
        min-height: 28px;
    }
    
    .score-label,
    .score-value {
        font-size: 11px;
    }
    
    .tech-info {
        margin-top: 10px;
        font-size: 10px;
    }
    
    .author-info {
        font-size: 9px;
    }
}