
:root {
    --bg: #101827;
    --surface: #172235;
    --surface-light: #1d2b40;
    --border: #29384d;
    --text: #f4f7fb;
    --muted: #91a0b5;
    --accent: #6c8cff;
    --accent-hover: #5578ef;
    --green: #48d6a0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}
.listing-details {
    margin: 12px 0;
    padding: 12px;
    background: #182438;
    border: 1px solid #34445d;
    border-radius: 10px;
}

.listing-price {
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
}

.listing-location {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

/* TOP HEADER */

.topbar {
    height: 70px;
    background: rgba(16, 24, 39, 0.96);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-inner {
    max-width: 1440px;
    height: 100%;
    padding: 0 35px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    font-size: 27px;
    font-weight: 850;
    letter-spacing: -1.5px;
    flex-shrink: 0;
}

.brand span {
    color: var(--accent);
}

.search-box {
    width: 420px;
    height: 42px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
}

.search-box span {
    color: var(--muted);
    font-size: 22px;
}

.search-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: white;
}

.search-box input::placeholder {
    color: var(--muted);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-shrink: 0;
}

.login-link {
    color: #d4dceb;
    font-weight: 600;
}

.login-link:hover {
    color: white;
}

.join-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    transition: 0.2s;
}

.join-button:hover {
    background: var(--accent-hover);
}

/* MAIN LAYOUT */

.layout {
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px 35px 80px;
    display: grid;
    grid-template-columns: 220px minmax(0, 650px) 280px;
    justify-content: space-between;
    gap: 35px;
}

/* LEFT SIDEBAR */

.left-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: var(--muted);
    border-radius: 10px;
    font-weight: 600;
    transition: 0.2s;
}

.menu-item span {
    width: 23px;
    font-size: 19px;
    text-align: center;
}

.menu-item:hover,
.menu-item.active {
    background: var(--surface-light);
    color: white;
}

.menu-item.active {
    box-shadow: inset 3px 0 0 var(--accent);
}

.create-button {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 13px;
    background: var(--accent);
    border-radius: 11px;
    color: white;
    font-weight: 750;
    font-size: 14px;
    transition: 0.2s;
}

.create-button:hover {
    background: var(--accent-hover);
}

.sidebar-footer {
    margin-top: 45px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
    color: #77869c;
    font-size: 11px;
}

.sidebar-footer a:hover {
    color: white;
}

.sidebar-footer p {
    width: 100%;
    margin-top: 5px;
}

/* MAIN FEED */

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

.welcome-section {
    padding: 5px 0 22px;
}

.eyebrow {
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.welcome-section h1 {
    margin-top: 7px;
    font-size: 30px;
    letter-spacing: -1px;
    line-height: 1.3;
}

.welcome-section p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 14px;
}

/* FEED TABS */

.feed-tabs {
    display: flex;
    align-items: center;
    gap: 30px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.feed-tabs a {
    position: relative;
    padding: 13px 2px;
    color: var(--muted);
    font-weight: 650;
}

.feed-tabs a:hover {
    color: white;
}

.feed-tabs a.selected {
    color: white;
}

.feed-tabs a.selected::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    border-radius: 5px 5px 0 0;
}

/* POST COMPOSER */

.composer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 18px;
    display: flex;
    gap: 13px;
    margin-bottom: 20px;
}

.avatar,
.post-avatar {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #33496a;
    color: white;
    font-size: 17px;
    font-weight: 800;
}

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

.composer-input {
    min-height: 42px;
    display: flex;
    align-items: center;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.composer-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 17px;
    padding-top: 13px;
    color: var(--muted);
    font-size: 12px;
}

.composer-actions span {
    cursor: pointer;
}

.composer-actions span:hover {
    color: white;
}

.post-button {
    margin-left: auto;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    padding: 6px 17px;
    font-weight: 700;
}

/* POST CARDS */

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
}

.post-header {
    padding: 18px 18px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.community-avatar {
    background: linear-gradient(135deg, #587dff, #875cff);
}

.news-avatar {
    background: linear-gradient(135deg, #e29b49, #e45f76);
}

.post-author {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

.post-author strong {
    font-size: 13px;
}

.post-author span {
    color: var(--muted);
    font-size: 11px;
}

.post-more {
    color: var(--muted);
    letter-spacing: 2px;
    cursor: pointer;
}

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

.post-body h2 {
    font-size: 20px;
    line-height: 1.4;
    letter-spacing: -0.4px;
    margin-bottom: 8px;
}

.post-body p {
    color: #b0bdcf;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* COMMUNITY GRAPHIC */

.community-graphic {
    min-height: 260px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(125deg, #263f78, #26305c 55%, #49376f);
    display: flex;
    align-items: center;
    padding: 35px;
}

.graphic-content {
    position: relative;
    z-index: 2;
}

.graphic-content span {
    display: block;
    color: #b9caff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 13px;
}

.graphic-content strong {
    display: block;
    font-size: 36px;
    line-height: 1.15;
    letter-spacing: -1px;
}

.graphic-content small {
    display: block;
    margin-top: 17px;
    color: #c8d4ed;
    font-size: 12px;
}

.graphic-orbit {
    position: absolute;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 50%;
    width: 300px;
    height: 300px;
    right: -80px;
    top: -20px;
}

.orbit-two {
    width: 220px;
    height: 220px;
    right: -40px;
    top: 20px;
}

/* POST FOOTER */

.post-stats {
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 11px;
    border-bottom: 1px solid var(--border);
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 12px;
}

.post-actions a {
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
}

.post-actions a:hover {
    color: var(--accent);
}

.category-label {
    display: inline-block;
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

/* JOIN CARD */

.join-card {
    padding: 24px;
    border: 1px solid #344d79;
    border-radius: 15px;
    background: linear-gradient(120deg, #1c3155, #222c4a);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 30px;
}

.join-card h2 {
    margin: 6px 0;
    font-size: 21px;
}

.join-card p {
    color: #b4c1d5;
    font-size: 12px;
}

/* RIGHT SIDEBAR */

.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.side-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.side-card h3 {
    font-size: 14px;
    margin-bottom: 15px;
}

.side-card > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.side-card > a:last-child {
    border-bottom: none;
}

.side-card > a:hover {
    color: white;
}

.side-card > a span {
    font-size: 19px;
}

.coming-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.coming-item:last-child {
    border-bottom: none;
}

.coming-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-light);
    border-radius: 9px;
    color: var(--accent);
}

.coming-item strong {
    font-size: 12px;
}

.coming-item p {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 3px;
}

.right-footer {
    color: #718098;
    font-size: 11px;
    line-height: 1.7;
    padding: 0 5px;
}

/* MOBILE NAVIGATION */

.mobile-nav {
    display: none;
}

/* TABLET */

@media (max-width: 1100px) {
    .layout {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 25px;
    }

    .right-sidebar {
        display: none;
    }

    .topbar-inner {
        padding: 0 25px;
    }
}

/* MOBILE */

@media (max-width: 700px) {
    body {
        padding-bottom: 70px;
    }

    .topbar {
        height: 60px;
    }

    .topbar-inner {
        padding: 0 16px;
        gap: 12px;
    }

    .brand {
        font-size: 24px;
    }

    .search-box {
        flex: 1;
        width: auto;
        height: 37px;
        padding: 0 9px;
    }

    .search-box input {
        font-size: 11px;
    }

    .top-actions {
        gap: 10px;
    }

    .login-link {
        display: none;
    }

    .join-button {
        padding: 8px 11px;
        font-size: 11px;
        border-radius: 8px;
    }

    .layout {
        display: block;
        padding: 20px 12px 30px;
    }

    .left-sidebar,
    .right-sidebar {
        display: none;
    }

    .welcome-section {
        padding: 5px 5px 18px;
    }

    .welcome-section h1 {
        font-size: 25px;
    }

    .welcome-section p {
        font-size: 12px;
    }

    .feed-tabs {
        gap: 25px;
        margin-bottom: 14px;
    }

    .feed-tabs a {
        font-size: 12px;
        padding: 11px 2px;
    }

    .composer {
        padding: 13px;
        gap: 10px;
        border-radius: 12px;
    }

    .avatar,
    .post-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .composer-input {
        font-size: 12px;
    }

    .composer-actions {
        gap: 10px;
        font-size: 10px;
    }

    .post-card {
        border-radius: 12px;
        margin-bottom: 14px;
    }

    .post-header {
        padding: 14px 13px 8px;
    }

    .post-body {
        padding: 10px 13px 14px;
    }

    .post-body h2 {
        font-size: 17px;
    }

    .post-body p {
        font-size: 12px;
    }

    .community-graphic {
        min-height: 210px;
        padding: 23px;
    }

    .graphic-content strong {
        font-size: 30px;
    }

    .post-stats {
        padding: 9px 13px;
        font-size: 10px;
    }

    .post-actions {
        padding: 11px 5px;
    }

    .post-actions a {
        font-size: 11px;
    }

    .join-card {
        padding: 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .join-card h2 {
        font-size: 19px;
    }

    .mobile-nav {
        display: flex;
        position: fixed;
        z-index: 200;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 64px;
        background: #131f31;
        border-top: 1px solid var(--border);
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        color: var(--muted);
        font-size: 9px;
        font-weight: 600;
    }

    .mobile-nav a span {
        font-size: 19px;
    }

    .mobile-nav a:hover {
        color: white;
    }
}

/* SMALL MOBILE */

@media (max-width: 380px) {
    .search-box {
        display: none;
    }

    .composer-actions {
        gap: 8px;
    }

    .composer-actions span {
        font-size: 9px;
    }

    .graphic-content strong {
        font-size: 26px;
    }
}

/* ==================================
   ITLAA REGISTRATION PAGE
================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 35px 16px;
    background: #080d18;
    color: #f1f5f9;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 35px;
    background: #111a2b;
    border: 1px solid #26354d;
    border-radius: 18px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.35);
}

.auth-card h1 {
    font-size: 30px;
    margin: 0 0 10px;
    color: #ffffff;
}

.auth-card > p {
    color: #a8b5c8;
    line-height: 1.6;
    margin-bottom: 22px;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-card label {
    color: #dce5f2;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
}

.auth-card input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px;
    background: #0a1220;
    color: #ffffff;
    border: 1px solid #33445e;
    border-radius: 9px;
    outline: none;
    font-size: 15px;
}

.auth-card input:focus {
    border-color: #36a3ff;
    box-shadow: 0 0 0 2px rgba(54,163,255,0.15);
}

.auth-card button {
    margin-top: 18px;
    padding: 14px;
    background: #2388e8;
    color: #ffffff;
    border: none;
    border-radius: 9px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.auth-card button:hover {
    background: #1474cd;
}

.auth-card a {
    color: #55adff;
    text-decoration: none;
}

.auth-card a:hover {
    text-decoration: underline;
}

.form-errors {
    padding: 12px 15px;
    margin-bottom: 15px;
    background: #351a25;
    border: 1px solid #81364b;
    border-radius: 9px;
    color: #ffb5c5;
}

.form-errors p {
    margin: 5px 0;
}

.form-success {
    padding: 12px 15px;
    margin-bottom: 15px;
    background: #123526;
    border: 1px solid #24784e;
    border-radius: 9px;
    color: #9af0bd;
}

@media (max-width: 520px) {
    .auth-card {
        padding: 25px 20px;
    }

    .auth-card h1 {
        font-size: 26px;
    }
}

/* ITLAA - CLEAN SOCIAL POST COMPOSER */

.composer {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    margin-bottom: 18px;
    background: #172235;
    border: 1px solid #26364d;
    border-radius: 14px;
}

.composer .avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #29476d;
    color: #fff;
    font-weight: 700;
}

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

.composer-content form {
    width: 100%;
}

.composer-input {
    display: block;
    width: 100%;
    min-height: 76px;
    padding: 10px 0;
    resize: vertical;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #2b3c54;
    border-radius: 0;
    color: #f1f5f9;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    outline: none;
    box-sizing: border-box;
}

.composer-input::placeholder {
    color: #8290a4;
}

.composer-input:focus {
    border-bottom-color: #4385f5;
}

.composer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 13px;
}

.composer-actions label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid #34465f;
    border-radius: 20px;
    color: #b8c9df;
    font-size: 13px;
    cursor: pointer;
}

.composer-actions label:hover {
    background: #26374e;
    color: #fff;
}

.composer-actions input[type="file"] {
    display: none;
}

.composer-actions span {
    display: none;
}

.composer-actions .post-button {
    margin-left: auto;
    padding: 9px 22px;
    border: 0;
    border-radius: 22px;
    background: #3981f6;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.composer-actions .post-button:hover {
    background: #286bd8;
}

.form-errors {
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: #44232b;
    color: #ffb8c1;
    font-size: 13px;
}

.form-success {
    color: #67d9a0;
    font-size: 14px;
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    .composer {
        padding: 14px 12px;
        gap: 10px;
    }

    .composer .avatar {
        width: 36px;
        height: 36px;
    }

    .composer-actions {
        gap: 7px;
    }

    .composer-actions label {
        padding: 8px 11px;
        font-size: 12px;
    }

    .composer-actions .post-button {
        padding: 9px 18px;
    }
}
.post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-actions .like-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.post-actions .like-action {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.post-actions .like-action:hover {
    color: #3981f6;
}
/* Make Like/Unlike identical to other post action links */

.post-actions .like-form {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.post-actions .like-action {
    display: inline-block;
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    padding: 0 !important;
    margin: 0;
    color: var(--muted) !important;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: inherit;
    cursor: pointer;
}

.post-actions .like-action:hover {
    color: var(--accent) !important;
}

@media (max-width: 700px) {
    .post-actions .like-action {
        font-size: 11px;
    }
}
/* ITLAA post composer dropdowns and inputs */
.composer select,
.composer input[type="text"],
.composer input[type="number"],
.composer input[type="url"] {
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
    margin-bottom: 10px;
    color: #f1f5f9;
    background: #182438;
    border: 1px solid #34445d;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.composer select {
    cursor: pointer;
    appearance: auto;
}

.composer select option {
    color: #f1f5f9;
    background: #182438;
}

.composer select:focus,
.composer input:focus {
    border-color: #3981f6;
    box-shadow: 0 0 0 2px rgba(57, 129, 246, 0.15);
}
.post-link {
    margin: 12px 0;
}

.post-link a {
    display: inline-block;
    color: #3981f6;
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.post-link a:hover {
    text-decoration: underline;
}
.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.post-user-info strong {
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 700;
}

.post-user-info span {
    color: var(--muted);
    font-size: 12px;
}

.post-type-label {
    margin: 10px 0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
}

.post-media img,
.post-media video {
    display: block;
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 12px;
    margin-top: 12px;
}

/* =========================================
   ITLAA - RESPONSIVE UI IMPROVEMENTS
   ========================================= */

/* Better sizing and overflow */
html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 75px;
}

body {
    overflow-x: hidden;
}

button,
input,
textarea,
select {
    font-family: inherit;
    max-width: 100%;
}

button,
a,
summary,
label {
    -webkit-tap-highlight-color: transparent;
}

/* Header improvements */
.topbar {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.topbar-inner {
    min-width: 0;
}

.search-box {
    max-width: 420px;
    min-width: 0;
}

/* Feed spacing */
.main-feed {
    min-width: 0;
}

.post-card {
    position: relative;
}

.post-content {
    padding: 10px 18px 14px;
    color: #d4deec;
    font-size: 14px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.post-content p {
    margin-bottom: 12px;
}

.post-content p:last-child {
    margin-bottom: 0;
}

.read-more {
    color: var(--accent);
    font-weight: 700;
    white-space: nowrap;
}

.read-more:hover {
    color: white;
}

/* Post menu */
.post-card:has(.post-menu) {
    overflow: visible;
}

.post-menu {
    position: relative;
    z-index: 20;
}

.post-menu summary {
    list-style: none;
    user-select: none;
}

.post-menu summary::-webkit-details-marker {
    display: none;
}

.post-menu[open] {
    z-index: 100;
}

.post-menu > div {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 100;
    width: min(260px, calc(100vw - 40px));
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.post-menu form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-menu select,
.post-menu textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
}

.post-menu textarea {
    resize: vertical;
}

.post-menu button {
    min-height: 38px;
}

/* Media */
.post-media {
    width: 100%;
    overflow: hidden;
}

.post-media img,
.post-media video {
    max-width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    background: #0b1220;
}

/* Composer */
.composer select,
.composer input[type="text"],
.composer input[type="url"],
.composer textarea {
    font-size: 16px;
}

.composer-actions {
    flex-wrap: wrap;
}

.post-button,
.join-button,
.create-button {
    cursor: pointer;
}

/* Better interaction feedback */
.post-actions a,
.post-actions button,
.menu-item,
.mobile-nav a {
    transition: color 0.18s ease, background 0.18s ease;
}

/* Tablet */
@media (max-width: 1100px) {
    .layout {
        grid-template-columns: 185px minmax(0, 1fr);
        gap: 22px;
        padding-left: 22px;
        padding-right: 22px;
    }

    .post-content {
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 700px) {
    body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .topbar {
        height: 58px;
    }

    .topbar-inner {
        padding: 0 12px;
        gap: 9px;
    }

    .brand {
        font-size: 23px;
    }

    .search-box {
        flex: 1;
        min-width: 0;
        height: 36px;
    }

    .search-box input {
        font-size: 14px;
    }

    .top-actions {
        gap: 7px;
    }

    .layout {
        display: block;
        width: 100%;
        padding: 14px 10px 25px;
    }

    .welcome-section {
        padding: 8px 5px 16px;
    }

    .welcome-section h1 {
        font-size: 24px;
    }

    .feed-tabs {
        gap: 0;
        justify-content: space-around;
    }

    .feed-tabs a {
        flex: 1;
        text-align: center;
        padding: 12px 5px;
        font-size: 13px;
    }

    .composer {
        padding: 13px 11px;
        gap: 9px;
        border-radius: 12px;
    }

    .composer-input {
        font-size: 16px;
    }

    .composer-actions {
        gap: 8px;
    }

    .composer-actions label {
        padding: 8px 10px;
        font-size: 12px;
    }

    .composer-actions .post-button {
        padding: 9px 17px;
    }

    .post-card {
        border-radius: 12px;
        margin-bottom: 13px;
    }

    .post-header {
        padding: 13px 12px 8px;
        gap: 9px;
    }

    .post-user-info strong {
        font-size: 13px;
    }

    .post-user-info span {
        font-size: 11px;
    }

    .post-content {
        padding: 9px 12px 13px;
        font-size: 14px;
        line-height: 1.7;
    }

    .post-content p {
        margin-bottom: 11px;
    }

    .post-type-label {
        margin-left: 12px;
        margin-right: 12px;
    }

    .listing-details {
        margin: 10px 12px;
        padding: 10px;
    }

    .post-link {
        margin: 10px 12px;
    }

    .post-actions {
        justify-content: space-between;
        gap: 5px;
        padding: 12px 10px;
    }

    .post-actions a,
    .post-actions .like-action {
        font-size: 12px;
    }

    .post-menu > div {
        width: min(260px, calc(100vw - 30px));
    }

    .mobile-nav {
        height: calc(62px + env(safe-area-inset-bottom));
        padding: 7px 4px env(safe-area-inset-bottom);
    }

    .mobile-nav a {
        flex: 1;
        font-size: 10px;
    }

    .mobile-nav a span {
        font-size: 19px;
    }

    /* Individual post page */
    .layout[style*="max-width:1100px"] {
        padding: 12px 10px 25px;
        margin-top: 12px !important;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .topbar-inner {
        padding: 0 9px;
    }

    .brand {
        font-size: 21px;
    }

    .join-button {
        padding: 7px 9px;
        font-size: 10px;
    }

    .layout {
        padding-left: 8px;
        padding-right: 8px;
    }

    .composer-actions {
        gap: 6px;
    }

    .composer-actions label {
        padding: 7px 9px;
        font-size: 11px;
    }

    .post-actions a,
    .post-actions .like-action {
        font-size: 11px;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* =====================================
   ITLAA COMMENTS AND REPLIES
===================================== */

.comment-section {
    padding: 18px;
    overflow: visible;
}

.comment-section h3 {
    margin-bottom: 18px;
}

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

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-width: 0;
    position: relative;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #33496a;
    color: #fff;
    font-weight: 800;
}

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

.comment-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    min-width: 0;
}

.comment-header > strong {
    color: var(--text);
    font-size: 13px;
}

.comment-header > span {
    color: var(--muted);
    font-size: 11px;
}

.comment-menu {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
    z-index: 10;
}

.comment-menu summary {
    list-style: none;
    cursor: pointer;
    color: var(--muted);
    font-weight: 800;
    letter-spacing: 2px;
    padding: 2px 8px;
    border-radius: 7px;
}

.comment-menu summary::-webkit-details-marker {
    display: none;
}

.comment-menu summary:hover {
    background: var(--surface-light);
    color: white;
}

.comment-menu[open] {
    z-index: 50;
}

.comment-menu > div {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 50;
    width: 240px;
    max-width: calc(100vw - 55px);
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

.comment-menu form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.comment-menu select,
.comment-menu textarea {
    width: 100%;
    padding: 9px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.comment-menu button {
    cursor: pointer;
}

.comment-content {
    margin-top: 5px;
    color: #d4deec;
    font-size: 13px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.reply-box {
    margin-top: 7px;
}

.reply-box summary {
    display: inline-block;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.reply-box summary:hover {
    color: var(--accent);
}

.reply-box form {
    margin-top: 10px;
}

.reply-box textarea {
    width: 100%;
    min-height: 65px;
    padding: 9px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 9px;
}

.reply-box .post-button {
    margin-top: 8px;
}

.comment-item > .comment-body > .comment-item {
    margin-top: 15px;
    padding-left: 12px;
    border-left: 2px solid #34445a;
}

.no-comments {
    color: var(--muted);
    padding: 15px 0;
}

@media (max-width: 600px) {
    .comment-section {
        padding: 14px 12px;
    }

    .comment-header > strong {
        font-size: 12px;
    }

    .comment-header > span {
        font-size: 10px;
    }

    .comment-avatar {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }
}
/* Comment action menu */
.comment-action-menu {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

.comment-action-menu summary {
    list-style: none;
    cursor: pointer;
    padding: 5px 11px;
    border-radius: 8px;
    color: #aebbd0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    transition: background .2s, color .2s;
}

.comment-action-menu summary::-webkit-details-marker {
    display: none;
}

.comment-action-menu summary:hover {
    background: #293b54;
    color: #fff;
}

.comment-action-menu > div {
    background: #1c293b;
    border: 1px solid #34445a;
    padding: 12px;
    border-radius: 12px;
    min-width: 190px;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    z-index: 100;
    box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

.comment-action-menu button[type="submit"]:not(.post-button) {
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    color: #ff7777;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.comment-action-menu button[type="submit"]:not(.post-button):hover {
    background: rgba(255, 90, 90, .12);
}
/* =====================================
   ITLAA DROPDOWN MENU FIX
===================================== */

/* Allow dropdowns to appear outside post cards */
.post-card:has(.post-menu) {
    overflow: visible !important;
}

/* Keep media clipped separately */
.post-card .post-media {
    overflow: hidden;
}

/* Menu positioning */
.post-menu,
.comment-menu {
    position: relative;
    flex-shrink: 0;
}

.post-menu[open],
.comment-menu[open] {
    z-index: 9999;
}

/* Consistent dropdown panel */
.post-menu > div,
.comment-menu-panel,
.comment-menu > div {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 9999;
    width: 220px;
    min-width: 190px;
    padding: 12px;
    background: #1c293b !important;
    border: 1px solid #34445a;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.4);
}

/* Delete action */
.comment-delete-button {
    display: block;
    width: 100%;
    padding: 11px 12px;
    text-align: left;
    color: #ff7777;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.comment-delete-button:hover {
    background: rgba(255,90,90,.13);
}

/* Close menu marker */
.post-menu summary,
.comment-menu summary {
    cursor: pointer;
    list-style: none;
}

.post-menu summary::-webkit-details-marker,
.comment-menu summary::-webkit-details-marker {
    display: none;
}
/* Comment menu styling */
.comment-menu-panel {
    background: #1c293b !important;
    border: 1px solid #34445a;
    border-radius: 10px;
    padding: 10px;
    min-width: 190px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Comment menu buttons */
.comment-menu-panel button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: transparent !important;
    border: none;
    border-radius: 7px;
    color: #e5eaf2;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
}

/* Delete comment/reply */
.comment-menu-panel .comment-delete-button {
    color: #ff7777 !important;
    background: rgba(255, 90, 90, 0.10) !important;
}

/* Hover effect */
.comment-menu-panel button:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.comment-menu-panel .comment-delete-button:hover {
    background: rgba(255, 90, 90, 0.20) !important;
}
/* =================================
   COMMENT THREE-DOT MENU
================================= */

.comment-action-menu {
    position: relative;
    margin-left: auto;
}

.comment-action-menu > summary {
    color: #cbd5e1;
    background: transparent !important;
    border: none !important;
    border-radius: 7px;
    cursor: pointer;
    padding: 6px 10px !important;
}

.comment-action-menu > summary:hover {
    background: #26364c !important;
    color: #ffffff;
}

.comment-menu-panel {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 9999;
    min-width: 190px;
    padding: 10px !important;
    background: #172235 !important;
    border: 1px solid #34445a !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,.4);
}

/* Remove default white button appearance */
.comment-menu-panel button {
    width: 100%;
    display: block;
    padding: 10px 12px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 7px !important;
    color: #e5eaf2 !important;
    text-align: left;
    cursor: pointer;
}

/* Delete button */
.comment-menu-panel button.comment-delete-button {
    color: #ff7777 !important;
    background: rgba(255, 80, 80, .12) !important;
}

.comment-menu-panel button.comment-delete-button:hover {
    background: rgba(255, 80, 80, .22) !important;
}

.comment-menu-panel form {
    margin: 0;
    padding: 0;
}
/* FIX: Share and Repost buttons match Like and Comment */

.post-actions .share-action,
.post-actions .repost-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    padding: 0 !important;
    margin: 0;
    color: var(--muted) !important;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: inherit;
    text-decoration: none;
    cursor: pointer;
}

.post-actions .share-action:hover,
.post-actions .repost-action:hover {
    color: var(--accent) !important;
}

.post-actions .repost-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

@media (max-width: 700px) {
    .post-actions .share-action,
    .post-actions .repost-action {
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .post-actions .share-action,
    .post-actions .repost-action {
        font-size: 11px;
    }
}
/* Mobile floating Create Post button */
.mobile-create-post {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 85px;
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    background: #1d9bf0;
    color: #ffffff;
    font-size: 36px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Show only on mobile screens */
@media (max-width: 768px) {
    .mobile-create-post {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
/* Trending ITLAA topics */
.trending-card {
    margin-bottom: 18px;
}

.trending-card h3 {
    margin-bottom: 15px;
}

.trending-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-item strong {
    display: block;
    font-size: 14px;
}

.trending-item small {
    display: block;
    color: #8996a8;
    font-size: 12px;
    margin-top: 4px;
}

.trending-item span {
    color: #1d9bf0;
    font-size: 18px;
}

.trending-item:hover strong {
    color: #1d9bf0;
}
.trending-arrow::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-top: 2px solid #1d9bf0;
    border-right: 2px solid #1d9bf0;
    transform: rotate(45deg);
}
/* MOBILE TRENDING ITLAA */
.mobile-trending {
    display: none;
}

@media (max-width: 768px) {
    .mobile-trending {
    display: flex !important;
        align-items: center;
        gap: 10px;
        overflow-x: auto;
        white-space: nowrap;
        padding: 12px 0;
        margin-bottom: 10px;
        scrollbar-width: none;
    }

    .mobile-trending::-webkit-scrollbar {
        display: none;
    }

    .mobile-trending > strong {
        color: #8996a8;
        font-size: 13px;
        flex-shrink: 0;
    }

    .mobile-trending a {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 7px 11px;
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 20px;
        background: #1c293b;
        color: #ffffff;
        text-decoration: none;
        font-size: 13px;
        flex-shrink: 0;
    }

    .mobile-trending small {
        color: #1d9bf0;
        font-size: 11px;
    }
}
/* POPULAR HASHTAGS */
.popular-hashtags-card {
    margin-bottom: 18px;
}

.popular-hashtags-card h3 {
    margin-bottom: 15px;
}

.popular-hashtag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
}

.popular-hashtag-item:last-child {
    border-bottom: none;
}

.popular-hashtag-item strong {
    display: block;
    font-size: 14px;
}

.popular-hashtag-item small {
    display: block;
    color: #8996a8;
    font-size: 12px;
    margin-top: 4px;
}

.popular-hashtag-arrow::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-top: 2px solid #1d9bf0;
    border-right: 2px solid #1d9bf0;
    transform: rotate(45deg);
}

.popular-hashtag-item:hover strong {
    color: #1d9bf0;
}
/* PROFILE FOLLOW / UNFOLLOW BUTTON */

.profile-edit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 9px 18px;
    background: #3981f6;
    border: 1px solid #3981f6;
    border-radius: 22px;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.profile-edit-button:hover {
    background: #286bd8;
    border-color: #286bd8;
}
/* PROFILE FOLLOWERS / FOLLOWING LINKS */

.profile-stat-link {
    color: #aebbd0;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.profile-stat-link strong {
    color: #ffffff;
}

.profile-stat-link:hover {
    color: #3981f6;
}

.profile-stat-link:hover strong {
    color: #3981f6;
}

/* ==============================
   ITLAA ACCOUNT SETTINGS
============================== */

.settings-page {
    width: min(100% - 32px, 760px);
    margin: 40px auto;
    color: #fff;
}

.settings-page h1 {
    font-size: 30px;
    margin-bottom: 8px;
}

.settings-subtitle {
    color: #9baec5;
    margin-bottom: 25px;
}

.settings-card,
.blocked-card {
    background: #1c293b;
    border: 1px solid #2b3a50;
    border-radius: 14px;
    padding: 22px;
    margin-top: 16px;
}

.settings-card h3 {
    font-size: 18px;
    margin: 0 0 10px;
}

.settings-card p {
    color: #aab7c8;
    margin: 8px 0 16px;
}

.settings-card input {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #111c2b;
    color: #fff;
    border: 1px solid #35445a;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 10px 0 15px;
    font-size: 15px;
}

.settings-card input:focus {
    outline: none;
    border-color: #3981f6;
}

.settings-card button,
.settings-manage-link {
    display: inline-block;
    background: #3981f6;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 11px 17px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.settings-card button:hover,
.settings-manage-link:hover {
    background: #2868d5;
}

.settings-success {
    background: #16452e;
    color: #a8f0c6;
    padding: 13px 16px;
    border-radius: 9px;
    margin: 16px 0;
}

.settings-error {
    background: #4a2028;
    color: #ffb3b3;
    padding: 13px 16px;
    border-radius: 9px;
    margin: 16px 0;
}

/* ==============================
   BLOCKED ACCOUNTS PAGE
============================== */

.blocked-page {
    width: min(100% - 32px, 760px);
    margin: 40px auto;
    color: #fff;
}

.blocked-page h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.blocked-subtitle {
    color: #9baec5;
    margin-bottom: 24px;
}

.blocked-card {
    padding: 8px 22px;
}

.blocked-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 0;
    border-bottom: 1px solid #35445a;
}

.blocked-user-row:last-child {
    border-bottom: none;
}

.blocked-user-info {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}

.blocked-user-info strong {
    display: block;
    overflow-wrap: anywhere;
}

.blocked-user-info:hover strong {
    color: #72a5ff;
}

.blocked-avatar,
.blocked-avatar-placeholder {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.blocked-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3981f6;
    font-size: 20px;
    font-weight: 700;
}

.blocked-username {
    color: #9baec5;
    margin-top: 4px;
    font-size: 14px;
}

.blocked-unblock-button {
    background: #3981f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
}

.blocked-unblock-button:hover {
    background: #2868d5;
}

.blocked-empty {
    color: #aab7c8;
    padding: 25px 0;
}

.blocked-pagination {
    margin-top: 20px;
    color: #fff;
}

.blocked-pagination nav {
    display: flex;
    justify-content: center;
}

@media (max-width: 600px) {
    .settings-page,
    .blocked-page {
        margin: 24px auto;
    }

    .settings-page h1,
    .blocked-page h1 {
        font-size: 24px;
    }

    .settings-card,
    .blocked-card {
        padding: 17px;
    }

    .blocked-user-row {
        gap: 8px;
    }

    .blocked-unblock-button {
        padding: 9px 11px;
        font-size: 13px;
    }
}