
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 25px;
    background-color: #121212;
    color: #eeeeee;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

/* Header */
.site-header {
    max-width: 750px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid #777777;
}

.site-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

/* Simple EHC logo */
.logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #242424;
    border: 2px solid #eeeeee;
    border-radius: 6px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -1px;
}

/* Main sections */
#loginSection,
#registerSection,
#homeSection {
    max-width: 750px;
    margin: 0 auto;
}

#loginSection,
#registerSection {
    max-width: 420px;
    background-color: #202020;
    border: 1px solid #777777;
    border-radius: 6px;
    padding: 30px;
}

h2 {
    margin-top: 0;
    font-size: 23px;
}

h3 {
    font-size: 18px;
    margin-top: 30px;
}

/* Form inputs */
input,
textarea {
    width: 100%;
    padding: 12px;
    background-color: #181818;
    color: #ffffff;
    border: 1px solid #777777;
    border-radius: 4px;
    font: inherit;
}

input:focus,
textarea:focus {
    outline: 1px solid white;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

/* Buttons */
button {
    padding: 10px 20px;
    background-color: #dddddd;
    color: #111111;
    border: 1px solid #ffffff;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background-color: #ffffff;
}

#logoutButton {
    background-color: #303030;
    color: #eeeeee;
}

/* Create post */
#postForm {
    padding: 20px;
    background-color: #202020;
    border: 1px solid #777777;
    border-radius: 6px;
}

#postForm button {
    margin-top: 12px;
}

/* Feed */
#posts p {
    margin: 12px 0;
    padding: 18px;
    background-color: #202020;
    border: 1px solid #555555;
    border-left: 3px solid #eeeeee;
    border-radius: 4px;
    overflow-wrap: anywhere;
}

/* Links */
a {
    color: #eeeeee;
}

a:hover {
    color: #aaaaaa;
}

#message {
    max-width: 750px;
    margin: 20px auto;
    color: #dddddd;
}

[hidden] {
    display: none !important;
}

/* Mobile */
@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    #loginSection,
    #registerSection {
        padding: 20px;
    }
}


/* Post cards */
.post {
    margin: 12px 0;
    padding: 18px;
    background: #202020;
    border: 1px solid #555;
    border-left: 3px solid #eeeeee;
    border-radius: 4px;
}

.post p {
    margin: 0 0 12px;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

/* Like buttons */
.like-button {
    padding: 6px 12px;
    font-size: 13px;
    background: #303030;
    color: #eeeeee;
    border: 1px solid #777;
}

.like-button:hover {
    background: #444444;
    color: white;
}

.like-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   EDGE HATE CLUB - OFF WHITE THEME
   ========================================== */

:root {
    color-scheme: light;
    --page: #f7f5f0;
    --surface: #ffffff;
    --text: #292c26;
    --muted: #81847b;
    --line: #e6e4dc;
    --green: #527a50;
    --red: #b86b60;
}

html, body {
    background: var(--page) !important;
    color: var(--text) !important;
    font-family: -apple-system, BlinkMacSystemFont,
        "Segoe UI", Arial, sans-serif;
}

body {
    line-height: 1.5;
}

h1, h2, h3, p, label {
    color: var(--text);
}

a {
    color: var(--green);
}

input, textarea {
    background: #fff !important;
    color: var(--text) !important;
    border: 1px solid #dcded5 !important;
    border-radius: 9px !important;
    padding: 12px !important;
    box-sizing: border-box;
}

input:focus, textarea:focus {
    outline: 2px solid #b5c9ae;
    outline-offset: 1px;
}

button {
    border-radius: 9px;
    transition: background 0.15s, color 0.15s,
        border-color 0.15s;
}

button:not(.vote-button) {
    background: #354a37;
    color: white;
    border: 1px solid #354a37;
}

button:not(.vote-button):hover {
    background: #48664a;
}

.logo {
    background: #354a37 !important;
    color: #fff !important;
    border-radius: 11px !important;
    padding: 10px 13px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

#homeSection,
#loginSection,
#registerSection {
    color: var(--text);
}

#posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

#posts .post {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-left: 1px solid var(--line) !important;
    border-radius: 15px !important;
    padding: 18px 20px !important;
    margin: 0 !important;
    box-shadow: 0 2px 9px rgba(37, 40, 31, 0.025);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.post-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #e8ecdf;
    color: #465d42;
    font-size: 14px;
    font-weight: 750;
    flex-shrink: 0;
}

.post-author {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.post-time {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted);
}

#posts .post-content {
    background: transparent !important;
    border: none !important;
    color: var(--text) !important;
    font-size: 15px;
    line-height: 1.65;
    margin: 0 0 18px !important;
    padding: 0 !important;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.post-footer {
    display: flex;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0eee8;
}

.vote-controls {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px;
    border-radius: 10px;
    background: #f6f6f2;
    border: 1px solid #edede7;
}

.vote-controls .vote-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    padding: 5px;
    border: 0 !important;
    border-radius: 7px;
    background: transparent !important;
    color: #92968b !important;
    cursor: pointer;
}

.vote-controls .upvote:hover,
.vote-controls .upvote.active {
    background: #e3efdf !important;
    color: var(--green) !important;
}

.vote-controls .downvote:hover,
.vote-controls .downvote.active {
    background: #f8e7e3 !important;
    color: var(--red) !important;
}

.vote-controls .vote-button:disabled {
    opacity: 0.5;
    cursor: wait;
}

.vote-score {
    min-width: 26px;
    text-align: center;
    font-size: 14px;
    font-weight: 750;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.empty-feed {
    color: var(--muted);
    text-align: center;
    padding: 32px 16px;
}

#message {
    color: #a34d43;
    font-size: 14px;
}

@media (max-width: 600px) {
    #posts .post {
        padding: 15px !important;
    }
}

/* =========================================
   EDGE HATE CLUB - UI POLISH
   ========================================= */

:root {
    color-scheme: light;
    --page: #f7f5f0;
    --card: #ffffff;
    --ink: #26332a;
    --muted: #737d72;
    --forest: #344c3d;
    --sage: #718b72;
    --border: #e5e5dd;
    --soft: #f4f5f0;
    --danger: #c16e60;
}

html, body {
    background: var(--page) !important;
    color: var(--ink) !important;
    font-family: -apple-system, BlinkMacSystemFont,
        "Segoe UI", Arial, sans-serif !important;
}

body {
    line-height: 1.55;
}

h1, h2, h3, h4, p, label, span {
    color: inherit;
}

h1, h2, h3 {
    letter-spacing: -0.4px;
}

[hidden] {
    display: none !important;
}

/* Registration and login */

#loginSection,
#registerSection {
    width: 100%;
    max-width: 440px;
    margin: 36px auto;
    box-sizing: border-box;
}

#loginSection form,
#registerSection form,
#postForm {
    background: var(--card) !important;
    color: var(--ink) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    padding: 26px !important;
    box-shadow: 0 5px 22px rgba(30, 40, 30, 0.035);
}

#loginSection form *,
#registerSection form *,
#postForm * {
    color: inherit;
}

#loginSection h2,
#registerSection h2,
#homeSection h2,
#homeSection h3 {
    color: var(--ink) !important;
}

#loginSection p,
#registerSection p,
#loginSection label,
#registerSection label {
    color: var(--muted) !important;
}

#loginSection a,
#registerSection a {
    color: var(--forest) !important;
    font-weight: 650;
    text-decoration-color: #a9b8aa;
}

#loginSection input,
#registerSection input,
#postForm textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #fafaf7 !important;
    color: var(--ink) !important;
    border: 1px solid #dcded6 !important;
    border-radius: 9px !important;
    padding: 13px 14px !important;
    font-size: 15px;
    font-family: inherit;
}

input::placeholder,
textarea::placeholder {
    color: #92988f !important;
    opacity: 1;
}

input:focus,
textarea:focus {
    border-color: var(--sage) !important;
    outline: 2px solid #d4e2d2 !important;
    outline-offset: 1px;
}

#loginSection button,
#registerSection button,
#postForm button {
    background: var(--forest) !important;
    color: #fff !important;
    border: 1px solid var(--forest) !important;
    border-radius: 9px !important;
    padding: 10px 19px !important;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

#loginSection button:hover,
#registerSection button:hover,
#postForm button:hover {
    background: #46644e !important;
}

/* Main feed */

#homeSection {
    color: var(--ink) !important;
}

#postForm {
    margin-bottom: 25px;
}

#postForm textarea {
    min-height: 110px;
    resize: vertical;
    margin-bottom: 12px;
}

#posts {
    gap: 14px !important;
}

#posts .post {
    background: var(--card) !important;
    color: var(--ink) !important;
    border: 1px solid var(--border) !important;
    border-radius: 15px !important;
    padding: 20px !important;
    box-shadow: 0 2px 10px rgba(30, 40, 30, 0.025);
}

.post-author {
    color: var(--ink) !important;
    font-weight: 700;
}

.post-time {
    color: var(--muted) !important;
}

#posts .post-content {
    color: #394239 !important;
    font-size: 15px;
    line-height: 1.7;
}

.post-footer {
    border-top: 1px solid #eeeee8;
}

.vote-controls {
    background: var(--soft) !important;
    border: 1px solid #e8eae2 !important;
    border-radius: 11px !important;
}

.vote-score {
    color: var(--ink) !important;
}

.vote-controls .upvote.active {
    color: #507c54 !important;
    background: #dfece0 !important;
}

.vote-controls .downvote.active {
    color: #b96b60 !important;
    background: #f7e4df !important;
}

/* Feedback */

#message {
    color: #b54f42 !important;
    font-weight: 500;
}

.password-help {
    display: block;
    margin: 8px 0 12px;
    color: var(--muted) !important;
    font-size: 12px;
}

.password-meter {
    height: 6px;
    width: 100%;
    border-radius: 10px;
    background: #e8e9e3;
    overflow: hidden;
    margin: 10px 0 5px;
}

.password-meter-fill {
    height: 100%;
    width: 0%;
    background: #c16e60;
    transition: width 0.2s, background 0.2s;
}

.password-meter-fill.medium {
    background: #b99a54;
}

.password-meter-fill.strong {
    background: #648967;
}

.password-strength-label {
    font-size: 12px;
    color: var(--muted) !important;
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    #loginSection,
    #registerSection {
        margin: 20px auto;
    }

    #loginSection form,
    #registerSection form,
    #postForm {
        padding: 18px !important;
    }

    #posts .post {
        padding: 16px !important;
    }
}

/* Fix login and registration card backgrounds */
#loginSection,
#registerSection {
    background: #ffffff !important;
    color: #26332a !important;
    border: 1px solid #e5e5dd !important;
    border-radius: 16px !important;
    padding: 30px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05) !important;
}

#loginSection h2,
#registerSection h2 {
    color: #26332a !important;
}

#loginSection p,
#registerSection p {
    color: #737d72 !important;
}

#loginSection form,
#registerSection form {
    box-shadow: none !important;
    border: none !important;
    padding: 12px 0 !important;
}


/* Followers, user search, and feed tabs */

#peopleSection,
#feedSection {
    margin-top: 24px;
}

#userSearch {
    width: min(100%, 360px);
    padding: 12px;
    border: 1px solid #d9e1d8;
    border-radius: 10px;
    background: #ffffff;
    color: #26332a;
}

.feed-tabs {
    display: flex;
    gap: 10px;
    margin: 16px 0 24px;
}

.feed-tab {
    background: #eef2ed;
    color: #344c3d;
    border: 1px solid #dce5dc;
    border-radius: 10px;
    padding: 10px 18px;
    cursor: pointer;
}

.feed-tab.active {
    background: #344c3d;
    color: #ffffff;
}

.user-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #e4e9e2;
    border-radius: 12px;
}

.user-result > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-result small {
    color: #737d72;
}

.follow-button {
    background: #344c3d;
    color: #ffffff;
    border: 1px solid #344c3d;
    border-radius: 999px;
    padding: 7px 14px;
    cursor: pointer;
    font-size: 13px;
    margin-left: auto;
}

.follow-button.following {
    background: #ffffff;
    color: #344c3d;
}

.follow-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

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



/* Home header and top navigation */
.home-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.home-toolbar h2 {
    margin: 0;
    flex-shrink: 0;
}

.home-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

#peopleSection {
    margin: 0 !important;
    flex: 1;
    min-width: 0;
}

.people-search-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

#userSearch {
    width: 220px;
    max-width: 100%;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #d9e1d8;
    border-radius: 10px;
    background: #ffffff;
    color: #26332a;
}

#searchUsersButton {
    background: #344f3e !important;
    color: #ffffff !important;
    flex-shrink: 0;
}

#searchUsersButton:hover {
    background: #46644e !important;
}

#logoutButton {
    background: #f0e8e5 !important;
    color: #934b42 !important;
    border: 1px solid #eadbd6 !important;
    flex-shrink: 0;
}

#logoutButton:hover {
    background: #e8d9d4 !important;
}

#userResults {
    width: 100%;
}


/* Mobile layout */
@media (max-width: 650px) {
    .home-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .home-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    #peopleSection {
        flex: 1 1 100%;
    }

    .people-search-controls {
        justify-content: flex-start;
    }

    #userSearch {
        flex: 1;
        width: auto;
    }

    #logoutButton {
        margin-left: auto;
    }
}


/* Public profile page */

.profile-navigation {
    margin-bottom: 20px;
}

.profile-card {
    background: #ffffff;
    border: 1px solid #e5e5dd;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.profile-avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8ecdf;
    color: #465d42;
    font-size: 30px;
    font-weight: 750;
}

.profile-card h2 {
    color: #26332a;
    margin: 8px 0;
}

#profileJoined {
    color: #737d72;
    font-size: 13px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 45px;
    margin: 25px 0;
}

.profile-stats div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-stats strong {
    color: #26332a;
    font-size: 22px;
}

.profile-stats span {
    color: #737d72;
    font-size: 13px;
}

.profile-posts {
    margin-top: 30px;
}

.profile-posts h3 {
    color: #26332a;
}

.post-author {
    cursor: pointer;
}

.post-author:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .profile-stats {
        gap: 25px;
    }
}
