/* =============================================
   Darts Game - Styles CSS
   ============================================= */

body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #0a0a0a;
    color: #e0e0e0;
}

h1 {
    color: #ffffff;
    text-align: center;
}

/* Players */
.player {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 200px;
    max-width: 250px;
}

.player.active {
    background-color: #1e3a8a;
    border: 2px solid #3b82f6;
}

.player-name {
    font-weight: bold;
    font-size: 1.2em;
    color: #ffffff;
}

.player-score {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffffff;
}

.current-player-indicator {
    font-size: 0.8em;
    color: #3b82f6;
    font-weight: bold;
}

.host-badge {
    font-size: 0.7em;
    color: #10b981;
    font-style: italic;
}

/* Turn Info */
.turn-info {
    background-color: #1e293b;
    border: 1px solid #3b82f6;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    font-weight: bold;
    color: #ffffff;
}

/* Combinations */
.combinations {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    width: 100%;
}

.combinations h3 {
    margin-top: 0;
    color: #3b82f6;
}

.combinations ul {
    list-style-type: none;
    padding: 0;
}

.combinations li {
    padding: 5px 0;
    color: #e0e0e0;
}

/* Spectator Combinations */
.spectator-combinations {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    width: 100%;
}

.spectator-combinations h3 {
    margin-top: 0;
    color: #10b981;
}

.spectator-combinations ul {
    list-style-type: none;
    padding: 0;
}

.spectator-combinations li {
    padding: 5px 0;
    color: #e0e0e0;
}

/* Forms */
form {
    margin: 20px 0;
    text-align: center;
}

input, button, select {
    padding: 8px;
    margin: 5px;
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 5px;
}

input::placeholder {
    color: #888;
}

button {
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #2563eb;
}

/* Winner */
.winner {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    font-size: 2em;
    text-align: center;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
    color: #ffffff;
}

/* Dart Input */
.dart-input {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.dart {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 15px;
    background-color: #1a1a1a;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.dart-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #ffffff;
}

.type-miss-container {
    display: flex;
    align-items: center;
}

.type-button {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    margin: 5px;
    min-width: 50px;
    font-weight: bold;
    color: #e0e0e0;
}

.type-button.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.miss-button {
    background-color: #450a0a;
    border: 1px solid #7f1d1d;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    margin: 5px;
    min-width: 50px;
    font-weight: bold;
    color: #fecaca;
}

.miss-button.active {
    background-color: #7f1d1d;
    color: #ffffff;
}

.miss-active {
    opacity: 0.5;
    pointer-events: none;
}

/* Value Picker */
.value-picker {
    position: relative;
    width: 80px;
    height: 120px;
    overflow: hidden;
    margin: 10px 0;
    user-select: none;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: #1a1a1a;
    touch-action: none;
}

.value-list {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    transition: transform 0.3s ease;
}

.value-item {
    height: 40px;
    line-height: 40px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 1px solid #2a2a2a;
    padding: 0 5px;
    color: #e0e0e0;
}

.value-item.selected {
    background-color: #3b82f6;
    color: white;
    font-size: 1.5em;
    transform: scale(1.1);
}

.value-item.bull {
    font-size: 1em;
    color: #ef4444;
    font-weight: bold;
}

/* Error */
.error {
    color: #ef4444;
    text-align: center;
    font-weight: bold;
}

/* Game Setup */
.game-setup {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

/* QR Code */
.qr-code {
    text-align: center;
    margin: 20px 0;
}

.qr-code img {
    max-width: 200px;
    border: 1px solid #333;
    padding: 10px;
    background: #0a0a0a;
    border-radius: 5px;
}

/* Game ID Display */
.game-id-display {
    text-align: center;
    font-family: monospace;
    font-size: 1.2em;
    background: #1a1a1a;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    word-break: break-all;
    color: #ffffff;
    border: 1px solid #333;
}

/* Player List */
.player-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

/* Refresh Button */
.refresh-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 1000;
}

/* Waiting Message */
.waiting-message {
    text-align: center;
    color: #888;
    font-style: italic;
    margin: 15px 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.action-buttons button {
    min-width: 120px;
}
