.ig-profile-page {
    max-width: 600px;
    margin: -20px auto 0;
    background: #fff;
    min-height: 100vh;
}

.ig-profile-header {
    padding: 12px 16px 0;
    background: #fff;
}

.ig-back-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ig-back-btn {
    color: #262626;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.ig-back-btn svg,
.ig-back-btn i {
    width: 20px;
    height: 20px;
}

.ig-back-row-spacer {
    width: 20px;
}

.ig-header-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #262626;
}

.ig-profile-top {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 14px;
}

.ig-avatar-col {
    flex-shrink: 0;
}

.ig-avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e0e0e0;
    cursor: pointer;
    transition: transform 0.2s;
}

.ig-avatar:active {
    transform: scale(1.05);
}

.ig-avatar-placeholder {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #e0e0e0;
}

.ig-stats-row {
    display: flex;
    flex: 1;
    justify-content: space-around;
    text-align: center;
}

.ig-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #262626;
}

.ig-stat-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: #262626;
}

.ig-stat-label {
    font-size: 0.75rem;
    color: #8e8e8e;
    margin-top: 2px;
}

.ig-bio-section {
    margin-bottom: 12px;
}

.ig-display-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #262626;
    margin-bottom: 4px;
}

.ig-bio-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.ig-elo-badge {
    font-size: 0.85rem;
    font-weight: 600;
    color: #262626;
}

.ig-rank-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    background: #4361ee;
    color: white;
}

.ig-rank-badge.legend {
    background: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 50%, #f107a3 100%);
}

.ig-rank-badge.champion {
    background: linear-gradient(135deg, #e8d5b7 0%, #b8a082 100%);
    color: #4a3f35;
}

.ig-rank-badge.elite {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #5c4d00;
}

.ig-streak {
    font-size: 0.8rem;
    color: #ff6b35;
    font-weight: 600;
    margin-bottom: 2px;
}

.ig-joined {
    font-size: 0.75rem;
    color: #8e8e8e;
}

.ig-action-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ig-action-form {
    flex: 1;
}

.ig-btn {
    display: block;
    width: 100%;
    padding: 7px 0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.ig-btn-follow {
    background: #3897f0;
    color: white;
}

.ig-btn-following {
    background: #efefef;
    color: #262626;
}

.ig-btn-msg {
    flex: 1;
    background: #efefef;
    color: #262626;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ig-stats-cards {
    padding: 0 16px 8px;
    background: #fff;
}

.ig-stats-grid {
    display: flex;
    gap: 8px;
}

.ig-mini-stat {
    flex: 1;
    text-align: center;
    padding: 10px 4px;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid #efefef;
}

.ig-mini-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: #262626;
}

.ig-mini-label {
    font-size: 0.65rem;
    color: #8e8e8e;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ig-rival-card {
    display: block;
    margin: 0 16px 8px;
    padding: 10px 14px;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid #efefef;
    text-decoration: none;
    color: #262626;
    transition: background 0.2s;
}

.ig-rival-card:active {
    background: #f0f0f0;
}

.ig-rival-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: #8e8e8e;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ig-rival-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ig-rival-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.ig-rival-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.ig-rival-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.ig-rival-record {
    font-size: 0.8rem;
}

.ig-content-tabs {
    display: flex;
    border-top: 1px solid #efefef;
    border-bottom: 1px solid #efefef;
    background: #fff;
}

.ig-tab {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    color: #8e8e8e;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.ig-tab.active {
    color: #262626;
    border-bottom-color: #262626;
}

.ig-tab svg,
.ig-tab i {
    width: 22px;
    height: 22px;
}

.ig-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.ig-grid-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #fafafa;
}

.ig-grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ig-grid-text-post {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ig-grid-text-post p {
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.ig-grid-video-icon {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.ig-grid-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    gap: 6px;
}

.ig-grid-play-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    padding-left: 3px;
}

.ig-grid-duration {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

.ig-grid-multi-icon {
    position: absolute;
    top: 6px;
    right: 6px;
}

.ig-grid-multi-icon svg,
.ig-grid-multi-icon i {
    width: 14px;
    height: 14px;
    color: #fff;
}

.ig-grid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

.ig-grid-item:hover .ig-grid-overlay,
.ig-grid-item:active .ig-grid-overlay {
    display: flex;
}

.ig-posts-list {
    padding: 0 8px;
    background: #fafafa;
}

.ig-posts-list.is-hidden {
    display: none;
}

.ig-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #8e8e8e;
}

.ig-empty-state svg,
.ig-empty-state i {
    width: 48px;
    height: 48px;
    color: #ccc;
}

.ig-empty-state h5 {
    color: #262626;
    margin: 16px 0 8px;
}

.ig-empty-state p {
    font-size: 0.9rem;
}

.ig-avatar-placeholder.photo-fallback,
.ig-rival-avatar.photo-fallback {
    display: none !important;
}

.profile-photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.profile-photo-modal.show {
    display: flex !important;
}

.profile-photo-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.profile-photo-modal-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 90vw;
    max-height: 90vh;
    animation: zoomIn 0.2s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.profile-photo-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.profile-photo-full {
    max-width: 85vw;
    max-height: 70vh;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

.profile-photo-name {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 20px;
}

/* Action button row (Follow / Following / Message / Share) */
.ig-action-btns-row {
    margin: 0 0 6px;
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.ig-action-btns-row.is-self {
    margin: 6px 0;
    align-items: stretch;
}

.ig-action-btn-form {
    flex: 1;
}

.ig-action-btn {
    width: 100%;
    padding: 8px 0;
    border-radius: 8px;
    border: 1px solid #dbdbdb;
    background: #fafafa;
    color: #262626;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ig-action-btn-flex {
    flex: 1;
}

.ig-action-btn-primary {
    background: #15803d;
    border: none;
    color: #fff;
}

.ig-action-btn-share {
    width: 40px;
    flex-shrink: 0;
    padding: 0;
}

.ig-action-btn-share svg,
.ig-action-btn-share i {
    width: 15px;
    height: 15px;
}

.ig-action-btn-share-full svg,
.ig-action-btn-share-full i {
    width: 14px;
    height: 14px;
}

/* Skill rating card */
.ig-skill-rating-wrap {
    margin: 6px 16px 8px;
    padding: 0;
}

.ig-skill-rating-card {
    display: block;
    text-decoration: none;
    color: #262626 !important;
    background: #fafafa;
    border: 1px solid #efefef;
    border-radius: 10px;
    overflow: hidden;
}

.ig-skill-rating-body {
    padding: 10px 14px;
}

.ig-skill-rating-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: #8e8e8e;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ig-skill-rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ig-skill-rating-progress {
    position: relative;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.ig-skill-rating-svg {
    width: 34px;
    height: 34px;
    transform: rotate(-90deg);
}

.ig-skill-rating-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.ig-skill-rating-empty-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ig-skill-rating-empty-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.4;
}

.ig-skill-rating-text {
    flex: 1;
    min-width: 0;
}

.ig-skill-rating-title {
    font-weight: 700;
    font-size: 14px;
    color: #262626 !important;
    line-height: 1.2;
}

.ig-skill-rating-title.muted {
    color: #6b7280 !important;
}

.ig-skill-rating-meta {
    font-size: 11px;
    color: #8e8e8e !important;
    margin-top: 2px;
}

.ig-skill-rating-meta.muted {
    color: #9ca3af !important;
}

.ig-skill-rating-meta-accent {
    color: #22c55e !important;
    font-weight: 600;
}

.ig-skill-rating-meta-soft {
    color: #9ca3af !important;
}

.ig-skill-rating-chevron,
.ig-skill-rating-chevron svg,
.ig-skill-rating-chevron i {
    width: 16px;
    height: 16px;
    color: #c7c7c7;
    flex-shrink: 0;
}

.ig-skill-rating-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px;
    border-top: 1px solid #efefef;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
    color: #22c55e !important;
}

.ig-skill-rating-cta svg,
.ig-skill-rating-cta i {
    width: 12px;
    height: 12px;
    color: #22c55e;
}

.ig-skill-rating-cta-label {
    color: #262626 !important;
}

.ig-skill-rating-cta-suffix {
    font-size: 9px;
    color: #8e8e8e !important;
    margin-left: 2px;
}

.ig-skill-rating-cta-prompt {
    color: #22c55e !important;
}
