.play-friend-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.play-friend-btn:hover:not([disabled]) {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.play-friend-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-select-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #00ff39;
    width: 90%;
    max-width: 400px;
    z-index: 1000;
}

.game-select-modal .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

.game-select-modal .close-btn:hover {
    color: #00ff39;
    transform: scale(1.1);
}

.game-select-modal h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #00ff39;
}

.game-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.game-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-option:hover {
    background: rgba(0, 255, 57, 0.2);
    transform: translateY(-2px);
}

.game-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 57, 0.2);
    border-radius: 50%;
}

.game-details {
    flex: 1;
}

.game-title-amigos {
    font-weight: bold;
    color: #00ff39;
    margin-bottom: 5px;
    text-align: left;
}

.game-description {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}

.game-request-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(0, 30, 60, 0.95));
    padding: 20px;
    border-radius: 15px;
    border: 3px solid #4CAF50;
    width: 90%;
    max-width: 300px;
    z-index: 999;
    text-align: center;
}

.game-request-modal h3 {
    color: #4CAF50;
    margin-bottom: 15px;
}

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

.accept-game-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
}

.reject-game-btn {
    background: rgba(255, 0, 0, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
}

/* Animaciones */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.game-select-modal, .game-request-modal {
    animation: modalFadeIn 0.3s ease-out forwards;
}

/* Estilos para el partido en curso */
.friend-match-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.97), rgba(0, 30, 60, 0.97));
    box-shadow: none;
    border: none;
    border-radius: 0;
    z-index: 1100;
}

.match-header {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

.team {
    flex: 1;
    text-align: center;
    padding: 15px;
    position: relative;
}

.team.local {
    background: linear-gradient(45deg, rgba(76, 175, 80, 0.2), transparent);
    border-radius: 10px;
}

.team.local::after {
    content: '(TÚ)';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
}

.team-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.team-level {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}

.match-score-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
}

.score-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.score-box {
    font-size: 3em;
    font-weight: bold;
    min-width: 60px;
    text-align: center;
}

.score-divider {
    font-size: 2em;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 15px;
}

.score-box.local {
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

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

.score-box.updating {
    animation: scoreUpdate 0.5s ease-out;
}

.player-side {
    text-align: center;
    flex: 1;
}

.vs-symbol {
    margin: 0 20px;
    font-size: 1.5em;
    font-weight: bold;
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.match-score {
    font-size: 3.5em;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.match-score.score-update {
    transform: scale(1.2);
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.match-events {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    width: 90%;
}

.match-events > div:first-child {
    margin-top: inherit;
}

.match-event {
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 8px;
    animation: slideIn 0.3s ease forwards;
    text-align: left;
}

.match-event.goal {
    background: rgba(0, 255, 57, 0.2);
    border: 1px solid #00ff39;
    color: #00ff39;
    font-weight: bold;
}

.match-event.rival-goal {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: #ff6b6b;
    font-weight: bold;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.match-minute {
    background: rgba(76, 175, 80, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.match-text {
    flex: 1;
}

.match-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.match-timer {
    font-family: monospace;
    font-size: 1.5em;
    color: #4CAF50;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
    text-align: center;
    margin: 15px 0;
}

.match-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
}

.match-result {
    position: fixed;
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    z-index: 9999;
    border: 2px solid #4CAF50;
    min-width: 300px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.match-result h3 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.match-result .final-score {
    font-size: 3em;
    margin: 20px 0;
    font-weight: bold;
    color: white;
}

.close-match-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.close-match-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

@keyframes goalPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Mejoras visuales generales */
.vs-symbol {
    font-size: 1.5em;
    font-weight: bold;
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.match-timer {
    font-family: monospace;
    font-size: 1.2em;
    color: #4CAF50;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
    margin: 10px 0;
}

.match-events {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
}

/* Notificación de invitación a juego (partido o ruleta) */
.game-request-notification {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    border: 2px solid #333;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    animation: slideIn 0.3s ease forwards;
    opacity: 1;
    transition: opacity 0.3s;
    min-width: 260px;
    max-width: 100%;
}
.game-request-notification .notification-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.game-request-title {
    color: #333;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}
.game-request-desc {
    color: #333;
    margin: 5px 0;
    font-size: 14px;
}
.game-request-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.game-request-buttons button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}
.accept-btn {
    background: #4CAF50;
    color: white;
}
.accept-btn:hover {
    background: #45a049;
}
.reject-btn {
    background: rgba(255, 0, 0, 0.3);
    color: white;
}
.reject-btn:hover {
    background: rgba(255, 0, 0, 0.5);
} 