* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f4f6f8;
    color: #111827;
}

body.modal-open,
body.profile-open {
    overflow: hidden;
}

/* HEADER */

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #111827;
    color: white;
    height: 86px;
    padding: 0 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 36px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 54px;
    height: 54px;
    background: #ff5a1f;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.logo-text h2 {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -1px;
}

.logo-text span {
    display: block;
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 3px;
}

nav {
    display: flex;
    gap: 28px;
}

.nav-link {
    border: none;
    background: transparent;
    font-family: inherit;
    cursor: pointer;

    color: #d1d5db;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
}

.nav-link.active,
.nav-link:hover {
    color: #ff5a1f;
}

.right-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.right-nav > button {
    background: #ff5a1f;
    color: white;
    border: none;
    border-radius: 14px;
    padding: 13px 22px;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
}

.right-nav > button:hover {
    background: #e94d13;
}

/* LOGGED-IN USER MENU */

.user-menu {
    position: relative;
}

.user-menu[hidden] {
    display: none;
}

.user-menu-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    border: 1px solid #374151;
    border-radius: 14px;
    background: #1f2937;
    color: white;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
}

.user-menu-button:hover {
    border-color: #ff5a1f;
    background: #273244;
}

#headerUserAvatar {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff1e8;
    font-size: 16px;
}

#headerUserName {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1100;
    width: 180px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.2);
}

.user-dropdown[hidden] {
    display: none;
}

.user-dropdown button,
.user-dropdown a {
    width: 100%;
    display: block;
    padding: 11px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #111827;
    text-align: left;
    text-decoration: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    box-sizing: border-box;
}

.user-dropdown button:hover,
.user-dropdown a:hover {
    background: #fff1e8;
    color: #ff5a1f;
}

.user-dropdown a[hidden] {
    display: none;
}

#logoutButton {
    color: #dc2626;
}

#logoutButton:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* HERO */

.hero {
    max-width: 1180px;
    margin: 56px auto 32px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 34px;
    align-items: center;
}

.hero-left {
    background: white;
    border-radius: 28px;
    padding: 52px;
    border: 1px solid #e5e7eb;
}

.badge {
    display: inline-block;
    background: #fff1e8;
    color: #ff5a1f;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 64px;
    line-height: 1;
    letter-spacing: -3px;
    margin-bottom: 22px;
}

.hero p {
    color: #6b7280;
    font-size: 21px;
    line-height: 1.55;
    max-width: 700px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.primary,
.secondary {
    border: none;
    border-radius: 999px;
    padding: 16px 28px;
    font-family: inherit;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
}

.primary {
    background: #ff5a1f;
    color: white;
}

.primary:hover {
    background: #e94d13;
}

.secondary {
    background: #111827;
    color: white;
}

.secondary:hover {
    background: #1f2937;
}

.hero-card {
    background: #111827;
    color: white;
    border-radius: 28px;
    padding: 34px;
    min-height: 310px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.18);
}

.hero-card .emoji {
    font-size: 58px;
    margin-bottom: 18px;
}

.hero-card h3 {
    font-size: 28px;
    margin-bottom: 14px;
}

.hero-card p {
    color: #e5e7eb;
    font-size: 19px;
    line-height: 1.45;
}

.agree {
    color: #ffb199;
    font-weight: 900;
    margin-top: 24px;
}

/* COMPOSER */

.composer {
    max-width: 1180px;
    margin: 0 auto 34px;
    padding: 34px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
}

.composer h2 {
    font-size: 28px;
    margin-bottom: 18px;
}

textarea {
    width: 100%;
    height: 130px;
    border: 1px solid #d1d5db;
    border-radius: 18px;
    padding: 18px;
    font-size: 17px;
    resize: vertical;
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: #ff5a1f;
    box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.1);
}

.composer-char-count {
    margin-top: 8px;
    text-align: right;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 700;
}

.composer-footer {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

select {
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    font-family: inherit;
    font-weight: 700;
}

select:focus {
    outline: none;
    border-color: #ff5a1f;
}

.post-btn {
    background: #ff5a1f;
    color: white;
    border: none;
    border-radius: 999px;
    padding: 15px 28px;
    font-family: inherit;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
}

.post-btn:hover {
    background: #e94d13;
}

.post-btn:disabled {
    cursor: wait;
    opacity: 0.7;
}

/* MAIN GRID */

.content-grid {
    max-width: 1180px;
    margin: 0 auto 50px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 260px;
    gap: 24px;
    align-items: start;
}

.left-panel,
.right-panel {
    position: sticky;
    top: 104px;
    align-self: start;
    max-height: calc(100vh - 122px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
    width: 6px;
}

.left-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}

.left-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track {
    background: transparent;
}

.panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 22px;
    margin-bottom: 22px;
}

.panel h3 {
    font-size: 19px;
    margin-bottom: 18px;
}

.category-list {
    list-style: none;
}

.category-list li {
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
    color: #374151;
    font-weight: 700;
    border-bottom: 1px solid #f1f2f4;
}

.category-list span {
    color: #ff5a1f;
}

.stat {
    margin-bottom: 18px;
}

.stat strong {
    display: block;
    font-size: 30px;
    color: #ff5a1f;
}

.stat span {
    color: #6b7280;
    font-weight: 600;
}

/* FEED */

.feed {
    min-width: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    overflow: hidden;
}

.feed-column {
    min-width: 0;
    scroll-margin-top: 110px;
}

.feed {
    min-width: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    overflow: hidden;
    scroll-margin-top: 110px;
}

.feed-column {
    min-width: 0;
    scroll-margin-top: 110px;
}

.feed > h2 {
    padding: 20px 22px;
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    font-size: 24px;
}

.post {
    display: flex;
    gap: 12px;
    padding: 18px 20px 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s ease;
}

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

.post:hover {
    background: #fafafa;
}

.post-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff1e8;
    font-size: 20px;
}

.post-body {
    flex: 1;
    min-width: 0;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.post-author-line {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    font-size: 14px;
}

.post-author-line strong {
    color: #111827;
}

.post-author-line span {
    color: #6b7280;
}

.more-button {
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
}

.post-text {
    margin-top: 5px;
    color: #111827;
    font-size: 16px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.post-category {
    display: inline-block;
    margin-top: 10px;
    color: #ff5a1f;
    font-size: 12px;
    font-weight: 800;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    max-width: 520px;
    padding: 13px 0;
}

.action-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    margin: -6px -8px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #536471;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition:
        color 0.18s ease,
        background 0.18s ease;
}

.action-button:hover,
.action-button.active {
    color: #ff5a1f;
    background: #fff1e8;
}

.action-button.voted {
    color: #ff5a1f;
}

/* COMMENTS */

.comments-section {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
    border-top: 1px solid transparent;
    transition:
        max-height 0.25s ease,
        opacity 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
}

.comments-section.open {
    max-height: 1600px;
    opacity: 1;
    transform: translateY(0);
    border-top-color: #eff1f3;
}

.comments-inner {
    padding: 8px 0 16px;
}

.comments-list {
    display: flex;
    flex-direction: column;
}

.comment {
    display: flex;
    gap: 9px;
    padding: 11px 0;
    border-bottom: 1px solid #f1f3f5;
}

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

.compact-comment-avatar {
    flex-shrink: 0;
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff1e8;
    font-size: 13px;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.comment-header strong {
    color: #111827;
    font-weight: 800;
}

.comment-username {
    color: #6b7280;
}

.comment-delete-button {
    flex-shrink: 0;
    margin-left: auto;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.comment-delete-button:hover {
    color: #ff5a1f;
}

.comment-content p {
    margin-top: 2px;
    color: #111827;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.no-comments,
.comments-loading,
.comments-error {
    padding: 10px 0;
    color: #6b7280;
    font-size: 13px;
}

.view-all-comments-button {
    display: inline-flex;
    align-items: center;
    border: none;
    background: transparent;
    color: #ff5a1f;
    padding: 9px 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.view-all-comments-button:hover {
    text-decoration: underline;
}

.view-all-comments-button[hidden] {
    display: none;
}

.comment-composer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 13px;
    border-top: 1px solid #eff1f3;
}

.comment-composer input {
    flex: 1;
    min-width: 0;
    height: 40px;
    border: 1px solid #cfd9de;
    border-radius: 999px;
    padding: 0 16px;
    background: white;
    color: #111827;
    font-family: inherit;
    font-size: 14px;
}

.comment-composer input:focus {
    outline: none;
    border-color: #ff5a1f;
    box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.1);
}

.comment-button {
    height: 36px;
    border: none;
    border-radius: 999px;
    padding: 0 16px;
    background: #ff5a1f;
    color: white;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.comment-button:hover {
    background: #e94d13;
}

.feed-loading,
.feed-error {
    padding: 20px;
    color: #6b7280;
}

/* RIGHT PANEL */

.right-panel p {
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 10px;
}

blockquote {
    color: #374151;
    font-size: 16px;
    line-height: 1.55;
    border-left: 4px solid #ff5a1f;
    padding-left: 14px;
}

/* AUTHENTICATION MODAL */

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-modal[hidden] {
    display: none;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(6px);
}

.auth-modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 460px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 38px;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    background: white;
    box-shadow: 0 28px 80px rgba(17, 24, 39, 0.35);
    animation: authModalEnter 0.2s ease;
}

@keyframes authModalEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    font-family: inherit;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.auth-modal-close:hover {
    background: #fff1e8;
    color: #ff5a1f;
}

.auth-modal-logo {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 18px;
    background: #ff5a1f;
    font-size: 28px;
}

.auth-modal-card h2 {
    padding-right: 40px;
    color: #111827;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.8px;
}

.auth-modal-subtitle {
    margin-top: 10px;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.55;
}

.auth-message {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.auth-message[hidden] {
    display: none;
}

.auth-message.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.auth-message.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.auth-form {
    display: flex;
    flex-direction: column;
    margin-top: 24px;
}

.auth-form[hidden] {
    display: none;
}

.auth-form label {
    margin: 0 0 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

.auth-form input {
    width: 100%;
    height: 48px;
    margin-bottom: 16px;
    padding: 0 15px;
    border: 1px solid #d1d5db;
    border-radius: 13px;
    background: white;
    color: #111827;
    font-family: inherit;
    font-size: 15px;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #ff5a1f;
    box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.12);
}

.auth-submit-button {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    border: none;
    border-radius: 999px;
    background: #ff5a1f;
    color: white;
    font-family: inherit;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

.auth-submit-button:hover {
    background: #e94d13;
}

.auth-submit-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.auth-switch-text {
    margin-top: 20px;
    color: #6b7280;
    text-align: center;
    font-size: 14px;
}

.auth-switch-button {
    border: none;
    background: transparent;
    color: #ff5a1f;
    font-family: inherit;
    font-size: inherit;
    font-weight: 900;
    cursor: pointer;
}

.auth-switch-button:hover {
    text-decoration: underline;
}

.auth-forgot-password-button {
    display: block;
    width: 100%;
    margin: -8px 0 16px;
    border: none;
    background: transparent;
    color: #6b7280;
    text-align: right;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.auth-forgot-password-button:hover {
    color: #ff5a1f;
    text-decoration: underline;
}

/* PROFILE SLIDE-OUT PANEL */

/* EDIT PROFILE MODAL */

.edit-profile-modal {
    position: fixed;
    inset: 0;
    z-index: 7000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.edit-profile-modal[hidden] {
    display: none;
}

.edit-profile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(6px);
}

.edit-profile-card {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    background: white;
    box-shadow: 0 28px 80px rgba(17, 24, 39, 0.35);
    animation: editProfileEnter 0.2s ease;
}

@keyframes editProfileEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.edit-profile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.edit-profile-label {
    display: block;
    margin-bottom: 5px;
    color: #ff5a1f;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.edit-profile-header h2 {
    color: #111827;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.7px;
}

.edit-profile-close {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    font-family: inherit;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.edit-profile-close:hover {
    background: #fff1e8;
    color: #ff5a1f;
}

.edit-profile-avatar-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #f9fafb;
}

.edit-profile-avatar-circle {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    border-radius: 50%;
    background: #fff1e8;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.1);
    font-size: 30px;
}

.edit-profile-avatar-preview strong {
    display: block;
    color: #111827;
    font-size: 15px;
}

.edit-profile-avatar-preview p {
    margin-top: 4px;
    color: #6b7280;
    font-size: 13px;
}

.edit-profile-avatar-details {
    flex: 1;
    min-width: 0;
}

.edit-profile-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-top: 12px;
    padding: 0 16px;
    border: 1px solid #ff5a1f;
    border-radius: 999px;
    background: white;
    color: #ff5a1f;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition:
        background 0.18s ease,
        color 0.18s ease;
}

.edit-profile-upload-button:hover {
    background: #fff1e8;
}

.edit-profile-file-name {
    display: block;
    max-width: 260px;
    margin-top: 8px;
    overflow: hidden;
    color: #6b7280;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edit-profile-avatar-circle {
    overflow: hidden;
}

.edit-profile-avatar-circle img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

#editProfileForm {
    display: flex;
    flex-direction: column;
}

#editProfileForm label {
    margin-bottom: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

#editProfileForm input,
#editProfileForm textarea {
    width: 100%;
    margin-bottom: 17px;
    border: 1px solid #d1d5db;
    border-radius: 13px;
    background: white;
    color: #111827;
    font-family: inherit;
    font-size: 15px;
}

#editProfileForm input {
    height: 48px;
    padding: 0 15px;
}

#editProfileForm textarea {
    min-height: 120px;
    padding: 14px 15px;
    resize: vertical;
}

#editProfileForm input:focus,
#editProfileForm textarea:focus {
    outline: none;
    border-color: #ff5a1f;
    box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.12);
}

.edit-profile-bio-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.edit-profile-bio-row span {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 700;
}

.edit-profile-message {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.edit-profile-message[hidden] {
    display: none;
}

.edit-profile-message.error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.edit-profile-message.success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.edit-profile-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 5px;
}

.edit-profile-cancel,
.edit-profile-save {
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.edit-profile-cancel {
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
}

.edit-profile-cancel:hover {
    background: #f3f4f6;
}

.edit-profile-save {
    border: none;
    background: #ff5a1f;
    color: white;
}

.edit-profile-save:hover {
    background: #e94d13;
}

.edit-profile-save:disabled {
    cursor: wait;
    opacity: 0.7;
}

.profile-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 5990;
    background: rgba(17, 24, 39, 0.52);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.profile-panel-overlay[hidden] {
    display: none;
}

.profile-panel-overlay.open {
    opacity: 1;
}

.profile-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 6000;
    width: min(430px, 100%);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: white;
    border-left: 1px solid #e5e7eb;
    box-shadow: -24px 0 60px rgba(17, 24, 39, 0.22);
    transform: translateX(100%);
    visibility: hidden;
    transition:
        transform 0.26s ease,
        visibility 0.26s ease;
}

.profile-panel.open {
    transform: translateX(0);
    visibility: visible;
}

.profile-panel-header {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
    border-bottom: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.profile-panel-header h2 {
    color: #111827;
    font-size: 22px;
    font-weight: 900;
}

.profile-panel-close {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    font-family: inherit;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.profile-panel-close:hover {
    background: #fff1e8;
    color: #ff5a1f;
}

.profile-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 26px;
    scrollbar-width: thin;
}

.profile-panel-content::-webkit-scrollbar {
    width: 7px;
}

.profile-panel-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}

.profile-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.profile-loading,
.profile-error {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.profile-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.profile-card {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    background: white;
}

.profile-cover {
    height: 112px;
    background:
        radial-gradient(
            circle at 18% 30%,
            rgba(255, 255, 255, 0.22),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #111827,
            #ff5a1f
        );
}

.profile-main {
    position: relative;
    padding: 0 22px 24px;
}

.profile-avatar-large {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -43px;
    border: 5px solid white;
    border-radius: 50%;
    background: #fff1e8;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.13);
    font-size: 40px;
}

.profile-name-row {
    margin-top: 14px;
}

.profile-display-name {
    color: #111827;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -0.6px;
}

.profile-username {
    display: block;
    margin-top: 3px;
    color: #6b7280;
    font-size: 14px;
}

.profile-bio {
    margin-top: 18px;
    color: #374151;
    font-size: 15px;
    line-height: 1.55;
}

.profile-bio.empty {
    color: #9ca3af;
    font-style: italic;
}

.profile-joined {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 650;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 17px;
}

.profile-stat {
    padding: 17px 8px;
    text-align: center;
    background: #f9fafb;
}

.profile-stat + .profile-stat {
    border-left: 1px solid #e5e7eb;
}

.profile-stat strong {
    display: block;
    color: #111827;
    font-size: 21px;
    font-weight: 900;
}

.profile-stat span {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.profile-section {
    margin-top: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: white;
}

.profile-section-header {
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.profile-section-header h3 {
    color: #111827;
    font-size: 17px;
    font-weight: 900;
}

.profile-recent-vents {
    max-height: 390px;
    overflow-y: auto;
    padding: 12px;
    background: #f8fafc;
    scrollbar-width: thin;
}

.profile-recent-vents::-webkit-scrollbar {
    width: 6px;
}

.profile-recent-vents::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}

.profile-recent-vents::-webkit-scrollbar-track {
    background: transparent;
}

.profile-vent {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 17px;
    background: white;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.profile-vent + .profile-vent {
    margin-top: 11px;
}

.profile-vent:hover {
    transform: translateY(-2px);
    border-color: #ffcab7;
    box-shadow: 0 9px 24px rgba(17, 24, 39, 0.08);
}

.profile-vent-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-vent-category {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #ff5a1f;
    font-size: 12px;
    font-weight: 850;
}

.profile-vent-category-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #ff5a1f;
}

.profile-vent-time {
    flex-shrink: 0;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 650;
}

.profile-vent-text {
    margin-top: 11px;
    color: #111827;
    font-size: 15px;
    font-weight: 550;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.profile-vent-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #f0f2f4;
}

.profile-vent-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.profile-vent-stat-icon {
    font-size: 13px;
}

.profile-vent-delete-button {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.profile-vent-delete-button:hover {
    color: #ff5a1f;
}

.profile-empty-state {
    padding: 35px 22px;
    color: #6b7280;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
}

.profile-empty-state strong {
    display: block;
    margin-top: 8px;
    color: #111827;
    font-size: 16px;
}

.profile-empty-state p {
    margin-top: 5px;
}

.profile-empty-icon {
    font-size: 34px;
}

.post-highlight {
    animation: highlightPost 1.4s ease;
}

@keyframes highlightPost {
    0% {
        background: #fff1e8;
    }

    100% {
        background: white;
    }
}

.profile-edit-button {
    width: 100%;
    min-height: 44px;
    margin-top: 18px;
    border: 1px solid #ff5a1f;
    border-radius: 999px;
    background: white;
    color: #ff5a1f;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.profile-edit-button:hover {
    background: #fff1e8;
}

/* FOOTER */

footer {
    text-align: center;
    padding: 34px;
    background: #111827;
    color: #cbd5e1;
    font-weight: 700;
}

/* RESPONSIVE */

@media (max-width: 1050px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .left-panel,
    .right-panel {
        position: static;
        max-height: none;
        overflow: visible;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    nav {
        display: none;
    }
}

@media (max-width: 700px) {
    .topbar {
        height: 76px;
        padding: 0 16px;
    }

    .logo-icon {
        width: 44px;
        height: 44px;
        border-radius: 13px;
        font-size: 22px;
    }

    .logo-text span {
        display: none;
    }

    .brand-name,
    .logo-text h2 {
        font-size: 22px;
    }

    #signInButton {
        padding: 11px 15px;
    }

    #headerUserName {
        display: none;
    }

    .user-menu-button {
        padding: 7px 9px;
    }

    .hero {
        margin-top: 30px;
        padding: 0 16px;
    }

    .hero-left {
        padding: 32px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 18px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .composer {
        margin-left: 16px;
        margin-right: 16px;
        padding: 24px;
    }

    .composer-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .left-panel,
    .right-panel {
        grid-template-columns: 1fr;
    }

    .content-grid {
        padding: 0;
    }

    .feed {
        border-left: none;
        border-right: none;
        border-radius: 0;
    }

    .post {
        padding: 15px 14px 0;
    }

    .post-actions {
        gap: 5px;
    }

    .action-button {
        padding: 5px 6px;
        margin: -5px -6px;
        font-size: 12px;
    }

    .comment-button {
        padding: 0 13px;
    }

    .auth-modal {
        align-items: flex-end;
        padding: 0;
    }

    .auth-modal-card {
        width: 100%;
        max-height: 92vh;
        padding: 30px 22px 26px;
        border-radius: 26px 26px 0 0;
        animation: authModalMobileEnter 0.22s ease;
    }

    @keyframes authModalMobileEnter {
        from {
            opacity: 0;
            transform: translateY(28px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .auth-modal-card h2 {
        font-size: 27px;
    }

    .profile-panel {
        width: 100%;
        border-left: none;
    }

    .profile-panel-header {
        min-height: 70px;
        padding: 0 16px;
    }

    .profile-panel-content {
        padding: 18px 16px 28px;
    }

    .profile-cover {
        height: 96px;
    }

    .profile-main {
        padding: 0 18px 22px;
    }

    .profile-avatar-large {
        width: 78px;
        height: 78px;
        margin-top: -39px;
        font-size: 35px;
    }

    .profile-display-name {
        font-size: 23px;
    }

    .profile-stat {
        padding: 15px 5px;
    }

    .profile-stat strong {
        font-size: 19px;
    }

    .profile-stat span {
        font-size: 10px;
    }

        .edit-profile-modal {
        align-items: flex-end;
        padding: 0;
    }

    .edit-profile-card {
        width: 100%;
        max-height: 92vh;
        padding: 26px 20px;
        border-radius: 26px 26px 0 0;
    }

    .edit-profile-header h2 {
        font-size: 25px;
    }

    .edit-profile-actions {
        flex-direction: column-reverse;
    }

    .edit-profile-cancel,
    .edit-profile-save {
        width: 100%;
    }
}

/* FEED TABS */

.feed-column {
    min-width: 0;
}

.feed-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: white;
}

.feed-tab {
    min-height: 42px;
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #6b7280;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.feed-tab:hover {
    background: #fff1e8;
    color: #ff5a1f;
}

.feed-tab.active {
    background: #ff5a1f;
    color: white;
    box-shadow: 0 6px 14px rgba(255, 90, 31, 0.22);
}

.feed-tab:active {
    transform: scale(0.98);
}

@media (max-width: 700px) {
    .feed-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 0 14px 12px;
    }

    .feed-tab {
        font-size: 13px;
    }
}

/* POST MENU */

.post-menu {
    position: relative;
}

.more-button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition:
        background 0.18s ease,
        color 0.18s ease;
}

.more-button:hover,
.more-button[aria-expanded="true"] {
    background: #fff1e8;
    color: #ff5a1f;
}

.post-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1200;
    width: 190px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.18);
}

.post-menu-dropdown[hidden] {
    display: none;
}

.post-menu-item {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #111827;
    font-family: inherit;
    font-size: 14px;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
}

.post-menu-item:hover {
    background: #fff1e8;
    color: #ff5a1f;
}

/* TOAST NOTIFICATION */

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 8000;
    min-width: 260px;
    max-width: calc(100vw - 32px);
    padding: 14px 18px;
    border-radius: 14px;
    background: #111827;
    color: white;
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.28);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    opacity: 0;
    transform: translate(-50%, 18px);
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast[hidden] {
    display: none;
}

/* REPORT MODAL */

.report-modal {
    position: fixed;
    inset: 0;
    z-index: 8500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.report-modal[hidden] {
    display: none;
}

.report-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(6px);
}

.report-modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 460px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    background: white;
    box-shadow: 0 28px 80px rgba(17, 24, 39, 0.35);
    animation: reportModalEnter 0.2s ease;
}

@keyframes reportModalEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.report-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    font-family: inherit;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.report-modal-close:hover {
    background: #fff1e8;
    color: #ff5a1f;
}

.report-modal-label {
    display: block;
    margin-bottom: 7px;
    color: #ff5a1f;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.report-modal-card h2 {
    padding-right: 42px;
    color: #111827;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.7px;
}

.report-modal-subtitle {
    margin-top: 10px;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
}

.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.report-reason-button {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: white;
    color: #111827;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        color 0.18s ease;
}

.report-reason-button:hover {
    border-color: #ffb89d;
    background: #fff1e8;
    color: #ff5a1f;
}

.report-message {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f0fdf4;
    color: #15803d;
    font-size: 13px;
    font-weight: 800;
}

.report-message[hidden] {
    display: none;
}

.report-message.success {
    color: #16794b;
}

.report-message.error {
    color: #b42318;
}

@media (max-width: 700px) {
    .report-modal {
        align-items: flex-end;
        padding: 0;
    }

    .report-modal-card {
        width: 100%;
        max-height: 92vh;
        padding: 28px 20px;
        border-radius: 26px 26px 0 0;
    }
}

/* ADMIN PAGE (admin.html) */

.admin-back-link {
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.admin-back-link:hover {
    color: #ff5a1f;
}

.admin-page {
    max-width: 720px;
    margin: 40px auto 60px;
    padding: 0 24px;
}

.admin-access-denied {
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.admin-access-denied[hidden],
#adminContent[hidden] {
    display: none;
}

.admin-summary {
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.admin-summary strong {
    color: #111827;
    font-size: 16px;
}

.admin-report-queue {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-queue-loading,
.admin-queue-empty {
    padding: 24px;
    color: #6b7280;
    font-size: 14px;
    text-align: center;
}

.admin-report {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 17px;
    background: white;
}

.admin-report-dismissed {
    opacity: 0.6;
}

.admin-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.admin-report-status {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-report-status-pending {
    background: #fff1e8;
    color: #ff5a1f;
}

.admin-report-status-dismissed {
    background: #f3f4f6;
    color: #6b7280;
}

.admin-report-time {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.admin-report-content {
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.admin-report-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
    color: #6b7280;
    font-size: 12px;
}

.admin-report-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.admin-dismiss-button,
.admin-delete-content-button {
    padding: 9px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.admin-dismiss-button:hover {
    background: #f3f4f6;
}

.admin-delete-content-button {
    border-color: #fecaca;
    color: #dc2626;
}

.admin-delete-content-button:hover {
    background: #fef2f2;
}

/* RESET PASSWORD PAGE (reset-password.html) */

.reset-password-page {
    max-width: 460px;
    margin: 60px auto;
    padding: 0 24px;
}

.reset-password-card {
    padding: 38px;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    background: white;
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.1);
}

.reset-password-card h2 {
    color: #111827;
    font-size: 24px;
    font-weight: 900;
}

.reset-password-subtitle {
    margin: 8px 0 20px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}