@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #0c0d12;
    --surface: #151720;
    --surface-hover: #1d202b;
    --border: #292d3a;
    --text: #f3f4f8;
    --muted: #9298a8;
    --red: #ef3340;
    --red-hover: #ff4d59;
    --green: #39c98a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 50% -20%, rgba(239, 51, 64, .13), transparent 55%),
        var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.65;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 22px max(calc((100% - 1100px) / 2), 24px);
    border-bottom: 1px solid var(--border);
    background: rgba(15, 16, 23, .9);
}

header h1 {
    margin: 0;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -1px;
}

header p {
    color: var(--muted);
    margin: 0;
}

header a,
nav a {
    color: var(--muted);
    text-decoration: none;
    margin-right: 14px;
    transition: color .2s;
}

header a:hover,
nav a:hover {
    color: var(--red-hover);
}

nav {
    max-width: 1100px;
    margin: 25px auto;
    padding: 0 24px;
}

main {
    width: min(100% - 40px, 1000px);
    margin: 45px auto;
    padding: 32px;
    background: rgba(21, 23, 32, .92);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .2);
}

h2 {
    margin-top: 0;
    font-size: 28px;
    letter-spacing: -.7px;
}

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

p {
    color: #c4c8d3;
}

small {
    color: var(--muted);
}

a {
    color: var(--red-hover);
}

main > a,
button,
input[type="submit"] {
    display: inline-block;
    padding: 11px 18px;
    border: 0;
    border-radius: 9px;
    background: var(--red);
    color: white;
    font-family: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

button:hover,
input[type="submit"]:hover,
main > a:hover {
    background: var(--red-hover);
    transform: translateY(-1px);
}

input,
textarea,
select {
    width: 100%;
    margin: 7px 0 18px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #10121a;
    color: var(--text);
    font: inherit;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(239, 51, 64, .12);
}

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

label {
    color: #e2e4eb;
    font-weight: 600;
}

form {
    margin-top: 20px;
}

form button {
    margin-top: 8px;
}

blockquote {
    margin: 20px 0;
    padding: 18px;
    border-left: 3px solid var(--red);
    border-radius: 8px;
    background: var(--surface-hover);
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 25px 0;
}

li {
    margin: 12px 0;
    color: #d7d9e1;
}

ul {
    padding-left: 22px;
}

.errorlist {
    color: #ff6974;
}

@media (max-width: 650px) {
    header {
        padding: 18px 20px;
        align-items: flex-start;
    }

    header h1 {
        font-size: 22px;
    }

    main {
        width: calc(100% - 24px);
        margin: 20px auto;
        padding: 20px;
    }

    h2 {
        font-size: 23px;
    }
}
/* JABKO SOCIAL - DASHBOARD */

.dashboard-header {
    max-width: 100%;
    padding: 18px max(calc((100% - 1200px) / 2), 24px);
}

.brand {
    color: var(--text);
    font-size: 25px;
    font-weight: 800;
    text-decoration: none;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.user-nav form {
    margin: 0;
}

.user-nav button {
    padding: 9px 16px;
}

.dashboard {
    max-width: 1200px;
    width: calc(100% - 40px);
    margin: 35px auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.welcome-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 230px;
    padding: 42px;
    border: 1px solid #63303a;
    border-radius: 22px;
    background: linear-gradient(120deg, #351922, #211923 65%, #301a28);
    overflow: hidden;
}

.welcome-panel h1 {
    margin: 10px 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -1.5px;
}

.welcome-panel p {
    max-width: 580px;
}

.eyebrow {
    color: #ff7b85;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.welcome-emoji {
    font-size: 100px;
    filter: drop-shadow(0 10px 25px rgba(239, 51, 64, .3));
}

.dashboard-section {
    margin-top: 45px;
}

.section-heading {
    margin-bottom: 20px;
}

.section-heading h2 {
    margin: 0;
    font-size: 25px;
}

.section-heading p {
    margin: 5px 0;
    color: var(--muted);
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
}

.social-tile {
    display: flex;
    flex-direction: column;
    min-height: 235px;
    padding: 23px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: transform .2s, border-color .2s, background .2s;
}

.social-tile:hover,
.category-tile:hover {
    transform: translateY(-5px);
    border-color: var(--red);
    background: var(--surface-hover);
}

.tile-icon {
    font-size: 34px;
    margin-bottom: 17px;
}

.social-tile h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.social-tile p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.tile-link {
    margin-top: auto;
    padding-top: 18px;
    color: #ff6974;
    font-size: 13px;
    font-weight: 700;
}

.tile-posts {
    background: linear-gradient(145deg, #35202a, #1b1922);
}

.tile-photos {
    background: linear-gradient(145deg, #202c38, #171b25);
}

.tile-chat {
    background: linear-gradient(145deg, #28243a, #191923);
}

.tile-community {
    background: linear-gradient(145deg, #20352f, #171e22);
}

.coming-soon {
    opacity: .8;
}

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

.category-tile {
    display: flex;
    flex-direction: column;
    min-height: 175px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: .2s;
}

.category-icon {
    font-size: 25px;
}

.category-tile h3 {
    margin: 10px 0 5px;
}

.category-tile p {
    margin: 0 0 15px;
    font-size: 13px;
    color: var(--muted);
}

.category-count {
    margin-top: auto;
    color: #ff6974;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-footer {
    padding: 25px;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

@media (max-width: 850px) {
    .tile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 550px) {
    .dashboard-header {
        padding: 16px;
    }

    .user-nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .welcome-panel {
        padding: 25px;
        min-height: 190px;
    }

    .welcome-emoji {
        font-size: 55px;
    }

    .tile-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .social-tile {
        min-height: 190px;
    }
}
/* =================================
   JABKO SOCIAL - CATEGORY REDESIGN
================================= */

.category-page {
    max-width: 1100px;
    width: calc(100% - 40px);
    margin: 45px auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.category-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 30px;
    min-height: 240px;
    padding: 42px;
    overflow: hidden;
    border: 1px solid rgba(239, 51, 64, .35);
    border-radius: 24px;
    background:
        radial-gradient(circle at 90% 20%, rgba(239,51,64,.25), transparent 35%),
        linear-gradient(120deg, #351922, #1c1924 70%, #271923);
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.category-hero::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -100px;
    bottom: -180px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;
    box-shadow: 0 0 0 30px rgba(255,255,255,.02),
                0 0 0 60px rgba(255,255,255,.02);
}

.category-hero-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 105px;
    height: 105px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 27px;
    background: rgba(255,255,255,.07);
    font-size: 55px;
    box-shadow: 0 12px 35px rgba(0,0,0,.2);
}

.category-hero-content {
    position: relative;
    z-index: 1;
}

.category-hero h1 {
    margin: 8px 0;
    font-size: clamp(30px, 5vw, 43px);
    letter-spacing: -1.5px;
}

.category-hero p {
    margin: 0;
    color: #c9c4ce;
    font-size: 15px;
}

.category-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.category-hero-meta span {
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    background: rgba(0,0,0,.2);
    color: #e5dce1;
    font-size: 12px;
}

.category-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin: 42px 0 22px;
}

.category-toolbar h2 {
    margin: 0;
    font-size: 26px;
}

.category-toolbar p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.create-post-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 20px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    background: linear-gradient(135deg, #f04450, #c91e32);
    color: white;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(239,51,64,.2);
    transition: .2s ease;
}

.create-post-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(239,51,64,.35);
    background: linear-gradient(135deg, #ff5964, #df263c);
}

.social-post-list {
    display: grid;
    gap: 17px;
}

.social-post-card {
    padding: 25px 28px;
    border: 1px solid #2b2e3b;
    border-radius: 19px;
    background: linear-gradient(145deg, #191c27, #14161f);
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.social-post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(239,51,64,.55);
    box-shadow: 0 16px 38px rgba(0,0,0,.25);
}

.post-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.post-avatar {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    border: 1px solid rgba(239,51,64,.3);
    border-radius: 14px;
    background: #30202a;
    font-size: 22px;
}

.post-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-author-info strong {
    color: #f5f5f8;
    font-size: 14px;
}

.post-author-info span {
    color: #858b9b;
    font-size: 12px;
}

.post-category-label {
    margin-left: auto;
    padding: 6px 10px;
    border: 1px solid rgba(239,51,64,.2);
    border-radius: 20px;
    background: rgba(239,51,64,.08);
    color: #ff7b85;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.post-card-title {
    display: inline-block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;
    letter-spacing: -.4px;
}

.post-card-title:hover {
    color: #ff6974;
}

.post-card-content {
    margin: 0;
    color: #b7bdca;
    font-size: 14px;
    line-height: 1.8;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid #2a2d38;
    color: #9298a8;
    font-size: 12px;
}

.post-card-footer a {
    color: #ff6974;
    font-weight: 800;
    text-decoration: none;
}

.post-card-footer a:hover {
    color: white;
}

.empty-category {
    padding: 55px 25px;
    border: 1px dashed #414352;
    border-radius: 20px;
    background: rgba(21,23,32,.7);
    text-align: center;
}

.empty-category > div {
    font-size: 48px;
}

.empty-category h3 {
    margin: 15px 0 5px;
    font-size: 21px;
}

.empty-category p {
    margin-bottom: 22px;
    color: var(--muted);
}

@media (max-width: 600px) {
    .category-page {
        width: calc(100% - 24px);
        margin: 22px auto;
    }

    .category-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
        padding: 25px;
    }

    .category-hero-icon {
        width: 72px;
        height: 72px;
        border-radius: 20px;
        font-size: 38px;
    }

    .category-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .create-post-button {
        width: 100%;
    }

    .social-post-card {
        padding: 20px;
    }

    .post-card-title {
        font-size: 18px;
    }
}
/* =====================================
   JABKO SOCIAL - POST & COMMENTS REDESIGN
===================================== */

.post-page {
    max-width: 950px;
    width: calc(100% - 40px);
    margin: 35px auto 55px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.post-breadcrumb {
    margin-bottom: 20px;
    color: #777f91;
    font-size: 13px;
}

.post-breadcrumb a {
    color: #ff6974;
    text-decoration: none;
}

.post-breadcrumb a:hover {
    color: white;
}

.main-post-card {
    padding: 32px;
    border: 1px solid #34303d;
    border-radius: 23px;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(239,51,64,.09), transparent 40%),
        linear-gradient(145deg, #1b1d29, #14161f);
    box-shadow: 0 18px 50px rgba(0,0,0,.2);
}

.main-post-top {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 27px;
}

.main-post-avatar {
    width: 52px;
    height: 52px;
    font-size: 26px;
}

.main-post-title {
    margin: 0 0 20px;
    color: #fff;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.25;
    letter-spacing: -1px;
}

.main-post-content {
    color: #d1d4df;
    font-size: 16px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.main-post-content p {
    color: inherit;
    margin: 0 0 15px;
}

.post-edited-note {
    margin-top: 20px;
    color: #858b9b;
    font-size: 12px;
}

.main-post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.edit-action,
.delete-action {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #343746;
    border-radius: 9px;
    background: #222532;
    color: #cbd0dc;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: .2s;
}

.edit-action:hover {
    border-color: #6678c9;
    background: #292e42;
    color: #aab9ff;
}

.delete-action:hover {
    border-color: #a93642;
    background: #3a2029;
    color: #ff7b85;
}

.main-post-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #303340;
    color: #999faf;
    font-size: 13px;
}

.comments-section {
    margin-top: 42px;
}

.comments-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 23px;
}

.comments-heading h2 {
    margin: 5px 0;
    font-size: 27px;
}

.comments-heading p {
    margin: 0;
    color: #9298a8;
    font-size: 13px;
}

.comments-count {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(239,51,64,.35);
    border-radius: 15px;
    background: rgba(239,51,64,.12);
    color: #ff6974;
    font-size: 19px;
    font-weight: 800;
}

.comment-list {
    display: grid;
    gap: 14px;
}

.comment-card {
    display: flex;
    gap: 15px;
    padding: 22px;
    border: 1px solid #2d303d;
    border-radius: 17px;
    background: linear-gradient(145deg, #191c26, #151720);
    transition: border-color .2s, transform .2s;
}

.comment-card:hover {
    border-color: #48404b;
    transform: translateY(-2px);
}

.comment-card.my-comment {
    border-color: rgba(239,51,64,.32);
    background: linear-gradient(120deg, rgba(239,51,64,.09), #171923 70%);
}

.comment-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 43px;
    height: 43px;
    border: 1px solid #393343;
    border-radius: 14px;
    background: #292331;
    font-size: 20px;
}

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

.comment-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 13px;
}

.comment-author-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.comment-author-info strong {
    color: #f3f4f8;
    font-size: 14px;
}

.comment-author-info span {
    color: #858b9b;
    font-size: 11px;
}

.comment-content {
    color: #c9cdd8;
    font-size: 14px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.comment-content p {
    color: inherit;
    margin: 0 0 9px;
}

.comment-actions {
    display: flex;
    gap: 7px;
}

.comment-actions .edit-action,
.comment-actions .delete-action {
    padding: 6px 9px;
    font-size: 11px;
}

.empty-comments {
    padding: 40px 20px;
    border: 1px dashed #414352;
    border-radius: 18px;
    background: rgba(21,23,32,.65);
    text-align: center;
}

.empty-comments > span {
    font-size: 42px;
}

.empty-comments h3 {
    margin: 12px 0 5px;
    font-size: 19px;
}

.empty-comments p {
    color: #9298a8;
    font-size: 13px;
}

.comment-form-section {
    margin-top: 38px;
    padding: 27px;
    border: 1px solid #34303d;
    border-radius: 21px;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(239,51,64,.08), transparent 45%),
        #171923;
}

.comment-form-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 22px;
}

.comment-form-heading > span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(239,51,64,.13);
    font-size: 23px;
}

.comment-form-heading h2 {
    margin: 0;
    font-size: 21px;
}

.comment-form-heading p {
    margin: 3px 0 0;
    color: #9298a8;
    font-size: 12px;
}

.social-comment-form {
    margin: 0;
}

.social-comment-form label {
    display: block;
    margin-bottom: 9px;
    color: #e2e4eb;
    font-size: 13px;
}

.social-comment-form textarea {
    min-height: 140px;
    margin: 0;
    padding: 16px;
    border: 1px solid #383b49;
    border-radius: 13px;
    background: #10121a;
    font-size: 14px;
    line-height: 1.7;
}

.social-comment-form textarea:focus {
    border-color: #ef3340;
    box-shadow: 0 0 0 4px rgba(239,51,64,.1);
}

.comment-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 17px;
}

.comment-submit-row > span {
    color: #858b9b;
    font-size: 12px;
}

.comment-submit-row button {
    margin: 0;
    padding: 12px 19px;
    border-radius: 11px;
    background: linear-gradient(135deg, #f04450, #c91e32);
}

.login-to-comment {
    text-align: center;
}

.login-to-comment p {
    margin-bottom: 17px;
    color: #b7bdca;
}

.login-to-comment .create-post-button {
    width: auto;
}

@media (max-width: 600px) {
    .post-page {
        width: calc(100% - 24px);
        margin: 20px auto 35px;
    }

    .main-post-card {
        padding: 21px;
    }

    .main-post-top {
        gap: 10px;
    }

    .main-post-top .post-category-label {
        width: 100%;
        margin-left: 0;
        text-align: center;
    }

    .comment-card {
        gap: 10px;
        padding: 16px;
    }

    .comment-avatar {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }

    .comment-form-section {
        padding: 20px;
    }

    .comment-submit-row {
        align-items: stretch;
        flex-direction: column;
    }

    .comment-submit-row button {
        width: 100%;
    }
}


/* Zdjecia w postach */
.main-post-image {
    margin-top: 22px;
    overflow: hidden;
    border-radius: 16px;
    text-align: center;
}

.main-post-image img {
    display: block;
    width: 100%;
    max-height: 650px;
    object-fit: contain;
    border-radius: 16px;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.main-post-image a:hover img {
    transform: scale(1.01);
}



/* Wlasny wybor zdjecia */
.image-upload-box { margin-top: 8px; }
.image-upload-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.image-upload-button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 12px; background: var(--red); color: #fff; font-weight: 700; cursor: pointer; transition: background .2s, transform .2s; }
.image-upload-button:hover { background: var(--red-hover); transform: translateY(-1px); }
.image-upload-hint { color: var(--muted, #a5a5b0); font-size: 13px; margin: 9px 0 0; }
.image-preview { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px; max-width: 440px; border: 1px solid rgba(239,51,64,.35); border-radius: 14px; background: rgba(255,255,255,.03); }
.image-preview[hidden] { display: none; }
.image-preview img { width: 110px; height: 90px; object-fit: cover; border-radius: 9px; }
.image-preview-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.image-preview-info strong { overflow-wrap: anywhere; color: var(--text, #fff); font-size: 13px; }
.image-preview-info button { background: transparent; color: var(--red-hover); border: 1px solid var(--red); padding: 7px 10px; border-radius: 8px; cursor: pointer; }



/* Podglad zdjecia - lightbox */
.main-post-image-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: 16px;
    overflow: hidden;
}
.main-post-image-trigger img {
    display: block;
    width: 100%;
    max-height: 650px;
    object-fit: contain;
    border-radius: 16px;
    transition: transform .2s ease;
}
.main-post-image-trigger:hover img {
    transform: scale(1.01);
}
.image-lightbox[hidden] {
    display: none;
}
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 65px 24px 24px;
    background: rgba(5, 6, 10, .94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.image-lightbox-content {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 100px);
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 15px 70px rgba(0, 0, 0, .65);
}
.image-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(239, 51, 64, .65);
    border-radius: 13px;
    background: var(--red);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.image-lightbox-close:hover {
    background: var(--red-hover);
    transform: scale(1.06);
}
@media (max-width: 600px) {
    .image-lightbox {
        padding: 60px 10px 15px;
    }
    .image-lightbox-content {
        max-height: calc(100vh - 85px);
    }
    .image-lightbox-close {
        top: 10px;
        right: 10px;
        width: 42px;
        height: 42px;
    }
}

/* JABKO SOCIAL - HOME FEED */
.home-feed .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.create-post-button {
    display: inline-flex;
    align-items: center;
    padding: 11px 17px;
    border-radius: 12px;
    background: var(--red);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: .2s;
}

.create-post-button:hover {
    background: var(--red-hover);
    transform: translateY(-2px);
}

.home-feed-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 18px;
}

.home-feed-panel {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.home-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}

.home-panel-heading h3 {
    margin: 0;
    font-size: 17px;
}

.home-panel-heading span {
    color: var(--muted);
    font-size: 11px;
}

.home-post-list {
    display: flex;
    flex-direction: column;
}

.home-post-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: .2s;
}

.home-post-item:hover {
    padding-left: 6px;
    color: #ff6974;
}

.home-post-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(239, 51, 64, .12);
    font-size: 21px;
}

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

.home-post-info strong {
    overflow-wrap: anywhere;
    font-size: 14px;
}

.home-post-info span,
.home-post-info small {
    color: var(--muted);
    font-size: 11px;
}

.home-post-arrow {
    margin-left: auto;
    color: var(--red);
}

.home-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.home-photo-item {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: var(--surface-hover);
}

.home-photo-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s;
}

.home-photo-item:hover img {
    transform: scale(1.06);
}

.home-photo-item span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 22px 9px 9px;
    overflow: hidden;
    background: linear-gradient(transparent, rgba(0,0,0,.8));
    color: #fff;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-empty {
    padding: 18px 0;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 750px) {
    .home-feed-grid {
        grid-template-columns: 1fr;
    }
}


/* PROFILE */
.profile-page {
    max-width: 900px;
}
.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    padding: 10px 0 30px;
    border-bottom: 1px solid var(--border);
}
.profile-avatar {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid var(--red);
    background: var(--surface-hover);
    font-size: 58px;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-main-info {
    min-width: 0;
}
.profile-main-info h1 {
    margin: 0;
    font-size: 30px;
    overflow-wrap: anywhere;
}
.profile-main-info > p {
    color: var(--muted);
    margin: 5px 0 14px;
}
.profile-bio {
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}
.profile-bio p {
    margin: 0 0 8px;
}
.profile-no-bio,
.profile-empty {
    color: var(--muted);
}
.profile-posts {
    padding-top: 20px;
}
.profile-posts h2 {
    margin-bottom: 20px;
}
.profile-post {
    padding: 20px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
}
.profile-post h3 {
    margin: 0 0 8px;
}
.profile-post h3 a {
    color: var(--text);
    text-decoration: none;
}
.profile-post h3 a:hover {
    color: var(--red-hover);
}
.profile-post p {
    margin: 8px 0 14px;
}
.profile-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--muted);
    font-size: 13px;
}
@media (max-width: 600px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-main-info {
        width: 100%;
    }
}


/* PROFILE EDIT */
.edit-profile-page {
    max-width: 760px;
}
.edit-profile-page > p {
    color: var(--muted);
}
.profile-edit-avatar {
    width: 130px;
    height: 130px;
    margin: 20px auto 28px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--red);
    border-radius: 50%;
    background: var(--surface-hover);
    font-size: 55px;
}
.profile-edit-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-form-field {
    margin-bottom: 20px;
}
.profile-form-field label {
    display: block;
}
.profile-form-field textarea {
    min-height: 150px;
}
.profile-form-error {
    color: var(--red-hover);
    margin-top: -12px;
}
.edit-profile-page .image-upload-box {
    margin-top: 10px;
}
.edit-profile-page .image-upload-input {
    display: none;
}
.edit-profile-page .image-upload-hint {
    color: var(--muted);
    font-size: 13px;
}


/* USER AVATARS */
.post-avatar,
.comment-avatar {
    overflow: hidden;
    border-radius: 50%;
}

.post-avatar img,
.comment-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.post-author-info a,
.comment-author-info a {
    color: inherit;
    text-decoration: none;
}

.post-author-info a:hover,
.comment-author-info a:hover {
    color: var(--red-hover);
}


/* HOMEPAGE PROFILE AVATARS */
.home-post-icon {
    overflow: hidden;
    border-radius: 50%;
}

.home-post-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.home-post-info a {
    color: inherit;
    text-decoration: none;
}

.home-post-info a:hover {
    color: var(--red-hover);
}


/* HEADER USER PROFILE */
.header-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.header-profile-link:hover {
    color: var(--red-hover);
}

.header-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid var(--red);
    border-radius: 50%;
    background: var(--surface-hover);
    font-size: 19px;
}

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

.header-profile-link small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}


/* PRIVATE MESSENGER */
.inbox-page,
.conversation-page {
    width: min(1200px, calc(100% - 40px));
    margin: 40px auto;
}

.inbox-hero {
    margin-bottom: 30px;
}

.inbox-hero h1 {
    margin: 8px 0;
    font-size: 32px;
}

.inbox-hero p,
.conversation-person small {
    color: var(--muted);
}

.inbox-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.inbox-panel,
.chat-window {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.inbox-panel-heading {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.inbox-panel-heading h2 {
    margin: 0;
    font-size: 19px;
}

.conversation-item,
.message-user-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 20px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background .2s;
}

.conversation-item:hover,
.message-user-item:hover {
    background: var(--surface-hover);
}

.conversation-avatar,
.message-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background: var(--surface-hover);
    font-size: 22px;
}

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

.conversation-info {
    min-width: 0;
    flex: 1;
}

.conversation-info strong {
    display: block;
}

.conversation-info p {
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-arrow {
    color: var(--red);
}

.message-user-item strong {
    flex: 1;
}

.message-user-item > span:last-child {
    color: var(--red);
    font-size: 12px;
}

.inbox-empty {
    padding: 25px 20px;
    color: var(--muted);
    line-height: 1.6;
}

.conversation-topbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.conversation-topbar > a {
    color: var(--red);
    text-decoration: none;
}

.conversation-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.conversation-person img,
.conversation-person > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface);
    font-size: 22px;
}

.conversation-person small {
    display: block;
    margin-top: 3px;
}

.chat-window {
    display: flex;
    flex-direction: column;
    min-height: 550px;
}

.chat-messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 15px;
    padding: 25px;
}

.chat-message {
    display: flex;
}

.chat-message-own {
    justify-content: flex-end;
}

.chat-message-other {
    justify-content: flex-start;
}

.chat-message-bubble {
    max-width: min(75%, 550px);
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface-hover);
    overflow-wrap: anywhere;
}

.chat-message-own .chat-message-bubble {
    border-color: var(--red);
    background: var(--red);
    color: white;
}

.chat-message-bubble p {
    margin: 0;
    line-height: 1.5;
}

.chat-message-bubble small {
    display: block;
    margin-top: 8px;
    font-size: 10px;
    opacity: .75;
    text-align: right;
}

.chat-empty {
    margin: auto;
    padding: 40px 15px;
    text-align: center;
}

.chat-empty > div {
    font-size: 45px;
}

.chat-empty p {
    color: var(--muted);
}

.chat-compose {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 18px;
    border-top: 1px solid var(--border);
}

.chat-compose textarea {
    flex: 1;
    min-width: 0;
    resize: vertical;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--background);
    color: var(--text);
    font: inherit;
}

.chat-compose button {
    padding: 13px 20px;
    border: 0;
    border-radius: 10px;
    background: var(--red);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.chat-compose button:hover {
    filter: brightness(1.12);
}

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

    .inbox-page,
    .conversation-page {
        width: calc(100% - 24px);
        margin: 25px auto;
    }

    .chat-window {
        min-height: 65vh;
    }

    .chat-messages {
        padding: 15px;
    }

    .chat-message-bubble {
        max-width: 88%;
    }

    .chat-compose {
        padding: 12px;
    }
}


/* UNREAD MESSAGE COUNTER */
.unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--red);
    color: white;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 12px rgba(220, 40, 55, .25);
}
