/* ============================================
   HOME PAGE
   ============================================ */
.map-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
}

#mapCanvas {
    width: 100%;
    height: 100%;
}

.player-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.marker-inner {
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

.marker-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.location-card {
    position: absolute;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 36, 51, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
    min-width: 160px;
}

.location-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.location-rating {
    font-size: 12px;
    color: var(--accent-primary);
    margin-top: 2px;
}

.quick-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.profile-avatar {
    margin-bottom: var(--spacing-md);
}

.avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: white;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.profile-level {
    font-size: 14px;
    color: var(--accent-primary);
    margin-bottom: var(--spacing-lg);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

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

.info-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.info-item {
    background: var(--bg-card);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.info-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.info-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   PLAYER DETAIL PAGE
   ============================================ */
.detail-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.chart-container {
    width: 100%;
    height: 200px;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

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

.stat-icon {
    font-size: 32px;
    margin-bottom: var(--spacing-sm);
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.stat-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   QUICK MATCH PAGE
   ============================================ */
.match-status {
    background: var(--bg-card);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-secondary);
}

.match-status p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.radar-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(45, 53, 72, 0.5);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

#radarChart {
    width: 100%;
    height: 100%;
    display: block;
}

.match-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.match-btn:hover {
    background: #0ea172;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
}

.match-btn.loading .btn-text {
    opacity: 0;
}

.match-btn.loading .btn-loading {
    display: flex;
}

/* ============================================
   VERSUS PAGE
   ============================================ */
.versus-map-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
}

#versusMapCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.versus-player-label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(30, 36, 51, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    min-width: 150px;
}

.versus-player-label.top {
    top: var(--spacing-lg);
}

.versus-player-label.bottom {
    bottom: var(--spacing-lg);
}

.versus-player-label h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.versus-player-label p {
    font-size: 13px;
    color: var(--accent-primary);
}

.versus-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.versus-gradient-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle,
        rgba(16, 185, 129, 0.4) 0%,
        rgba(16, 185, 129, 0.25) 30%,
        rgba(16, 185, 129, 0.1) 60%,
        transparent 100%);
    border-radius: 50%;
    animation: versusGlow 3s ease-in-out infinite;
}

@keyframes versusGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.versus-circle::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle,
        rgba(16, 185, 129, 0.6) 0%,
        rgba(16, 185, 129, 0.3) 50%,
        transparent 100%);
    border-radius: 50%;
    z-index: -1;
}

.table-icon {
    margin-bottom: var(--spacing-sm);
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.3));
    animation: tableFloat 3s ease-in-out infinite;
}

@keyframes tableFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.versus-circle .vs-text {
    font-size: 32px;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 16px rgba(16, 185, 129, 0.8),
                 0 0 40px rgba(16, 185, 129, 0.5);
    letter-spacing: 4px;
}

.match-info-footer {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.match-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.start-match-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.start-match-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

/* ============================================
   AWARDS PAGE
   ============================================ */
.awards-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.award-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.award-card:hover {
    transform: translateX(4px);
    border-color: var(--accent-primary);
}

.award-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.award-info {
    flex: 1;
}

.award-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.award-progress {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

/* ============================================
   DEVICE PAGE
   ============================================ */
.device-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.device-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.device-card:hover {
    border-color: var(--accent-primary);
}

.device-card.connected {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, var(--bg-card), rgba(16, 185, 129, 0.05));
}

.device-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.device-card.connected .device-icon {
    color: var(--accent-primary);
}

.device-info {
    flex: 1;
}

.device-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.device-status {
    font-size: 13px;
    color: var(--text-secondary);
}

.device-card.connected .device-status {
    color: var(--accent-primary);
}

.device-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-tertiary);
    flex-shrink: 0;
}

.device-indicator.connected {
    background: var(--accent-primary);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
    animation: indicatorPulse 2s ease-in-out infinite;
}

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

/* ============================================
   FRIENDS PAGE
   ============================================ */
.friends-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.friend-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.friend-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.friend-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-tertiary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    position: relative;
    flex-shrink: 0;
}

.friend-avatar.online {
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border: 2px solid var(--bg-card);
    border-radius: 50%;
    animation: statusBlink 2s ease-in-out infinite;
}

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

.friend-info {
    flex: 1;
}

.friend-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.friend-status {
    font-size: 13px;
    color: var(--text-secondary);
}

.friend-action {
    padding: 8px 16px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.friend-action:hover {
    background: #0ea172;
    transform: scale(1.05);
}

.friend-action.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.friend-action.secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}
