#page-profile {
    padding: 20px;
    color: #fff;
    position: relative;
}

.profile-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7a3fd1 0%, #4a1a8a 100%);
    border: 1px solid rgba(212, 164, 255, 0.6);
    color: #FFD700;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
    z-index: 10;
}

.profile-close:active {
    transform: scale(0.9);
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.profile-avatar-big {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #2a2a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #fff;
    overflow: hidden;
}

.profile-avatar-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 22px;
    font-weight: bold;
}

.profile-username {
    font-size: 14px;
    color: #888;
    margin-top: 4px;
}

.profile-stats {
    background: linear-gradient(135deg, #5a2a9a 0%, #3a1a6a 100%);
    border: 1px solid rgba(212, 164, 255, 0.4);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    padding: 10px 20px;
    margin-bottom: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: 15px;
    background: linear-gradient(135deg, #5a2a9a 0%, #3a1a6a 100%);
    border: 1px solid rgba(212, 164, 255, 0.35);
    border-radius: 14px;
    margin-bottom: 8px;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-label {
    text-align: left;
}

.profile-buttons {
    display: flex;
    gap: 8px;
}

.profile-btn {
    flex: 1;
    padding: 15px;
    background: linear-gradient(135deg, #7a3fd1 0%, #4a1a8a 100%);
    border: 1px solid rgba(212, 164, 255, 0.5);
    border-radius: 16px;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
}

.profile-btn:active {
    transform: scale(0.97);
}

.profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.profile-overlay-content {
    position: relative;
    background: linear-gradient(160deg, #5a2a9a 0%, #3a0a5a 60%, #2a0540 100%);
    border: 1px solid rgba(212, 164, 255, 0.5);
    border-radius: 20px;
    padding: 24px 20px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    color: #fff;
}

.profile-overlay-scroll {
    max-height: calc(80vh - 48px);
    overflow-y: auto;
}

.profile-overlay-content h2 {
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 20px;
    color: #FFD700;
    text-shadow: 0 0 12px rgba(212, 164, 255, 0.8);
    letter-spacing: 1px;
}

.profile-cats-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.profile-cats-title {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
    margin-bottom: -2px;
    text-align: left;
}

.profile-cat-item {
    background: linear-gradient(135deg, #5a2a9a 0%, #3a1a6a 100%);
    border-radius: 12px;
    padding: 8px;
    text-align: center;
    position: relative;
    border: 2px solid transparent;
}

.profile-cat-item[data-element="fire"]  { border-color: #e74c3c; }
.profile-cat-item[data-element="water"] { border-color: #3498db; }
.profile-cat-item[data-element="earth"] { border-color: #27ae60; }
.profile-cat-item[data-element="air"]   { border-color: #bdc3c7; }

.profile-cat-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

.profile-cat-name {
    font-size: 11px;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-cat-item[data-element="fire"]  .profile-cat-name { color: #e74c3c; }
.profile-cat-item[data-element="water"] .profile-cat-name { color: #3498db; }
.profile-cat-item[data-element="earth"] .profile-cat-name { color: #27ae60; }
.profile-cat-item[data-element="air"]   .profile-cat-name { color: #bdc3c7; }

.profile-cat-count {
    position: absolute;
    bottom: -2px;
    right: -4px;
    background: #A52A2A;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 8px;
    z-index: 2;
}

.profile-paws-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: 15px;
    background: linear-gradient(135deg, #5a2a9a 0%, #3a1a6a 100%);
    border: 1px solid rgba(212, 164, 255, 0.35);
    border-radius: 14px;
    margin-bottom: 8px;
}

.profile-paws-title {
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
}
.profile-ava-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.profile-report-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}
#profile-name {
    text-shadow:
        -1px -1px 0 #000,
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}
.ava-wrap-big {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 6px;
}

.ava-wrap-big .profile-avatar-big {
    margin-bottom: 0;
}
/* === АККОРДЕОН КОТОВ В ПРОФИЛЕ === */
.acc-element {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(135deg, #5a2a9a 0%, #3a1a6a 100%);
    border: 1px solid rgba(212, 164, 255, 0.4);
    border-radius: 14px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    margin-bottom: 10px;
    transition: 0.15s;
}
.acc-element:active { transform: scale(0.98); }

.acc-element .acc-count {
    color: #FFD700;
    font-size: 14px;
    margin-left: auto;
    margin-right: 10px;
}

.acc-arrow {
    color: #FFD700;
    font-size: 14px;
    transition: transform 0.25s;
    display: inline-block;
}
.acc-element.open .acc-arrow,
.acc-rarity.open .acc-arrow {
    transform: rotate(90deg);
}

.acc-element-body,
.acc-rarity-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.acc-element.open + .acc-element-body {
    max-height: 4000px;
}
.acc-rarity.open + .acc-rarity-body {
    max-height: 1500px;
}

.acc-rarity {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, #3a1a5a 0%, #2a0a4a 100%);
    border: 1px solid rgba(212, 164, 255, 0.3);
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    color: #d4a4ff;
    cursor: pointer;
    margin: 6px 0;
    transition: 0.15s;
}
.acc-rarity:active { transform: scale(0.98); }

.acc-rarity .acc-count {
    color: #FFD700;
    font-size: 13px;
    margin-left: auto;
    margin-right: 10px;
}

.acc-cats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px 0;
}

.acc-cat {
    background: linear-gradient(135deg, #5a2a9a 0%, #3a1a6a 100%);
    border-radius: 12px;
    padding: 8px;
    text-align: center;
    position: relative;
    border: 2px solid transparent;
}
.acc-cat[data-element="fire"]  { border-color: #e74c3c; }
.acc-cat[data-element="water"] { border-color: #3498db; }
.acc-cat[data-element="earth"] { border-color: #27ae60; }
.acc-cat[data-element="air"]   { border-color: #bdc3c7; }

.acc-cat img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

.acc-cat-name {
    font-size: 11px;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.acc-cat-count {
    position: absolute;
    bottom: -2px;
    right: -4px;
    background: #A52A2A;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 8px;
    z-index: 2;
}
.profile-gems {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.profile-gem {
    position: relative;
    width: 36px;
    height: 36px;
}

.profile-gem img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.profile-gem.locked img {
    opacity: 0.5;
}

.profile-gem-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    pointer-events: none;
}