/* =====================================================
   PLAYER.CSS - Estilos para el Perfil de Jugador
   ===================================================== */

/* Profile Header */
.profile-header {
    background: var(--gradient-bg);
    padding: 120px 5% 40px;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1612872087720-bb876e2e67d1?w=1920&h=1080&fit=crop&q=80') center/cover;
    opacity: 0.1;
    z-index: 0;
}

.profile-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.profile-avatar-large {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 900;
    color: var(--dark-bg);
    flex-shrink: 0;
    border: 5px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-meta {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.meta-item i {
    color: var(--primary-cyan);
}

.profile-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Experience Bar */
.exp-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.exp-level {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-cyan);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exp-points {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.exp-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.exp-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 100px;
    transition: width 1s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.exp-label {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary-cyan);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Achievements & Badges */
.achievements {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.achievement-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

.achievement-badge:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #FFD700;
    transform: scale(1.05);
}

.achievement-icon {
    font-size: 2rem;
    color: #FFD700;
}

.achievement-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.achievement-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Badge Styles (New System) */
.badge-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.badge-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-cyan);
    transform: translateY(-2px);
}

.badge-icon-large {
    font-size: 3rem;
    flex-shrink: 0;
}

.badge-info-detailed {
    flex: 1;
}

.badge-info-detailed h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--primary-cyan);
}

.badge-info-detailed p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.badge-rarity {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.rarity-comun {
    background: rgba(150, 150, 150, 0.2);
    color: #999;
}

.rarity-raro {
    background: rgba(0, 150, 255, 0.2);
    color: #00b4ff;
}

.rarity-epico {
    background: rgba(150, 0, 255, 0.2);
    color: #a855f7;
}

.rarity-legendario {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.badge-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empty-badges {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-badges i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Tournament History */
.tournament-list {
    display: grid;
    gap: 1rem;
}

.tournament-item {
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.tournament-item:hover {
    border-color: var(--primary-cyan);
    background: rgba(0, 212, 255, 0.05);
    transform: translateX(10px);
}

.tournament-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.tournament-details {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tournament-details span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.tournament-result {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.result-badge {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
}

.result-champion {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    border: 2px solid #FFD700;
}

.result-finalist {
    background: rgba(192, 192, 192, 0.2);
    color: #C0C0C0;
    border: 2px solid #C0C0C0;
}

.result-semifinal {
    background: rgba(205, 127, 50, 0.2);
    color: #CD7F32;
    border: 2px solid #CD7F32;
}

.result-participant {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Share Button */
.share-profile {
    position: relative;
}

.share-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--dark-bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1rem;
    display: none;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.share-menu.show {
    display: block;
}

.share-option {
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.share-option:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-cyan);
}

/* Responsive */

/* Mobile Small - < 480px */
@media (max-width: 480px) {
    /* Profile header compacto */
    .profile-header {
        padding: 80px 1rem 30px;
    }

    .profile-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    /* Avatar más pequeño en móvil */
    .profile-avatar-large {
        width: 120px;
        height: 120px;
        font-size: 3rem;
        border-width: 3px;
    }

    .profile-info {
        width: 100%;
    }

    .profile-name {
        font-size: 2rem;
        line-height: 1.2;
        word-break: break-word;
    }

    .profile-meta {
        flex-direction: column;
        gap: 0.75rem;
        margin: 1rem 0;
        align-items: center;
    }

    .meta-item {
        font-size: 0.9rem;
    }

    .profile-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .profile-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    /* Experience bar compacto */
    .exp-container {
        margin: 1rem 0;
        padding: 0.85rem;
        border-radius: 10px;
    }

    .exp-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .exp-level {
        font-size: 1.3rem;
    }

    .exp-points {
        font-size: 0.85rem;
    }

    .exp-bar {
        height: 10px;
    }

    /* Stats grid - 2 columnas en móvil */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .stat-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .stat-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .stat-value {
        font-size: 2rem;
        margin-bottom: 0.4rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Achievements compactos */
    .achievements {
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .achievement-badge {
        padding: 0.85rem 1rem;
        border-radius: 12px;
        gap: 0.6rem;
        width: 100%;
    }

    .achievement-icon {
        font-size: 1.75rem;
    }

    .achievement-info h4 {
        font-size: 0.95rem;
    }

    .achievement-info p {
        font-size: 0.8rem;
    }

    /* Badge items verticales */
    .badge-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
        gap: 0.75rem;
    }

    .badge-icon-large {
        font-size: 2.5rem;
    }

    .badge-info-detailed h4 {
        font-size: 1rem;
    }

    .badge-info-detailed p {
        font-size: 0.85rem;
    }

    .badge-rarity {
        padding: 0.2rem 0.6rem;
        font-size: 0.7rem;
    }

    .badge-date {
        font-size: 0.7rem;
    }

    /* Empty badges compacto */
    .empty-badges {
        padding: 2rem 1rem;
    }

    .empty-badges i {
        font-size: 3rem;
    }

    /* Tournament history compacto */
    .tournament-list {
        gap: 0.75rem;
    }

    .tournament-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
        border-radius: 12px;
    }

    .tournament-item:hover {
        transform: translateY(-2px);
    }

    .tournament-info {
        width: 100%;
    }

    .tournament-info h3 {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }

    .tournament-details {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.85rem;
        align-items: flex-start;
    }

    .tournament-result {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .result-badge {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        text-align: center;
    }

    /* Share menu responsive */
    .share-profile {
        width: 100%;
    }

    .share-menu {
        left: 0;
        right: 0;
        width: calc(100% - 2rem);
        margin: 0.5rem 1rem;
    }

    .share-option {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .profile-content {
        flex-direction: column;
        text-align: center;
    }

    .profile-name {
        font-size: 2rem;
    }

    .profile-meta {
        justify-content: center;
    }

    .profile-actions {
        flex-direction: column;
    }

    .tournament-item {
        flex-direction: column;
        text-align: center;
    }
}
