/* ===== CONTAINER ===== */
.profile-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HERO ===== */
.hero {
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.hero-cover {
    position: relative;
    min-height: 260px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, #0b0b12 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 24px 28px;
    display: flex;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
    width: 100%;
}

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

.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,0.15);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

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

.avatar-edit {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 32px;
    height: 32px;
    background: #667eea;
    border: 2px solid #0b0b12;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.avatar-edit:hover {
    transform: scale(1.1);
    background: #7c3aed;
}

.info {
    flex: 1;
    min-width: 160px;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.name {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.username {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
}

.tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 500;
}

.tag .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.tag.role.admin { background: rgba(239,68,68,0.15); color: #ef4444; }
.tag.role.moderator { background: rgba(245,158,11,0.15); color: #f59e0b; }
.tag.role.blogger { background: rgba(236,72,153,0.15); color: #ec4899; }
.tag.role.user { background: rgba(34,197,94,0.15); color: #22c55e; }

.tag.online { background: rgba(34,197,94,0.15); color: #22c55e; }
.tag.offline { background: rgba(239,68,68,0.15); color: #ef4444; }

.tag .dot {
    background: currentColor;
}

.tag.online .dot { animation: pulse 1.5s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.meta svg {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

.cover-edit {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 6px 16px;
    border-radius: 40px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.cover-edit:hover {
    background: rgba(255,255,255,0.15);
}

/* ===== STATS ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.stat {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 16px;
    padding: 18px;
    text-align: center;
    transition: 0.2s;
}

.stat:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-2px);
}

.stat-num {
    font-size: 26px;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

/* ===== SECTION ===== */
.section {
    margin-bottom: 28px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-head h2 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.section-head .count {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.04);
    padding: 2px 12px;
    border-radius: 40px;
}

.achievements {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.achievement {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
}

.achievement:hover {
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
}

.achievement .icon {
    font-size: 24px;
}

.achievement .text {
    flex: 1;
    min-width: 0;
}

.achievement .title {
    font-weight: 600;
    font-size: 13px;
}

.achievement .desc {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    line-height: 1.4;
}

.achievement .date {
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    margin-top: 2px;
}

/* ===== GRID ===== */
.grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

.card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}

.card-head {
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #fff;
}

.card-head svg {
    width: 16px;
    height: 16px;
    color: #667eea;
}

.card-head .more {
    font-size: 12px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.card-body {
    padding: 12px 18px;
}

/* ===== CONTACTS ===== */
.contact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.contact:last-child {
    border-bottom: none;
}

.contact .icon {
    font-size: 18px;
    width: 28px;
    text-align: center;
}

.contact .info {
    flex: 1;
    min-width: 0;
}

.contact .info small {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,0.3);
}

.contact .info span,
.contact .info a {
    font-size: 13px;
    color: #fff;
    text-decoration: none;
}

.contact .info a:hover {
    color: #667eea;
}

.copy {
    background: none;
    border: none;
    color: rgba(255,255,255,0.2);
    cursor: pointer;
    padding: 4px;
    transition: 0.2s;
}

.copy:hover {
    color: #667eea;
}

/* ===== POSTS ===== */
.post {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.post:last-child {
    border-bottom: none;
}

.post .title {
    display: block;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    margin-bottom: 2px;
    transition: 0.2s;
}

.post .title:hover {
    color: #667eea;
}

.post .meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

.post .status {
    padding: 1px 10px;
    border-radius: 40px;
    font-size: 10px;
    font-weight: 500;
}

.post .status.published { background: rgba(34,197,94,0.1); color: #22c55e; }
.post .status.draft { background: rgba(245,158,11,0.1); color: #f59e0b; }

/* ===== PURCHASES ===== */
.purchase {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.purchase:last-child {
    border-bottom: none;
}

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

.purchase .amount {
    font-weight: 600;
    color: #22c55e;
}

.purchase .date {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

.purchase .badge {
    font-size: 16px;
}

.empty {
    text-align: center;
    padding: 28px 0;
    color: rgba(255,255,255,0.3);
    font-size: 14px;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal.active {
    display: flex;
}

.modal-box {
    background: #14141f;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    max-width: 540px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.modal-box.modal-lg {
    max-width: 680px;
}

.modal-head {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-head h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.modal-head .close {
    background: none;
    border: none;
    font-size: 22px;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    padding: 4px;
}

.modal-head .close:hover {
    color: #fff;
}

.modal-body {
    padding: 18px 20px;
    max-height: 50vh;
    overflow-y: auto;
}

.crop-wrap {
    max-height: 260px;
    overflow: hidden;
    margin-bottom: 12px;
}

.crop-wrap img {
    max-width: 100%;
}

.tools {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tool {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 50%;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.tool:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.aspects {
    display: flex;
    gap: 10px;
    justify-content: center;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    flex-wrap: wrap;
}

.aspect {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    color: rgba(255,255,255,0.6);
    transition: 0.2s;
}

.aspect.active {
    border-color: #667eea;
    color: #fff;
    background: rgba(102,126,234,0.08);
}

.modal-foot {
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #7c3aed);
    border: none;
    padding: 8px 24px;
    border-radius: 40px;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(102,126,234,0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 8px 24px;
    border-radius: 40px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-outline:hover {
    border-color: #667eea;
    color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-cover {
        min-height: 180px;
    }
    .hero-content {
        padding: 16px;
        gap: 16px;
    }
    .avatar {
        width: 72px;
        height: 72px;
    }
    .name {
        font-size: 20px;
    }
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .achievements {
        grid-template-columns: repeat(2, 1fr);
    }
    .modal-box {
        max-width: 100%;
    }
    .cover-edit {
        bottom: 10px;
        right: 10px;
        padding: 4px 12px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr 1fr;
    }
    .achievements {
        grid-template-columns: 1fr;
    }
    .avatar {
        width: 60px;
        height: 60px;
    }
    .name {
        font-size: 17px;
    }
}

/* Hero top elements */
.hero-top {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3;
}

.cover-label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: 20px;
}

.cover-edit-top {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 4px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.cover-edit-top:hover {
    background: rgba(255,255,255,0.2);
}

.edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    text-decoration: none;
    transition: 0.2s;
    margin-left: 8px;
}

.edit-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}