/* ============================================
   AimTap - Profile Page Styles
   ============================================ */

.profile-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 20;
    overflow-y: auto;
    padding: 40px 20px;
}

.profile-container {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-header-card {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-avatar {
    position: relative;
    font-size: 80px;
    color: var(--accent-primary);
    cursor: pointer;
}

.avatar-edit {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--bg-primary);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar-edit:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.profile-info {
    flex: 1;
}

.profile-name-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.profile-name-section h2 {
    font-size: 28px;
    margin-bottom: 0;
    color: var(--text-primary);
}

.edit-nick-btn {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
}

.edit-nick-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.rank-badge {
    display: inline-block;
    padding: 4px 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--bg-primary);
    margin-bottom: 12px;
}

.accuracy-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.accuracy-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.accuracy-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.profile-tab {
    padding: 8px 24px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-tab:hover {
    color: var(--accent-primary);
}

.profile-tab.active {
    color: var(--accent-primary);
    position: relative;
}

.profile-tab.active::after {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
}

.inventory-count {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    color: var(--text-secondary);
}

.profile-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.profile-tab-content.active {
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

.stat-icon {
    font-size: 28px;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    font-family: monospace;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.extra-stats {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.extra-stat {
    flex: 1;
    text-align: center;
}

.extra-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.extra-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-primary);
    font-family: monospace;
}

.recent-games-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    margin-bottom: 0;
    color: var(--text-primary);
}

.recent-games-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.game-history-item:hover {
    transform: translateX(4px);
    background: var(--bg-hover);
}

.game-icon {
    font-size: 24px;
    min-width: 40px;
}

.game-info {
    flex: 2;
}

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

.game-details {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.game-score {
    font-weight: 700;
    color: var(--accent-primary);
}

.game-accuracy {
    color: var(--success);
}

.game-date {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 100px;
    text-align: right;
}

.inventory-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.inventory-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.inventory-stat i {
    font-size: 18px;
    color: var(--accent-primary);
}

.inventory-stat strong {
    color: var(--accent-primary);
    font-family: monospace;
}

.inventory-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 1024px) {
    .inventory-grid .inventory-item {
        width: calc(33.33% - 14px);
    }
}

@media (max-width: 768px) {
    .profile-header-card {
        flex-direction: column;
        text-align: center;
    }
    .profile-name-section {
        justify-content: center;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .extra-stats {
        flex-direction: column;
        gap: 16px;
    }
    .game-history-item {
        flex-direction: column;
        text-align: center;
    }
    .game-date {
        text-align: center;
    }
    .inventory-grid .inventory-item {
        width: calc(50% - 10px);
    }
    .profile-tabs {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .inventory-grid .inventory-item {
        width: 100%;
    }
}