body {
    margin: 0;
    padding: 20px;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #2a2a2a;
    color: #f0f0f0;
}

.main-content {
    overflow-x: hidden;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto;
    color: #ffffff;
}

.page-header {
    display: flex;
    align-items: center;
    background-color: #1f1f1f;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.back-button {
    font-size: 16px;
    color: #ffffff;
    text-decoration: none;
    background-color: #ffaf61;
    border-radius: 5px;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    line-height: 20px;
    height: auto;
    padding: 12px 16px;
}

.back-button:hover {
    background-color: #ffaa42;
}

.top-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #3f3f3f;
    border-radius: 5px;
    color: #ffffff;
    font-size: 18px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    padding: 12px;
    height: auto;
}

.action-button:hover {
    background-color: #5a5a5a;
}

.action-button .iconify {
    font-size: 20px;
}

.action-button::before {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    z-index: 10;
}

.action-button:hover::before {
    opacity: 1;
    visibility: visible;
}


.profile-container {
    min-width: 0;
    width: 100%;
    flex-shrink: 1;
}

.profile-card {
    background-color: #1f1f1f;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

.row-container {
    display: flex;
    flex-direction: column;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.nickname-block {
    text-align: center;
}

.nickname {
    font-family: Minecraft, serif;
    font-size: 36px;
    color: #ffffff;
    word-break: break-word;
}

.skin {
    width: 200px;
    height: auto;
    border-radius: 10px;
    box-shadow: none;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffaf61;
    border-bottom: 1px solid #3c3c3c;
    padding-bottom: 5px;
}

.sub-section-title {
    font-size: 16px;
    margin: 20px 0 10px;
    font-weight: 500;
    color: #ffaf61;
}

.info-block {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.info-label {
    font-size: 14px;
    color: #bbbbbb;
}

.info-value {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
}

.game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.exp-chart {
    width: 100%;
    height: 400px;
}

.real-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.real-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.real-info-item .icon {
    font-size: 22px;
    color: #ffaf61;
    margin-top: 2px;
}

.social-networks .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.social-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 22px;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    position: relative;
}

.social-links a:hover {
    background-color: rgba(255, 175, 97, 0.15);
}

.social-links a::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
}

.social-links a:hover::before {
    opacity: 1;
    visibility: visible;
}

.tooltip {
    position: relative;
    cursor: help;
    display: inline-block;
    color: #ffaf61;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333333;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    z-index: 10;
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

#rewards {
    width: 100%;
}

.awards {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
    margin-top: 20px;
    gap: 10px;
    max-width: 100%;
    overflow: visible;
}

.award {
    width: 50px;
    height: 50px;
    flex: 0 1 auto;
    min-width: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffaf61;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    border-radius: 5px;
}

.award::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2c2c2c;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1;
}

.award:hover::before,
.award:focus::before {
    opacity: 1;
    visibility: visible;
}

.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #FF5050;
    color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    display: none;
    z-index: 1000;
}

.error-message button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #ffaf61;
    border: none;
    color: #ffffff;
    cursor: pointer;
    border-radius: 5px;
}


@media (min-width: 1080px) {
    .row-container {
        flex-direction: row;
        gap: 20px;
    }

    .main-content {
        overflow-x: auto;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        max-width: 1080px;
        margin: 0 auto;
    }

    .main-content .profile-container {
        max-width: 640px;
        margin-right: 20px;
    }

    .main-content .profile-info-container {
        width: 100%;
    }

    .row-container.rows-2 > * {
        width: 50%;
    }

    /*
    .main-content {
        max-width: 1080px;
        margin: 0 auto;
    }
    */
    #exp-chart {
        max-width: 1280px;
        margin: 0 auto;
        margin-top: 24px;
    }

    #more-accounts-block {
        max-width: 1280px;
        margin: 0 auto;
        margin-top: 24px;
    }
}

@media (max-width: 768px) {
    .skin {
        width: 140px;
    }

    .nickname {
        font-size: 28px;
    }

    .game-stats {
        grid-template-columns: 1fr;
    }

    .real-info {
        gap: 10px;
    }

    .real-info-item {
        flex-direction: row;
    }

    .social-links {
        justify-content: flex-start;
    }

    .award {
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
    }

    .awards {
        justify-content: flex-start;
        gap: 8px;
        padding: 0 12px;
    }

    .award::before {
        bottom: auto;
        left: auto;
        top: 100%;
        transform: translateY(0);
    }


    .more-accounts {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
        gap: 12px;
        justify-content: center;
        padding: 0 12px;
    }


    .ghost {
        width: 100%;
        max-width: 90px;
        margin: 0 auto;
    }

    .ghost .img {
        width: 72px;
        height: 72px;
    }


    .ghost img:first-child {
        width: 72px;
        height: 72px;
    }


}


.more-accounts-block {
    width: 100%;
    height: 400px;
    background: #fff;
    padding: 55px 0 70px;
}

.more-accounts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px; /* уменьшенный отступ между элементами */
    justify-content: flex-start;
    align-items: center;
    padding: 0 10px;
}


.ghost {
    width: 96px; /* можно подогнать под размер аватарки */
    margin: 0; /* убираем лишние отступы */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ghost .img {
    width: 90px;
    height: 90px;
}

.ghost img:first-child {
    width: 90px;
    height: 90px;
    border-radius: 8px;
}

.ghost img:nth-child(2) {
    width: 65px;
    position: relative;
    top: -120px;
    left: 60px;
}


.ghost p {

    font-size: 13px;
    line-height: 1.2;
    color: #fff;
    word-break: break-word;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    margin-top: 17px;
    text-align: center;

    display: -webkit-box;
    -webkit-line-clamp: 2; /* максимум 2 строки */
    -webkit-box-orient: vertical;
}

.ghost .ghost:first-child {
    margin-left: -15px;
}
