/* shared-styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e293b 0%, #1e3a8a 50%, #1e293b 100%);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.title {
    font-size: 4rem;
    font-weight: bold;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 30px;
}

.back-button {
    background: #475569;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.back-button:hover {
    background: #64748b;
    text-decoration: none;
    color: white;
}

/* Game Interface */
.game-interface {
    display: block;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-button {
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.leaderboard-btn { background: #eab308; }
.leaderboard-btn:hover { background: #ca8a04; }
.stats-btn { background: #10b981; }
.stats-btn:hover { background: #059669; }
.settings-btn { background: #3b82f6; }
.settings-btn:hover { background: #2563eb; }

.game-info {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #475569;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
}

.current-game {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.game-status {
    color: #94a3b8;
    font-size: 1rem;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.player-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #475569;
    border-radius: 15px;
    padding: 25px;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    min-width: 0;
    overflow: hidden;
}

.player-name-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    overflow: hidden;
}

.player-name {
    background: transparent;
    border: none;
    border-bottom: 2px solid #475569;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 5px;
    outline: none;
    transition: border-color 0.3s ease;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.player-name:focus {
    border-color: #3b82f6;
}

.player-stats {
    text-align: right;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
}

.total-score {
    font-size: 2rem;
    font-weight: bold;
    color: #fbbf24;
}

.score-details {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
}

.score-input {
    margin-bottom: 25px;
}

.score-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.score-buttons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.score-button {
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.score-button:hover {
    transform: scale(1.1);
}

.score-5 { background: #10b981; color: white; }
.score-4 { background: #22c55e; color: white; }
.score-3 { background: #eab308; color: white; }
.score-2 { background: #f97316; color: white; }
.score-1 { background: #f87171; color: white; }
.score-0 { background: #ef4444; color: white; }

.score-button.selected {
    background: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.add-player {
    text-align: center;
    margin-bottom: 30px;
}

.add-player-btn {
    background: #10b981;
    border: none;
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-player-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

.round-nav-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
}

.round-nav-btn.current {
    background: #3b82f6;
    color: white;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.round-nav-btn.completed {
    background: #10b981;
    color: white;
}

.round-nav-btn.partial {
    background: #f59e0b;
    color: white;
}

.round-nav-btn.empty {
    background: #475569;
    color: #94a3b8;
}

.round-nav-btn:hover {
    transform: scale(1.05);
}

.throw-box {
    background: #475569;
    color: #94a3b8;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.throw-box:hover {
    transform: scale(1.05);
    border: 2px solid #3b82f6;
}

.throw-box.current {
    background: #3b82f6 !important;
    color: white !important;
}

.throw-box.editing {
    background: #8b5cf6 !important;
    color: white !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.5);
}

.throw-box.completed {
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.throw-box.empty {
    background: #475569;
    color: #94a3b8;
}

/* Color utility classes */
.yellow { color: #fbbf24; }
.green { color: #10b981; }
.orange { color: #f97316; }
.red { color: #ef4444; }
.blue { color: #3b82f6; }
.purple { color: #a855f7; }

/* Leaderboard Styles */
.leaderboard-window {
    position: fixed;
    top: 100px;
    right: 50px;
    width: 500px;
    height: 600px;
    background: linear-gradient(135deg, #1e293b 0%, #1e3a8a 50%, #1e293b 100%);
    border: 2px solid #3b82f6;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
    display: none;
    min-width: 300px;
    min-height: 250px;
}

.leaderboard-window.show {
    display: block;
}

.leaderboard-header {
    background: rgba(30, 41, 59, 0.9);
    padding: 15px 20px;
    border-bottom: 1px solid #475569;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leaderboard-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: white;
}

.leaderboard-controls {
    display: flex;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: white;
    background: #475569;
}

.leaderboard-content {
    padding: 20px;
    height: calc(100% - 80px);
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #475569;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .players-grid {
        grid-template-columns: 1fr;
    }
    
    .game-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
} 

@keyframes bounce { 
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 
    40% { transform: translateY(-10px); } 
    60% { transform: translateY(-5px); } 
}