/* =========================================================
   Profile Page - Complete modular styles
   ========================================================= */

.profile-page {
    padding-top: 70px;
    background: var(--bg-primary);
    min-height: calc(100vh - 70px);
}

.profile-hero {
    position: relative;
    padding: 40px 0 30px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.profile-hero .profile-title {
    color: var(--text-primary);
}

.profile-hero .profile-subtitle {
    color: var(--text-secondary);
}

.profile-title {
    font-size: 3.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.profile-subtitle {
    font-size: 1.6rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.profile-search {
    max-width: 560px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    box-shadow: 0 4px 20px var(--shadow-sm);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 6px 24px var(--accent-overlay);
}

.search-box i {
    color: var(--text-muted);
    font-size: 1.6rem;
    margin-right: 12px;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.6rem;
    outline: none;
    min-width: 0;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    border: none;
    background: var(--accent);
    color: #fff;
    padding: 10px 28px;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

@media (hover: hover) {
    .search-box button:hover {
        background: var(--accent-dark);
        transform: scale(1.03);
    }
}

.profile-hero-player {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.profile-hero-main {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1 1 auto;
    min-width: 0;
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-wrap.hero-avatar .profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    border: 3px solid var(--border-color);
    box-shadow: 0 4px 16px var(--shadow-sm);
    background: var(--bg-secondary);
    object-fit: cover;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    box-shadow: 0 4px 16px var(--shadow-md);
    object-fit: cover;
    background: var(--bg-secondary);
}

.online-dot {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid var(--bg-card);
}

.profile-hero .online-dot {
    border-color: var(--bg-primary);
    width: 18px;
    height: 18px;
    bottom: 4px;
    right: 4px;
}

.online-dot.online {
    background: #22c55e;
}

.online-dot.offline {
    background: #9ca3af;
}

.profile-hero-meta {
    color: var(--text-primary);
}

.profile-hero-name {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.profile-hero-rank {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.profile-hero-rank.placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

.profile-hero-rank .glyph-img {
    height: 80px !important;
    width: auto !important;
    vertical-align: middle;
}

/* Light mode: darken bright Minecraft rank colors for readability (no shadows) */
[data-theme="light"] .profile-page span[style*="color:#55FF55"] { color: #16a34a !important; }
[data-theme="light"] .profile-page span[style*="color:#55FFFF"] { color: #0891b2 !important; }
[data-theme="light"] .profile-page span[style*="color:#FFFF55"] { color: #ca8a04 !important; }
[data-theme="light"] .profile-page span[style*="color:#5555FF"] { color: #1d4ed8 !important; }
[data-theme="light"] .profile-page span[style*="color:#FF5555"] { color: #dc2626 !important; }
[data-theme="light"] .profile-page span[style*="color:#FF55FF"] { color: #c026d3 !important; }
[data-theme="light"] .profile-page span[style*="color:#FFFFFF"] { color: #374151 !important; text-shadow: none !important; }
[data-theme="light"] .profile-page span[style*="text-shadow"] { text-shadow: none !important; }

.profile-hero .profile-badges {
    margin-bottom: 10px;
}

.profile-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.profile-badges .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.profile-badges .badge-online {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.profile-badges .badge-offline {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.profile-badges .badge-bound {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.profile-badges .badge-unbound {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.profile-badges .badge-banned {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.profile-hero-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

.hero-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    text-align: center;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.profile-content {
    padding: 24px 0 80px;
}

.profile-content .container {
    width: 100%;
    max-width: 100%;
    padding-left: 24px;
    padding-right: 24px;
}

@media (min-width: 992px) {
    .profile-content .container {
        padding-right: 0;
    }
}

.main-row {
    --bs-gutter-x: 48px;
    margin-left: 0;
    margin-right: 0;
}

.main-row > .main-col-left,
.main-row > .main-col-right {
    padding-left: calc(var(--bs-gutter-x) / 2);
    padding-right: calc(var(--bs-gutter-x) / 2);
}

.main-row > .main-col-left {
    padding-left: 0;
}

.main-row > .main-col-right {
    padding-right: 0;
}

@media (max-width: 991px) {
    .profile-content .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .main-row {
        --bs-gutter-x: 30px;
    }

    .main-row > .main-col-left,
    .main-row > .main-col-right {
        padding-left: calc(var(--bs-gutter-x) / 2);
        padding-right: calc(var(--bs-gutter-x) / 2);
    }

    .main-col-left + .main-col-right {
        margin-top: 28px;
    }
}

/* Module blocks */
.module-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px var(--shadow-sm);
    margin-bottom: 28px;
}

.module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.module-header .section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.module-header .section-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin: 0;
    width: 100%;
}

/* Game rows - PlayHive style */
.game-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.game-row {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

@media (hover: hover) {
    .game-row:hover {
        border-color: var(--accent);
        box-shadow: 0 4px 20px var(--shadow-sm);
    }
}

.game-row-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.game-row-name {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.game-row-en {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.game-row-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.game-row-stat {
    background: var(--stat-bg);
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
}

.game-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.game-stat-label {
    display: block;
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
    margin-top: 4px;
}

/* Show more / expandable lists */
.show-more-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 1.3rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    margin-top: 8px;
}

.show-more-btn.small {
    padding: 8px 12px;
    font-size: 1.2rem;
    margin-top: 6px;
    width: auto;
}

@media (hover: hover) {
    .show-more-btn:hover {
        background: var(--menu-item-hover);
        border-color: var(--accent);
        color: var(--accent);
    }
}

.expandable-list {
    display: none;
    margin-top: 8px;
}

.expandable-list.expanded {
    display: block;
}

/* Game row MOST PLAYED badge */
.game-row-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: var(--accent);
    color: #fff;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* Locker */
.locker-group {
    margin-bottom: 24px;
}

.locker-group:last-child {
    margin-bottom: 0;
}

.locker-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.locker-group-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.locker-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

.cosmetic-active {
    margin-bottom: 12px;
}

.cosmetic-label {
    display: block;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.cosmetic-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    font-size: 1.3rem;
    color: var(--text-secondary);
}

.cosmetic-tag.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.cosmetic-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cosmetic-card,
.friends-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cosmetic-card:hover,
.friends-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px var(--shadow-sm);
    transform: translateY(-1px);
}

.cosmetic-card-header,
.friends-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
}

.card-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.cosmetic-card:hover .card-hint,
.friends-card:hover .card-hint {
    color: var(--accent);
    transform: translateX(2px);
}

.rank-card:focus,
.cosmetic-card:focus,
.friends-card:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.empty-state {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    font-size: 1.3rem;
}

.friends-preview,
.friends-modal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cosmetic-modal-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Rank card - PlayHive style */
.rank-label {
    display: block;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.rank-tag {
    display: inline-block;
    padding: 6px 14px;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 10px;
}

.rank-tag.active {
    background: var(--accent);
    color: #fff;
}

.rank-tag.active > span {
    color: inherit !important;
}

.rank-tag .glyph-img {
    height: 56px !important;
    width: auto !important;
    vertical-align: middle;
}

.rank-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.rank-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px var(--shadow-sm);
    transform: translateY(-1px);
}

.rank-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.rank-card .locker-group-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.rank-card .locker-count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    font-size: 1.1rem;
}

.rank-card-active {
    margin-top: 8px;
}

.rank-card-active .rank-tag {
    font-size: 1.2rem;
}

.rank-card-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-card-item {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.rank-card-item .glyph-img {
    height: 40px !important;
    width: auto !important;
    vertical-align: middle;
}

/* All ranks modal */
.all-ranks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 6px;
}

.all-ranks-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 1.5rem;
    font-weight: 600;
}

.all-ranks-item:hover {
    border-color: var(--accent);
    background: var(--menu-item-hover);
}

.all-ranks-item.active {
    border-color: var(--accent);
    background: var(--menu-item-hover);
}

.all-ranks-text .glyph-img {
    height: 64px !important;
    width: auto !important;
    vertical-align: middle;
}

.rank-status {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--accent);
    margin-left: 8px;
    flex-shrink: 0;
}

.rank-card-item .mc-bright,
.all-ranks-text .mc-bright,
.rank-detail-text .mc-bright,
.profile-hero-rank .mc-bright {
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Activity */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.activity-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.activity-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.activity-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

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

.activity-stat .stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.activity-stat .stat-label {
    display: block;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Friends */
.friends-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.friend-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    font-size: 1.3rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.friend-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

/* Bindings */
.bindings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.binding-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.binding-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}

.binding-info {
    display: flex;
    flex-direction: column;
}

.binding-info strong {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.binding-info span {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Modal - PlayHive style */
.game-modal.fade .modal-dialog,
.rank-modal.fade .modal-dialog {
    transform: scale(0.96) translateY(24px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    will-change: transform, opacity;
}

.game-modal.show .modal-dialog,
.rank-modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.game-modal .modal-content,
.rank-modal .modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.game-modal .modal-header-custom,
.rank-modal .modal-header-custom {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 18px 64px 18px 24px;
    border-bottom: 1px solid var(--border-color);
}

.game-modal .modal-title,
.rank-modal .modal-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    padding-right: 0;
    line-height: 1.35;
    word-break: break-word;
}

.game-modal .close,
.rank-modal .close {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.8rem;
    line-height: 1;
    text-shadow: none;
    opacity: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 3px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
    .game-modal .close:hover,
    .rank-modal .close:hover {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
        transform: translateY(-50%) rotate(90deg);
    }
}

.game-modal .modal-body,
.rank-modal .modal-body {
    padding: 20px 24px 26px;
}

.modal-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.modal-section-header {
    grid-column: 1 / -1;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.modal-section-header:first-child {
    margin-top: 0;
}

.modal-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px 14px;
    text-align: left;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.modal-stat-card .value {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
}

.modal-stat-card .label {
    display: block;
    font-size: 1.2rem;
    color: var(--accent);
    margin-top: 4px;
    font-weight: 500;
}

.modal-progress {
    margin-top: 18px;
}

.modal-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-progress-bar {
    height: 10px;
    background: var(--bg-secondary);
    border-radius: 5px;
    overflow: hidden;
}

.modal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Game detail modal content */
.game-detail-modal {
    color: var(--text-primary);
}

.game-detail-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 18px;
}

.game-detail-header h4 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
}

.game-detail-header span {
    font-size: 1.3rem;
    color: var(--text-muted);
}

/* Rank detail modal */
.rank-detail-preview {
    text-align: center;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 16px;
}

.rank-detail-status {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.rank-detail-text {
    font-size: 2rem;
    font-weight: 700;
}

.rank-detail-text .glyph-img {
    height: 96px !important;
    width: auto !important;
    vertical-align: middle;
}

.rank-detail-info {
    color: var(--text-secondary);
}

.rank-detail-info code {
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 1.2rem;
}

/* Badge rank in hero */
.badge-rank .glyph-img {
    height: 28px !important;
    width: auto !important;
    vertical-align: middle;
}

/* Glyph images in rank text */
.glyph-img {
    height: 56px !important;
    width: auto !important;
    vertical-align: middle;
}

/* Footer - match homepage background */
.profile-page + .footer {
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.profile-page + .footer .logo {
    max-height: 70px;
    width: auto;
    margin: 0 auto;
}

.profile-page + .footer .social-links {
    margin: 24px 0;
}

.profile-page + .footer .social-links ul li a {
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 1.3rem;
    background: var(--social-bg);
    color: #fff;
}

@media (hover: hover) {
    .profile-page + .footer .social-links ul li a:hover {
        background: var(--social-hover-bg);
        color: var(--accent);
    }
}

@media (max-width: 991px) {
    .profile-hero-player {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .profile-hero-stats {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .profile-hero {
        padding: 30px 0 24px;
    }

    .profile-hero-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .profile-hero-name {
        font-size: 2.4rem;
    }

    .game-row-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .module-block {
        padding: 18px;
        border-radius: 12px;
    }

    .module-header .section-title {
        font-size: 1.6rem;
    }

    .activity-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .rank-tag .glyph-img {
        height: 56px !important;
    }

    .rank-list-item .glyph-img {
        height: 52px !important;
    }
}

/* =========================================================
   Profile search autocomplete (fuzzy)
   ========================================================= */

.search-box {
    position: relative;
}

.search-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    max-height: 360px;
    overflow-y: auto;
    z-index: 200;
    padding: 6px;
    animation: suggestFadeIn 0.14s ease-out;
}

@keyframes suggestFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: background 0.12s ease, color 0.12s ease;
    user-select: none;
}

.suggest-item-icon {
    color: var(--text-muted);
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.suggest-item-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggest-match {
    color: var(--accent);
    font-weight: 700;
}

@media (hover: hover) {
    .suggest-item:hover {
        background: var(--menu-item-hover);
    }

    .suggest-item:hover .suggest-item-icon {
        color: var(--accent);
    }
}

.suggest-item.active {
    background: var(--menu-item-hover);
    color: var(--text-primary);
}

.suggest-item.active .suggest-item-icon {
    color: var(--accent);
}

/* Scrollbar styling for the dropdown */
.search-suggest::-webkit-scrollbar {
    width: 8px;
}

.search-suggest::-webkit-scrollbar-track {
    background: transparent;
}

.search-suggest::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.search-suggest::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

@media (max-width: 768px) {
    .search-suggest {
        max-height: 280px;
    }

    .suggest-item {
        font-size: 1.4rem;
        padding: 12px 16px;
    }
}
