/* ================================================
   COMMUNITY CSS — Single unified stylesheet
   Used by: index.php, view.php, tag.php, create.php
   ================================================ */

/* ========================= */
/*  BASE / RESET              */
/* ========================= */

body {
    background: #f5f5f5;
    margin: 0;
    padding: 0;
}

/* ========================= */
/*  HAMBURGER TOGGLE BUTTON   */
/* ========================= */

.sidebar-toggle-label {
    position: fixed;
    left: 1rem;
    top: 5.5rem;
    width: 40px;
    height: 40px;
    background: #ff7400;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-toggle-label:hover {
    background: #e66a00;
}

.sidebar-toggle-label.sidebar-active {
    left: calc(280px + 1rem);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger-icon span {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ========================= */
/*  LAYOUT — DASHBOARD        */
/* ========================= */

.community-dashboard {
    min-height: calc(100vh - 80px);
    background: #f5f5f5;
}

/* ========================= */
/*  LEFT SIDEBAR              */
/* ========================= */

.sidebar-left {
    position: fixed;
    top: 30px;
    left: -280px;
    width: 280px;
    height: 100vh;
    flex-shrink: 0;
    background: white;
    border-right: 1px solid #e5e5e5;
    padding: 3.5rem 1.65rem 0;
    overflow-y: auto;
    z-index: 100;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-left.sidebar-open {
    left: 0;
}

/* Show nav links on view/create pages */
/* .sidebar-left .community-nav nav {
    display: block !important;
} */

/* ========================= */
/*  SIDEBAR OVERLAY           */
/* ========================= */

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* ========================= */
/*  PAGE HEADER & SEARCH      */
/* ========================= */

.page-header {
    margin-bottom: 2rem;
}

.community-search {
    position: relative;
}

.community-search__input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 3rem;
    border: 1px solid #e5e5e5;
    border-radius: 47px;
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    font-weight: 500;
}

.community-search__input:focus {
    border-color: #ff7400;
    box-shadow: 0 0 0 3px rgba(255, 116, 0, 0.1);
}

.community-search__btn {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-search__btn svg path {
    fill: #999;
}

.community-member-link {
    color: inherit;
    text-decoration: none;
}

.community-member-link:hover,
.community-member-link:focus-visible {
    color: #ff7400;
}

.community-member-link:focus-visible {
    outline: 2px solid #ff7400;
    outline-offset: 3px;
    border-radius: 6px;
}

.community-page-search {
    width: 100%;
}

.community-sidebar-search {
    margin-bottom: 1.5rem;
}

.community-search--sidebar {
    width: 100%;
    min-width: 0;
}

.community-search--sidebar .community-search__input {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    font-size: 15px;
}

.search-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================= */
/*  THREAD CARDS              */
/* ========================= */

.threads-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.thread-card {
    padding: 1.5rem;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
    position: relative;
    display: flex;
    gap: 1rem;
}

.thread-card:last-child {
    border-bottom: none;
}

.thread-card:hover {
    background: #EEF8FC;
    cursor: pointer;
}

/* Override Bootstrap .card styles on AJAX-loaded li.thread-card */
li.thread-card,
li.thread-card.card {
    list-style: none;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    background: white;
}

li.thread-card .card-body {
    padding: 0;
}

/* Delete button */
.delete-thread-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
    margin-left: auto;
}

.delete-thread-btn:hover {
    opacity: 1;
}

.delete-thread-btn:hover svg path {
    stroke: #ef4444;
}

/* ========================= */
/*  AVATAR                    */
/* ========================= */

.avatar-column {
    flex-shrink: 0;
}

.avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: #ff7400;
}

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

.avatar-text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: white;
}

/* ========================= */
/*  CONTENT COLUMN            */
/* ========================= */

.content-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badges-wrapper {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.username {
    font-weight: 400;
    font-size: 15px;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.3;
}

.timestamp {
    font-size: 13px;
    color: #999;
    line-height: 1.3;
}

.replies-badge {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

/* ========================= */
/*  TITLE ROW & TAG BADGE     */
/* ========================= */

.title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.tag-badge {
    display: inline-block;
    background: #DBF1FE;
    color: #05A2F5;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 5px;
}

.thread-title {
    display: inline;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0;
}

.thread-title a {
    color: inherit;
    text-decoration: none;
}

.thread-excerpt {
    font-size: 16px;
    color: #000000E5;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ========================= */
/*  THREAD FOOTER             */
/* ========================= */

.thread-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.replies-text {
    font-size: 13px;
    color: #999;
    text-decoration: none;
}

.replies-text:hover {
    color: #ff7400;
}

/* ========================= */
/*  LIKE BUTTON & ANIMATIONS  */
/* ========================= */

.like-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.liked__icon {
    width: 20px;
    height: 20px;
    overflow: visible;
}

.liked__icon path:first-child {
    stroke: #000;
    transition: stroke 140ms ease;
}

.liked__icon path:last-child {
    opacity: 0;
    transform: scale(0.92);
    transform-origin: center;
    transition:
        opacity 140ms ease,
        transform 220ms cubic-bezier(.2, .9, .3, 1);
}

.like-button[data-liked="true"] .liked__icon path:first-child {
    stroke: #e2264d;
}

.like-button[data-liked="true"] .liked__icon path:last-child {
    opacity: 1;
    transform: scale(1);
    animation:
        heart-blink 120ms ease,
        heart-pulse 420ms cubic-bezier(.3, .9, .3, 1) 120ms;
}

@keyframes heart-blink {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

@keyframes heart-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }
}

.like-button::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    background: #e2264d;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    box-shadow:
        -12px -10px #e2264d,
        12px -10px #ff6a88,
        -14px 6px #ff9fb1,
        14px 6px #e2264d,
        0px -16px #ff6a88,
        0px 16px #ff9fb1;
}

.like-button[data-liked="true"]::after {
    animation: confetti-burst 520ms ease-out;
}

@keyframes confetti-burst {
    0% {
        opacity: 1;
        transform: scale(0.3);
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: scale(1.4);
    }
}

.like-button:not([data-liked="true"]) .liked__icon path:last-child {
    opacity: 0;
    transform: scale(0.95);
}

.like-button:active .liked__icon {
    transform: scale(0.94);
}

/* ========================= */
/*  RIGHT SIDEBAR — HOT TOPICS */
/* ========================= */

.hot-topics-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 77px;
}

.hot-topics-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 13px;
}

.topic-item {
    padding: 5px 0;
    display: block;
    text-decoration: none;
}

.topic-item:last-child {
    padding-bottom: 0;
}

.topic-title {
    font-size: 15px;
    font-weight: 500;
    color: #000000;
    line-height: 1.2;
    margin-bottom: 0;
    transition: color 0.2s;
    padding-left: 15px;
    position: relative;
}

.topic-title::before {
    content: "# ";
    color: #ff7400;
    font-weight: 500;
    position: absolute;
    left: 0;
}

.topic-meta {
    font-size: 13px;
    font-weight: 400;
    color: #999;
    padding-left: 15px;
}

/* ========================= */
/*  NO MORE TEXT              */
/* ========================= */

.no-more-text {
    text-align: center;
    color: #000000B2;
    font-size: 14px;
    margin-top: 15px;
    font-weight: 400;
}

/* ========================= */
/*  MOBILE BUTTON RESET       */
/* ========================= */

.mobile__button :is(a, button) {
    all: unset;
    cursor: pointer;
}

/* ========================= */
/*  VIEW.PHP — AUTHOR STYLES  */
/* ========================= */

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #ff7400;
}

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

.author-avatar-text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.author-name {
    font-weight: 500;
    font-size: 15px;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.3;
}

.author-meta {
    font-size: 13px;
    font-weight: 400;
    color: #999;
    margin-left: 6px;
}

.replies-count {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

/* ========================= */
/*  VIEW.PHP — THREAD CONTENT */
/* ========================= */

.thread-content-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.thread-body {
    font-size: 16px;
    color: #1a1a1a;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.thread-body p {
    margin-bottom: 1rem;
}

.thread-body img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
    display: block;
    margin: 1rem 0;
    border-radius: 8px;
}

.thread-body,
.reply-card {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ========================= */
/*  VIEW.PHP — THREAD TAGS    */
/* ========================= */

.thread-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.thread-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    background: #F6F7F9;
    color: #1a1a1a;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
}

.thread-tag .hash {
    color: #ff7400;
}

.thread-tag:hover {
    background: #eeeeee;
}

/* ========================= */
/*  VIEW.PHP — REPLY BODY IMG */
/* ========================= */

.reply-body img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
    display: block;
    margin: 0.75rem 0;
    border-radius: 8px;
}

/* ========================= */
/*  VIEW.PHP — COMMENT FORM   */
/* ========================= */

.comment-input {
    width: 100%;
    min-height: 80px;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
}

.comment-input::placeholder {
    color: #bbb;
}

.comment-post-btn {
    background: #B4B4B4;
    color: white;
    border: none;
    padding: 8px 30px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-post-btn.active {
    background: #ff7400;
}

.comment-post-btn:hover.active {
    background: #e66a00;
}

/* ========================= */
/*  TAG.PHP — INFINITE SCROLL */
/* ========================= */

.scroll-loader {
    text-align: center;
    padding: 2rem 0;
}

.scroll-loader .spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid #e5e5e5;
    border-top-color: #ff7400;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================= */
/*  TAG.PHP — GUIDELINES CARD */
/* ========================= */

.guidelines-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 77px;
}

.guidelines-card h5 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 13px;
}

.guidelines-card ol {
    padding-left: 18px;
    margin: 0;
}

.guidelines-card ol li {
    font-size: 14px;
    color: #333;
    line-height: 1.8;
}

/* ========================= */
/*  TAG.PHP — NEW THREAD BTN  */
/* ========================= */

.new-thread-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ff7400;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.new-thread-btn:hover {
    background: #e66a00;
    color: white;
}

/* ========================= */
/*  FOOTER LINKS              */
/* ========================= */

.footer-links {
    margin-top: 2rem;
    font-size: 13px;
    color: #999;
}

.footer-links a {
    color: #666;
    text-decoration: none;
}

.footer-links a:hover {
    color: #ff7400;
}

.footer-links .sep,
.footer-links .separator {
    margin: 0 4px;
    color: #ccc;
}

/* ========================= */
/*  CREATE.PHP — PAGE LAYOUT  */
/* ========================= */

.create-post-page {
    background-color: #f5f5f5;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
}

.main-container {
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

/* ========================= */
/*  CREATE.PHP — USER AVATAR  */
/* ========================= */

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

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

.user-badge {
    background-color: #DBF1FE;
    color: #05A2F5;
    font-size: 12px;
    font-weight: 500;
    padding: 1px 10px;
    border-radius: 4px;
}

/* ========================= */
/*  CREATE.PHP — FORM INPUTS  */
/* ========================= */

.title-input {
    width: 100%;
    padding: 13px 24px;
    border: none;
    font-size: 26px;
    color: #9E9E9E;
}

.title-input::placeholder {
    color: #9E9E9E;
}

.title-input:focus {
    border-bottom-color: #E0E0E0;
    background-color: transparent;
}

.add-tags-btn {
    font-size: 15px;
    font-weight: 500;
    color: #000000;
    background: #F6F7F9;
    border: 0;
    padding: 5px 10px;
    border-radius: 20px;
}

.add-tags-btn:hover {
    text-decoration: underline;
}

/* ========================= */
/*  CREATE.PHP — TAG CHIPS    */
/* ========================= */

.tag-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: #f8f8f8;
    border: 1.5px solid #e0e0e0;
    padding: 6px 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    white-space: nowrap;
    line-height: 1.4;
}

.tag-chip:hover {
    border-color: #ff7400;
    color: #ff7400;
    background: #fff5eb;
}

/* When the hidden checkbox is checked, style the label as active */
.btn-check:checked+.tag-chip {
    background: #ff7400;
    color: #fff;
    border-color: #ff7400;
    box-shadow: 0 2px 8px rgba(255, 116, 0, 0.25);
}

.btn-check:checked+.tag-chip:hover {
    background: #e66a00;
    border-color: #e66a00;
}

.btn-check:focus+.tag-chip {
    box-shadow: 0 0 0 3px rgba(255, 116, 0, 0.15);
}

.visibility-select {
    padding: 0rem 1rem 0px 0px;
    border: 0px;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg width="10" height="6" viewBox="0 0 10 6" fill="none" xmlns="http://www.w3.org/2000/svg"%3e%3cpath d="M1 1L5 5L9 1" stroke="%23666" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right center;
}

.post-btn {
    background-color: #ff7400;
    color: white;
    border: none;
    padding: 0.65rem 2rem;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.post-btn:hover {
    background-color: #e66a00;
}

/* ========================= */
/*  CREATE.PHP — GUIDELINES   */
/* ========================= */

.guidelines-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: item;
}

.guidelines-list li {
    font-size: 15px;
    color: #000000;
    padding: 4.5px 0;
    padding-left: 1rem;
    position: relative;
}

.guidelines-list li::before {
    content: counter(item) ".";
    counter-increment: item;
    position: absolute;
    left: 0;
    font-weight: 400;
    color: #000;
}


/* =====================================================
   MEDIA QUERIES — Organized by priority (large → small)
   ===================================================== */

/* ---------- min-width: 768px (Desktop) ---------- */
@media (min-width: 768px) {
    .sidebar-toggle-label {
        display: flex;
    }

    .community-search {
        min-width: 320px;
    }

    .community-search--sidebar {
        min-width: 0;
    }
}

/* ---------- max-width: 991.98px (Tablet) ---------- */
@media (max-width: 991.98px) {
    .community-dashboard {
        flex-direction: column;
    }

    .flex-fill {
        margin-left: 0 !important;
    }

    .sidebar-left {
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
        padding: 1rem 1rem 0;
    }

    .title-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .thread-title {
        font-size: 16px;
    }

    .tag-badge {
        font-size: 11px;
        padding: 2px 6px;
    }

    .thread-details-card {
        margin-top: 0;
    }

    .guidelines-card {
        margin-top: 0;
    }

    .main-container {
        margin-left: 0 !important;
    }

    .offset-lg-1 {
        margin-left: 0;
    }
}

/* ---------- max-width: 767.98px (Mobile landscape) ---------- */
@media (max-width: 767.98px) {
    .page-header {
        flex-direction: column;
        align-items: stretch !important;
    }

    .search-row {
        width: 100%;
    }

    .community-search {
        flex: 1;
        min-width: 0;
    }

    .community-search__input {
        padding-left: 2.75rem;
    }
}

/* ---------- max-width: 575px (Mobile portrait) ---------- */
@media (max-width: 575px) {
    .thread-card {
        padding: 1rem;
    }

    .avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .thread-title {
        font-size: 15px;
    }

    .thread-excerpt {
        font-size: 14px;
    }

    .username {
        font-size: 14px;
    }

    .replies-badge {
        position: static;
        margin-top: 0px;
        font-size: 14px;
    }

    .card-header-row {
        margin-bottom: 0.75rem;
    }

    .tag-badge {
        font-size: 10px;
        padding: 2px 5px;
    }

    .community-search {
        width: 100%;
    }

    .content-column {
        gap: 0px;
    }

    .title-row {
        margin-bottom: 10px;
        flex-direction: column-reverse;
        align-items: start;
        gap: 15px;
    }

    .user-details {
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }

    .reply-card {
        padding: 1rem;
    }
}

/* ========================= */
/*  PUBLIC MEMBER PROFILE     */
/* ========================= */

.public-member {
    min-height: 70vh;
    padding: 32px 0 72px;
    color: #131b2e;
    background: #f6f8fb;
}

.public-member__container {
    max-width: 1120px;
}

.public-member__back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 18px;
    color: #536174;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.public-member__back:hover {
    color: #ff7400;
}

.public-member__profile,
.public-member__stats,
.public-member__posts {
    overflow: hidden;
    border: 1px solid #e2e7ee;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(24, 39, 75, 0.05);
}

.public-member__cover {
    height: 264px;
    overflow: hidden;
    background: #f9c67d;
}

.public-member__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.public-member__identity {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr) auto;
    align-items: end;
    gap: 22px;
    padding: 0 34px;
}

.public-member__avatar-wrap {
    align-self: start;
    margin-top: -66px;
}

.public-member__avatar {
    display: flex;
    width: 132px;
    height: 132px;
    align-items: center;
    justify-content: center;
    border: 5px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 8px 24px rgba(24, 39, 75, 0.18);
}

.public-member__avatar--initials {
    color: #fff;
    background: linear-gradient(145deg, #ff8b2b, #ff6500);
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -2px;
}

.public-member__name-block {
    padding: 22px 0 5px;
}

.public-member__name-block h1 {
    margin: 0 0 4px;
    color: #131b2e;
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.public-member__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #697589;
    font-size: 14px;
    font-weight: 500;
}

.public-member__share {
    display: flex;
    gap: 8px;
    padding-bottom: 7px;
}

.public-member__share a,
.public-member__share button {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #dfe5ec;
    border-radius: 50%;
    color: #46546a;
    background: #fff;
    transition: color .2s ease, border-color .2s ease, transform .2s ease, background .2s ease;
}

.public-member__share a:hover,
.public-member__share button:hover,
.public-member__share button.is-copied {
    border-color: #ff7400;
    color: #ff7400;
    background: #fff7f0;
    transform: translateY(-1px);
}

.public-member__bio {
    max-width: 820px;
    margin: 22px 34px 30px 204px;
    color: #49566a;
    font-size: 17px;
    line-height: 1.65;
}

.public-member__stats,
.public-member__posts {
    margin-top: 22px;
    padding: 28px 30px 30px;
}

.public-member__section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.public-member__section-heading h2 {
    margin: 0;
    color: #131b2e;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.public-member__section-heading a {
    color: #536174;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.public-member__section-heading a:hover {
    color: #ff7400;
}

.public-member__stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.public-member__stat {
    display: flex;
    min-height: 96px;
    align-items: center;
    gap: 14px;
    padding: 17px;
    border: 1px solid #e7ebf0;
    border-radius: 14px;
    background: #fbfcfe;
}

.public-member__stat-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ff7400;
    background: #fff0e4;
}

.public-member__stat--lessons .public-member__stat-icon,
.public-member__stat--lab .public-member__stat-icon {
    color: #2468d5;
    background: #eaf2ff;
}

.public-member__stat--streak .public-member__stat-icon {
    color: #e85d04;
    background: #fff0df;
}

.public-member__stat--battles .public-member__stat-icon {
    color: #7c4dcc;
    background: #f1eaff;
}

.public-member__stat--community .public-member__stat-icon {
    color: #168665;
    background: #e5f7f1;
}

.public-member__stat strong,
.public-member__stat span {
    display: block;
}

.public-member__stat strong {
    margin-bottom: 2px;
    color: #131b2e;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.1;
}

.public-member__stat > div > span {
    color: #6b778a;
    font-size: 13px;
    font-weight: 500;
}

.public-member__post-list {
    border-top: 1px solid #edf0f4;
}

.public-member__post {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 4px;
    border-bottom: 1px solid #edf0f4;
    color: #131b2e;
    text-decoration: none;
}

.public-member__post:hover {
    color: #ff7400;
}

.public-member__post strong,
.public-member__post small {
    display: block;
}

.public-member__post strong {
    margin-bottom: 5px;
    font-size: 16px;
    font-weight: 650;
}

.public-member__post small {
    color: #788397;
    font-size: 13px;
}

.public-member__empty {
    margin: 0;
    padding: 24px 0;
    color: #788397;
    text-align: center;
}

@media (max-width: 767.98px) {
    .public-member {
        padding: 20px 0 48px;
    }

    .public-member__cover {
        height: 180px;
    }

    .public-member__identity {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 14px;
        padding: 0 20px;
    }

    .public-member__avatar-wrap {
        margin-top: -42px;
    }

    .public-member__avatar {
        width: 88px;
        height: 88px;
        border-width: 4px;
        font-size: 28px;
    }

    .public-member__name-block {
        padding-top: 14px;
    }

    .public-member__name-block h1 {
        font-size: 27px;
    }

    .public-member__share {
        grid-column: 1 / -1;
        padding-bottom: 0;
    }

    .public-member__bio {
        margin: 18px 20px 24px;
        font-size: 16px;
    }

    .public-member__stats,
    .public-member__posts {
        padding: 22px 18px;
    }

    .public-member__stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .public-member__cover {
        height: 150px;
    }

    .public-member__stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {

    .liked__icon path,
    .like-button::after {
        animation: none;
        transition: none;
    }
}
