/**
 * Estilos específicos para Dardos
 */

:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --accent-color: #00bcd4;
    --text-color: #2c3e50;
    --bg-color: #f4f7ff;
    --card-bg: #ffffff;
    --border-color: #d7def7;
    --gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --gradient-accent: linear-gradient(135deg, #00bcd4 0%, #1e88e5 100%);
}

/* Tema general */
body.theme-dardos {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: #ecf0f1;
    --primary-color: #6a11cb;
}

/* Header personalizado */
body.theme-dardos .app-header {
    background: var(--gradient);
    box-shadow: 0 8px 24px rgba(44, 62, 80, 0.25);
}

body.theme-dardos .app-header h1 {
    color: #fff;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

body.theme-dardos .app-header .subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Botón atrás */
body.theme-dardos .back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

body.theme-dardos .back-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Panel de control */
.control-panel {
    background: rgba(106, 17, 203, 0.08);
    border: 2px solid #6a11cb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.control-panel .panel-section {
    margin-bottom: 12px;
}

.control-panel label {
    display: block;
    color: #6a11cb;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.control-panel .input-field {
    width: 100%;
    padding: 10px;
    border: 2px solid #6a11cb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.control-panel .input-field:focus {
    outline: none;
    border-color: #00bcd4;
    background: rgba(0, 188, 212, 0.08);
    box-shadow: 0 0 8px rgba(0, 188, 212, 0.2);
}

/* Contenedor de puntuaciones */
.scores-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

/* Tarjetas de equipo */
.team-score {
    background: white;
    border: 3px solid #6a11cb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.team-score.active-team {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.12), rgba(0, 188, 212, 0.08));
    border-color: #00bcd4;
    box-shadow: 0 8px 24px rgba(106, 17, 203, 0.16), inset 0 0 0 2px #00bcd4;
    transform: scale(1.02);
}

.team-score.active-team::before {
    content: '●';
    position: absolute;
    top: 10px;
    right: 15px;
    color: #00bcd4;
    font-size: 1.5rem;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.team-name {
    color: #6a11cb;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-display {
    background: var(--gradient);
    color: white;
    padding: 16px;
    border-radius: 8px;
    margin: 12px 0;
}

.score-number {
    font-size: 2.8rem;
    font-weight: 900;
    display: block;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.team-info {
    font-size: 0.9rem;
    margin-top: 12px;
    line-height: 1.6;
}

.team-info .label {
    color: #6a11cb;
    font-weight: 600;
}

.team-info p {
    margin: 6px 0;
    color: #555;
}

/* Sección tablero (centro) */
.dartboard-section {
    background: rgba(255,255,255,0.95);
    border: 3px solid #00bcd4;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.dartboard-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #6a11cb;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Input de puntuación */
.score-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dart-input {
    padding: 14px;
    font-size: 1.3rem;
    border: 2px solid #6a11cb;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dart-input:focus {
    outline: none;
    border-color: #00bcd4;
    background: rgba(0, 188, 212, 0.08);
    box-shadow: 0 0 12px rgba(0, 188, 212, 0.25);
}

/* Botón principal */
#add-score {
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

#add-score:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(106, 17, 203, 0.35);
}

#add-score:active {
    transform: translateY(0);
}

/* Multiplicadores */
.multipliers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.multiplier-btn {
    background: white;
    border: 2px solid #BDC3C7;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #555;
}

.multiplier-btn:hover {
    border-color: #6a11cb;
    background: rgba(106, 17, 203, 0.06);
}

.multiplier-btn.active {
    background: var(--gradient-accent);
    color: white;
    border-color: #00bcd4;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.25);
}

.mult-label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.mult-value {
    display: block;
    font-size: 1.3rem;
}

/* Botones especiales */
.special-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-special {
    background: linear-gradient(135deg, #9B59B6, #8E44AD);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-special:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
}

/* Botones de control */
.control-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-secondary {
    background: white;
    border: 2px solid #BDC3C7;
    color: #555;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #6a11cb;
    color: #6a11cb;
    background: rgba(106, 17, 203, 0.06);
}

/* Sección historial */
.history-section {
    background: white;
    border: 2px solid #BDC3C7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.history-section h3 {
    color: #6a11cb;
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.turns-history {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    align-items: center;
}

.history-item.team-1 {
    background: rgba(106, 17, 203, 0.08);
    border-left: 4px solid #6a11cb;
}

.history-item.team-2 {
    background: rgba(0, 188, 212, 0.08);
    border-left: 4px solid #00bcd4;
}

.hist-team {
    font-weight: 600;
    color: #2C3E50;
}

.hist-value {
    color: #7F8C8D;
    font-family: 'Courier New', monospace;
}

.hist-total {
    font-weight: 700;
    color: #6a11cb;
}

.hist-remaining {
    color: #27AE60;
    font-weight: 600;
}

/* Botones de acción */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-info {
    background: linear-gradient(135deg, #00bcd4, #1e88e5);
}

.btn-success {
    background: linear-gradient(135deg, #2575fc, #6a11cb);
}

.btn-warning {
    background: linear-gradient(135deg, #ff6b6b, #e74c3c);
}

.share-modal-content {
    max-width: 640px;
}

#share-text {
    white-space: pre-wrap;
    background: rgba(106, 17, 203, 0.06);
    border: 1px solid rgba(106, 17, 203, 0.2);
    border-radius: 10px;
    padding: 14px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2c3e50;
    text-align: left;
    min-height: 120px;
}

/* Responsive */
@media (max-width: 768px) {
    .scores-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .score-input-group {
        grid-template-columns: 2fr 1fr;
    }

    .multipliers {
        grid-template-columns: repeat(3, 1fr);
    }

    .action-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .history-item {
        grid-template-columns: 1fr 1fr;
        font-size: 0.85rem;
    }

    .dartboard-section {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .scores-container {
        grid-template-columns: 1fr;
    }

    .score-number {
        font-size: 2.2rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .control-buttons {
        grid-template-columns: 1fr;
    }

    .special-buttons {
        grid-template-columns: 1fr;
    }
}

/* Estado vacío */
.empty-state {
    text-align: center;
    color: #95A5A6;
    padding: 20px;
    font-style: italic;
}
