.profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    padding: 3rem 5%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.profile-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.profile-actions {
    margin-left: auto;
}

.profile-actions .btn-outline {
    color: var(--white);
    border-color: var(--white);
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

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

.stat-val {
    font-size: 1.5rem;
    font-weight: bold;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.profile-layout {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
}

.profile-menu {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.24);
    padding: 1rem 0;
    height: fit-content;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 2rem;
    color: var(--text-light);
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.menu-item:hover,
.menu-item.active {
    background: rgba(96, 165, 250, 0.12);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.profile-menu-badge {
    min-width: 1.65rem;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.16);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
}

.profile-content {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.24);
    padding: 2rem;
    color: var(--text-dark);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.content-heading {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    color: var(--text-dark);
}

.profile-overview-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-overview-card {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.72);
}

.profile-overview-card strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.profile-overview-card span {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 700;
}

.profile-achievement-panel {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.54);
}

.profile-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.profile-panel-head h4 {
    color: var(--text-dark);
}

.profile-panel-head span {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 800;
}

.profile-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-badge {
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: var(--text-light);
    background: rgba(15, 23, 42, 0.58);
    font-size: 0.84rem;
    font-weight: 800;
}

.profile-badge.is-active {
    border-color: rgba(96, 165, 250, 0.42);
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.22);
}

.profile-suggestion {
    color: var(--text-light);
    line-height: 1.7;
}

.progress-block {
    margin-bottom: 2rem;
}

.progress-block h4 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.progress-note,
.tiny-muted {
    font-size: 0.8rem;
    color: var(--text-light);
}

.progress-bar {
    height: 10px;
    background: rgba(148, 163, 184, 0.22);
    border-radius: 5px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 65%;
}

.progress-fill--secondary {
    width: 80%;
    background-color: #4caf50;
}

.activity-list {
    list-style: disc;
    margin-left: 1.5rem;
    color: var(--text-dark);
}

.activity-list li {
    margin-bottom: 0.5rem;
}

.fav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    margin-bottom: 1rem;
    gap: 1rem;
    background: rgba(30, 41, 59, 0.54);
}

.fav-item h4 {
    margin-bottom: 0.2rem;
}

.profile-unfavorite {
    padding: 0.3rem 1rem;
}

.profile-post-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-delete-post {
    border-color: rgba(248, 113, 113, 0.45);
    color: #fecaca;
}

.fav-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.fav-tag--blue {
    background: #e3f2fd;
    color: #1976d2;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
}

.fav-tag--orange {
    background: #fff3e0;
    color: #f57c00;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
}

.fav-tag--green {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
}

.empty-state {
    color: var(--text-light);
    text-align: center;
    padding: 2rem;
}

.settings-field label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.settings-field .form-control {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.68);
    color: var(--text-dark);
    border-radius: 10px;
    padding: 0.8rem;
    outline: none;
}

.settings-field .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.settings-field .form-control {
    max-width: 460px;
}

.settings-field textarea.form-control {
    max-width: 560px;
    min-height: 96px;
    resize: vertical;
}

.profile-save-note {
    margin-top: 0.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

.profile-save-note.is-error {
    color: #dc2626;
}

.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(2, 6, 23, 0.38);
    pointer-events: none;
}

.profile-modal-card {
    min-width: 160px;
    max-width: min(320px, calc(100vw - 2rem));
    padding: 1rem 1.4rem;
    border: 1px solid rgba(96, 165, 250, 0.36);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.96);
    color: var(--text-dark);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.38);
    text-align: center;
    font-weight: 800;
}

.profile-modal-card.is-error {
    border-color: rgba(248, 113, 113, 0.5);
    color: #fecaca;
}

@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-actions {
        margin-left: 0;
    }

    .profile-stats {
        justify-content: center;
    }

    .profile-overview-cards {
        grid-template-columns: 1fr;
    }

    .fav-item {
        flex-direction: column;
        align-items: flex-start;
    }
}
