


.profile-page {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

@media (max-width: 900px) {
    .profile-grid { grid-template-columns: 1fr; margin-top: -80px; }
}

.profile-header {
    position: relative;
    height: 350px;
    border-radius: 24px;
    background-color: #2c3e50;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}
.profile-header::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(39, 39, 39, 1) 0%, transparent 60%);
}

.bg-upload-btn {
    position: absolute; top: 20px; right: 20px;
    background: rgba(0, 0, 0, 0.5); color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px; border-radius: 8px;
    cursor: pointer; font-size: 13px; z-index: 5;
    display: flex; align-items: center; gap: 8px;
    backdrop-filter: blur(5px);
    transition: all 0.2s;
    font-family: inherit; 
}
.bg-upload-btn:hover { background: rgba(0, 0, 0, 0.8); }


.profile-card {
    background: var(--card-bg, #1F1F1F);
    border: 1px solid var(--border-color, #333);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; align-items: center;
}


.profile-avatar-wrapper {
    width: 140px; height: 140px;
    margin-top: -80px; margin-bottom: 15px;
    position: relative;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}
.profile-avatar {
    width: 100%; height: 100%;
    border-radius: 20px; object-fit: cover;
}


.user-identity {
    display: flex; flex-direction: column; align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.profile-username-row {
    font-size: 22px;
    font-weight: 800;
    margin: 0; line-height: 1.3;
    display: flex; flex-wrap: wrap; 
    justify-content: center; align-items: baseline;
    gap: 6px; text-align: center;
}


.profile-prefix { font-weight: 800; } 
.profile-nick { text-shadow: 0 2px 10px rgba(0,0,0,0.2); }

.profile-id-badge {
    font-size: 11px; color: #666;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px; border-radius: 6px;
    margin-top: 6px; font-weight: 600;
    letter-spacing: 0.5px;
}


.ranks-container {
    display: flex; gap: 5px; flex-wrap: wrap; justify-content: center;
    margin-top: 12px;
}

.rank-badge {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 1px solid transparent; 
}


.rank-vip { background: linear-gradient(90deg, #1cd41c, #108a10); border-color: #1cd41c; }
.rank-premium { background: linear-gradient(90deg, #00dada, #009e9e); border-color: #00dada; }
.rank-holy { background: linear-gradient(90deg, #fff8a9, #ffa317); color: #5a3a00; text-shadow: none; border-color: #ffa317; }
.rank-immortal { background: linear-gradient(90deg, #ff70d1, #ff5d6d); border-color: #ff5d6d; }


.rank-divine { background: linear-gradient(90deg, #b451ff, #84b5ff); border-color: #b451ff; }
.rank-thane { background: linear-gradient(90deg, #30ff87, #1cffe4, #3594ff); border-color: #1cffe4; }
.rank-elite { background: linear-gradient(90deg, #ffa51e, #ff5619, #ff314a); border-color: #ff5619; }
.rank-eternal { background: linear-gradient(90deg, #2688ed, #8b00d7, #ff4161); border-color: #8b00d7; }


.rank-celestial { background: linear-gradient(90deg, #e0f3ff, #bfdfff, #96c6ff, #6895d6); color: #003366; text-shadow: none; }
.rank-absolute { background: linear-gradient(90deg, #f200ff, #972a6e, #632f59, #dd57bc); border-color: #f200ff; }
.rank-imperial { background: linear-gradient(90deg, #fdbd05, #ffa630, #fffabd, #fdbd05); color: #5a3a00; text-shadow: none; }
.rank-ultimate { background: linear-gradient(135deg, #4f4f4f, #737272, #3a3a3a); color: #e0e0e0; border-color: #999; }


.rank-warden { background-color: #3c36de; border-color: #5b55ff; } 
.rank-moder { background-color: #4e62eb; border-color: #7081ff; } 
.rank-helper { background-color: #76a6ff; color: #000; text-shadow: none; border-color: #9ec0ff; }
.rank-organizer { background: linear-gradient(90deg, #0d83ae, #00c0eb); border-color: #00c0eb; }
.rank-admin { background: linear-gradient(90deg, #ff2030, #d40048, #c1006b); border-color: #ff2030; }
.rank-chief { background: linear-gradient(90deg, #ff5e43, #db2100); border-color: #ff5e43; }
.rank-dev { background-color: #d61753; border-color: #ff3e7a; }
.rank-builder, .rank-maplead, .rank-srbuilder { background: linear-gradient(90deg, #67ff54, #16bd00); color: #003300; text-shadow: none; border-color: #16bd00; }
.rank-youtube { background: linear-gradient(90deg, #bf2dff, #f33fd7); border-color: #bf2dff; }
.rank-vime { background: linear-gradient(90deg, #2599d4, #1d7cab); border-color: #2599d4; }


.rank-player, .rank-user { 
    background: rgba(255, 255, 255, 0.05); 
    color: #aaa; 
    text-shadow: none; 
    border: 1px solid rgba(255,255,255,0.1); 
}


.guild-info {
    font-size: 13px; color: #f1c40f; margin-bottom: 15px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: rgba(241, 196, 15, 0.1);
    padding: 6px 12px; border-radius: 8px; width: 100%;
}


.level-block {
    width: 100%; margin: 0 0 20px 0;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px; border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.level-header { display: flex; justify-content: space-between; font-size: 12px; color: #ccc; margin-bottom: 6px; font-weight: 600; }
.level-accent { color: var(--accent-color); }
.progress-track { width: 100%; height: 6px; background: rgba(0, 0, 0, 0.3); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-color), #50b5ff); border-radius: 4px; }
.level-details { font-size: 10px; color: #666; margin-top: 6px; text-align: right; }


.mini-stats-list {
    width: 100%; margin-bottom: 20px; padding: 0 5px;
}
.mini-stat-row {
    display: flex; justify-content: space-between;
    font-size: 13px; padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mini-stat-row:last-child { border-bottom: none; }
.ms-label { color: #888; }
.ms-label i { width: 16px; color: var(--accent-color); opacity: 0.7; }
.ms-value { font-weight: 600; color: #fff; }
.color-online { color: #2ecc71; }
.color-offline { color: #e74c3c; }


.profile-team-widget {
    width: 100%; background: rgba(255, 255, 255, 0.03);
    border-radius: 12px; padding: 12px;
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px; text-decoration: none;
    border: 1px solid transparent; transition: all 0.2s;
}
.profile-team-widget:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--border-color); }
.team-mini-avatar { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.team-info h4 { margin: 0; font-size: 14px; color: #fff; }
.team-info span { font-size: 11px; color: var(--accent-color); }


.profile-content-col { display: flex; flex-direction: column; gap: 20px; padding-top: 20px; }
.content-section {
    background: var(--card-bg, #1F1F1F);
    border: 1px solid var(--border-color, #333);
    border-radius: 16px; padding: 25px;
}
.section-title {
    margin: 0 0 20px 0; font-size: 18px; font-weight: 700; color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 15px;
    display: flex; align-items: center; gap: 10px;
}


.socials-list { display: flex; flex-wrap: wrap; gap: 10px; }
.social-icon-link {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 16px; transition: transform 0.2s;
    background: rgba(255,255,255,0.1);
}
.social-icon-link:hover { transform: translateY(-2px); opacity: 0.9; }


.stats-main-wrapper {
    background: var(--card-bg, #1F1F1F);
    border: 1px solid var(--border-color, #333);
    border-radius: 16px; padding: 25px;
}
.stats-period-switch {
    display: flex; background: rgba(0,0,0,0.2);
    border-radius: 10px; padding: 4px; margin-bottom: 20px;
}
.period-btn {
    flex: 1; border: none; background: transparent;
    color: #888; padding: 8px; font-size: 13px; font-weight: 700;
    cursor: pointer; border-radius: 8px; transition: all 0.2s;
    font-family: inherit; 
}
.period-btn.active {
    background: var(--accent-color); color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}


.tickets-banner {
    display: flex; align-items: center; gap: 15px;
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    padding: 15px 20px; border-radius: 12px;
    color: #3e2723; margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.2);
}
.ticket-icon { font-size: 24px; opacity: 0.8; }
.ticket-count { font-size: 20px; font-weight: 800; line-height: 1; }
.ticket-label { font-size: 11px; text-transform: uppercase; font-weight: 700; opacity: 0.8; }


.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.game-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px; padding: 12px;
    text-align: center; transition: all 0.2s;
}
.game-card:hover { background: rgba(255,255,255,0.06); border-color: var(--accent-color); }
.game-name {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 5px;
    
    
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
    position: relative;
    display: block;
    width: 100%; 
}
.game-name span {
    display: inline-block;
    transition: transform 0s linear; 
    will-change: transform; 
}
.game-wins { font-size: 16px; font-weight: 700; color: #fff; }
.game-wins small { font-size: 10px; color: #666; font-weight: 400; }
.empty-stats { text-align: center; color: #666; font-style: italic; padding: 20px; }


.site-role-badge {
    margin-bottom: 15px; 
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    justify-content: center;
}

.role-site-admin {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    border-color: #e74c3c;
}


.role-site-moder {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    border-color: #3498db;
}


.rank-badge {
    font-size: 10px;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}


.mini-stat-row {
    display: flex; justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ms-value-sub {
    display: block;
    font-size: 10px;
    color: #666;
    text-align: right;
    margin-top: 2px;
}



.guild-mini-avatar {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
    background-color: rgba(255,255,255,0.05);
}


.upload-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none; 
    justify-content: center; align-items: center;
    z-index: 9999; backdrop-filter: blur(5px);
}

.upload-modal-content {
    background: #1F1F1F;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 30px;
    width: 500px;
    max-width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.upload-modal-title {
    font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 5px;
}
.upload-modal-subtitle {
    font-size: 13px; color: #888; margin-bottom: 20px;
}


.drop-zone {
    border: 2px dashed #444;
    border-radius: 12px;
    padding: 40px 20px;
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--accent-color);
    background: rgba(44, 143, 255, 0.05);
}

.drop-zone i {
    font-size: 48px; color: #555; margin-bottom: 15px; display: block;
}

.drop-info-main { font-size: 16px; font-weight: 600; color: #ccc; margin-bottom: 5px; }
.drop-info-sub { font-size: 12px; color: #666; }

.drop-zone.drag-over i, .drop-zone.drag-over .drop-info-main {
    color: var(--accent-color);
}


.close-upload-modal {
    position: absolute; top: 15px; right: 15px;
    background: none; border: none; color: #666;
    font-size: 18px; cursor: pointer;
}
.close-upload-modal:hover { color: #fff; }


.trophies-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; 
    padding: 10px;
    justify-content: center;
}

.trophy-item {
    position: relative;
    
    width: 120px;  
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.trophy-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-4px); 
}

.trophy-item img {
    
    width: 100px; 
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); 
}


.trophy-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 110%; 
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    background: #222;
    border: 1px solid #444;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 100;
    transition: opacity 0.2s, bottom 0.2s;
    text-align: center;
    pointer-events: none; 
}


.trophy-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #444 transparent transparent transparent;
}

.trophy-item:hover .trophy-tooltip {
    visibility: visible;
    opacity: 1;
    bottom: 130%; 
}

.tt-title {
    font-weight: 700;
    color: #fff;
    font-size: 13px;
    margin-bottom: 4px;
}

.tt-desc {
    font-size: 11px;
    color: #ccc;
    line-height: 1.3;
    margin-bottom: 6px;
}

.tt-date {
    font-size: 10px;
    color: #666;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 4px;
}


.header-socials-container {
    position: absolute;
    bottom: 50px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 10;
}


.ban-alert-badge {
    position: relative;
    margin-bottom: 15px;
    padding: 10px 0;
    width: 100%;
    border-radius: 8px;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    
    background: #c0392b; 
    color: white;
    box-shadow: 0 4px 0 #962d22;
    border: 1px solid #a93226;
    
    display: flex; 
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: help;
    transition: transform 0.1s;
}

.ban-alert-badge:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #962d22;
}


.ban-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    
    
    left: 0;
    width: 100%; 
    box-sizing: border-box; 
    
    background: #222;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 100;
    transition: opacity 0.2s, bottom 0.2s;
    text-align: left;
    font-size: 12px;
    font-weight: 400;
    text-transform: none;
    line-height: 1.4;
    color: #ccc;
    pointer-events: none;
}

.ban-alert-badge:hover .ban-tooltip {
    visibility: visible;
    opacity: 1;
    bottom: 115%;
}

.bt-row { margin-bottom: 4px; }
.bt-row strong { color: #fff; }


.bt-arrow {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%); 
    border-width: 6px;
    border-style: solid;
    border-color: #222 transparent transparent transparent;
}


.header-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.header-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none; 
}

.header-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}


.bg-upload-btn {
    display: none; 
}





.brand-vk:hover {
    background: #0077FF;
    border-color: #0077FF;
    box-shadow: 0 0 15px rgba(0, 119, 255, 0.4);
}

.brand-telegram:hover {
    background: #2AABEE;
    border-color: #2AABEE;
    box-shadow: 0 0 15px rgba(42, 171, 238, 0.4);
}

.brand-discord:hover {
    background: #5865F2;
    border-color: #5865F2;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.4);
}

.brand-youtube:hover {
    background: #FF0000;
    border-color: #FF0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

.brand-twitch:hover {
    background: #9146FF;
    border-color: #9146FF;
    box-shadow: 0 0 15px rgba(145, 70, 255, 0.4);
}

.brand-github:hover {
    background: #333;
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}


.social-icon-link.is-hidden {
    opacity: 0.4;                
    filter: grayscale(100%);     
    border: 1px dashed #aaa;     
}

.social-icon-link.is-hidden:hover {
    opacity: 1;                  
    filter: none;
    border-style: solid;
}




.light-theme .profile-card, 
.light-theme .content-section, 
.light-theme .stats-main-wrapper {
    background: #ffffff;
    color: #333333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}


.light-theme .section-title {
    color: #222;
    border-bottom-color: var(--border-light);
}


.light-theme .ms-value,
.light-theme .game-wins {
    color: #222222;
}


.light-theme .color-online {
    color: #2ecc71 !important;
}
.light-theme .color-offline {
    color: #e74c3c !important;
}

.light-theme .ms-label,
.light-theme .level-header,
.light-theme .level-details {
    color: #666666;
}


.light-theme .mini-stat-row {
    border-bottom-color: var(--border-light);
}


.light-theme .game-card,
.light-theme .profile-team-widget,
.light-theme .level-block {
    background: #f8f9fa;
}

.light-theme .game-card:hover,
.light-theme .profile-team-widget:hover {
    background: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.light-theme .game-name { color: #555; }
.light-theme .game-wins small { color: #888; }
.light-theme .team-info h4 { color: #333; }


.light-theme .rank-player, 
.light-theme .rank-user {
    background: #f0f0f0;
    color: #555;
    border-color: var(--border-light);
}


.light-theme .profile-id-badge {
    background: #f0f0f0;
    color: #555;
}



.light-theme .social-icon-link:not(:hover) {
    background: rgba(255, 255, 255, 0.623);
    color: #333;
    border: none;
}


.light-theme .social-icon-link:hover {
    color: #ffffff !important;
    border: none;
}


.light-theme .stats-period-switch {
    background: #eeeeee;
}
.light-theme .period-btn {
    color: #666;
}
.light-theme .period-btn.active {
    color: #fff;
}


.light-theme .trophy-item {
    background: #ebedee; 
    border: 1px solid #d1d1d1 !important; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.light-theme .trophy-item:hover {
    background: #ffffff; 
    border-color: var(--accent-color) !important; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}


.light-theme .trophy-tooltip {
    background: #ffffff;
    border-color: var(--border-color);
    color: #333;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}
.light-theme .trophy-tooltip::after {
    border-color: var(--border-color) transparent transparent transparent;
}
.light-theme .tt-title { color: #000; }
.light-theme .tt-desc { color: #555; }
.light-theme .tt-date { border-top-color: var(--border-light); color: #888; }


.light-theme .progress-track {
    background: #e0e0e0;
}
.light-theme .empty-stats {
    color: #999;
}