/* ============================================================
   FEED PICKER MODAL
   ============================================================ */

.feed-picker-overlay .add-lightbox-body {
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}

.feed-picker-footer {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.feed-picker-delete {
    flex-shrink: 0;
    padding: 6px;
    font-size: 13px;
    border: 2px solid #f3a4a4;
    border-radius: 8px;
    background: #fff;
    color: #b80000;
    cursor: pointer;
    transition: background 0.15s ease;
}
.feed-picker-delete:hover {
    background: #ffeaea;
}

.feed-picker-item {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px !important;
    cursor: pointer;
    transition: background 0.15s ease;
}

.feed-picker-item:hover {
    background: rgba(143, 218, 219, 0.15);
}

.feed-picker-item.feed-picker-item-active {
    background: linear-gradient(208deg, rgba(190, 241, 252, 0.55) 0%, rgba(190, 252, 228, 0.55) 100%);
    border: 2px solid #8FDADB;
}

.feed-picker-item-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.feed-picker-item-main .audio-name {
    font-size: 15px;
    font-weight: 600;
    color: #15141c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-picker-item-main .audio-artist {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-picker-edit {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 13px;
    border: 2px solid #8FDADB;
    border-radius: 8px;
    background: #fff;
    color: #15141c;
    cursor: pointer;
    transition: background 0.15s ease;
}

.feed-picker-edit:hover {
    background: #eafcff;
}

.feed-picker-name {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Feed picker: create button */
.feed-create-btn {
    font-size: 18px;
    border: none;
    padding: 16px 32px;
    cursor: pointer;
    box-sizing: border-box;
    border-radius: 8px;
    transition: background-color 0.2s;
    background: linear-gradient(208deg, rgb(190, 241, 252) 0%, rgb(190, 252, 228) 100%);
    border-width: 2px;
    border-style: solid;
    border-color: rgb(143, 218, 219);
}

/* ============================================================
   FEED EDITOR MODAL
   ============================================================ */

.feed-editor-overlay .add-lightbox-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 75vh;
    overflow-y: auto;
    padding-right: 4px;
}

.feed-editor-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-editor-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: #15141c;
}

.feed-editor-field > span {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.feed-editor-field input[type="text"],
.feed-editor-field input[type="date"],
.feed-editor-field select {
    padding: 8px 12px;
    font-size: 14px;
    border: 2px solid #bccee2;
    border-radius: 8px;
    background: #edeff4;
    color: #15141c;
    outline: none;
    transition: border-color 0.15s ease;
}

.feed-editor-field input[type="text"]:focus,
.feed-editor-field input[type="date"]:focus,
.feed-editor-field select:focus {
    border-color: #8FDADB;
    background: #fff;
}

.feed-editor-toggle {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.feed-editor-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8FDADB;
    cursor: pointer;
}

.feed-editor-timerange {
    display: flex;
    gap: 8px;
}

.feed-editor-timerange input {
    flex: 1;
    min-width: 0;
}

.feed-editor-advanced-toggle {
    align-self: flex-start;
    background: none;
    border: none;
    padding: 4px 0;
    font-size: 13px;
    color: #1a6e8e;
    text-decoration: underline;
    cursor: pointer;
}

.feed-editor-advanced-toggle:hover {
    color: #0d4d63;
}

.feed-editor-mixed {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    padding: 8px;
    background: #f4f7fb;
    border-radius: 8px;
}

.feed-editor-mixed .postbutton {
    padding: 6px 12px;
    font-size: 13px;
}

.feed-editor-mixed-summary {
    flex-basis: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}

.feed-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e3e8ef;
}

.feed-editor-delete {
    padding: 8px 16px;
    font-size: 14px;
    border: 2px solid #f3a4a4;
    border-radius: 8px;
    background: #fff;
    color: #b80000;
    cursor: pointer;
    transition: background 0.15s ease;
}

.feed-editor-delete:hover {
    background: #ffeaea;
}

/* ============================================================
   ENTITY PICKER (ports / friends grid)
   ============================================================ */

.feed-entity-picker-overlay .add-lightbox-body {
    max-height: 75vh;
    overflow-y: auto;
}

.feed-entity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 4px;
}

.feed-entity-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #f7f9fc;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    position: relative;
}

.feed-entity-cell:hover {
    background: #eef4fb;
}

.feed-entity-cell.selected {
    border-color: #8FDADB;
    background: linear-gradient(208deg, rgba(190, 241, 252, 0.55) 0%, rgba(190, 252, 228, 0.55) 100%);
}

.feed-entity-picture {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: #dfe6ef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-entity-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feed-entity-name {
    font-size: 14px;
    font-weight: 600;
    color: #15141c;
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-entity-check {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #0d8a4a;
}

.feed-entity-cell.selected .feed-entity-check {
    display: block;
}

.feed-entity-cell:not(.selected) .feed-entity-check {
    display: none;
}

.add-tab-btn {
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    border-right:0;
    border-left:0;
    align-self: center;
    padding: 10px 30px;
    background: linear-gradient(180deg, #75ecf3, #169abf);
    color: white;
    border-bottom: solid #215f85 4px;
    border-top: solid #edf8ff 2px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
}

.add-tab-btn.selected {
    border-bottom:0px;
    border-top: solid #215f85 6px;
    background: linear-gradient(180deg, #1ba0a8, #169abf);
}

.add-tab-btn:hover {
    background: linear-gradient(180deg, #96f2f8, #26b5dc);
    border-bottom: solid #215f85 6px;
    border-top: solid #edf8ff 0px;
}


.feed-entity-picker-overlay .add-lightbox {
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.feed-entity-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.feed-entity-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px;
    /* Reserve space for the scrollbar so the 3-column grid doesn't
       jitter between columns when it appears. */
    scrollbar-gutter: stable;
}

.feed-entity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    /* Prevent grid children from forcing horizontal overflow. */
    width: 100%;
}

.feed-entity-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #f7f9fc;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    min-width: 0;
}

.feed-entity-cell:hover {
    background: #eef4fb;
}

.feed-entity-cell.selected {
    border-color: #8FDADB;
    background: linear-gradient(208deg, rgba(190, 241, 252, 0.55) 0%, rgba(190, 252, 228, 0.55) 100%);
}

.feed-entity-picture {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: #dfe6ef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-entity-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feed-entity-name {
    font-size: 12px;
    color: #15141c;
    text-align: center;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.25;
    /* Wrap to next line instead of truncating. */
    white-space: normal;
}

.feed-entity-check {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 26px;
    line-height: 1;
    font-weight: 800;
    color: #0d8a4a;
    text-shadow: 0 1px 0 #fff, 0 0 6px rgba(255,255,255,0.9);
    pointer-events: none;
    display: none;
}

.feed-entity-cell.selected .feed-entity-check {
    display: block;
}

.feed-entity-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 4px 4px 4px;
    border-top: 1px solid #e3e8ef;
    background: #fff;
}

/* ---------- Превью ссылок в сообщениях ---------- */
.link-preview-container {
    margin-top: 8px;
    display: none;
}
.link-preview-card {
    display: flex;
    align-items: stretch;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration:none;
}
.link-preview-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
}
.link-preview-info {
    padding: 8px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}
.link-preview-title {
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.link-preview-description {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.link-preview-url {
    font-size: 11px;
    color: #888;
}

.link-preview-link {
    text-decoration:none;
    color:#888;
}

.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlayFadeIn 0.2s ease;
}

.share-modal {
    background: linear-gradient(180deg, #dceaf5 0%, #b5d5e8 100%);
    border-radius: 16px;
    padding: 25px;
    width: 90%;
    max-width: 480px;
    border: 4px solid #cccfe0;
    border-style: outset;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalSlideIn 0.2s ease;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.share-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #555;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.share-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.share-modal h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #1a1a2e;
    font-size: 22px;
}

.share-chats-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.3);
    padding: 8px;
    max-height: 300px;
}

.share-chat-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    gap: 12px;
}

.share-chat-item:last-child {
    border-bottom: none;
}

.share-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #8FDADB;
}

.share-chat-name {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-chat-send {
    background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
    border: 2px solid #8FDADB;
    border-radius: 8px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.share-chat-send:hover {
    background: linear-gradient(208deg, rgba(170, 221, 242, 1) 0%, rgba(170, 242, 218, 1) 100%);
    transform: translateY(-1px);
}

.share-chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.share-loading, .share-empty, .share-error {
    text-align: center;
    padding: 20px;
    color: #666;
}

.share-link-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

.share-link-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #bccee2;
    border-radius: 8px;
    background: #edeff4;
    font-size: 14px;
    color: #1a1a2e;
    font-family: inherit;
    min-width: 0;
}

.share-link-input:focus {
    outline: none;
    border-color: #8FDADB;
}

.share-copy-btn {
    background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
    border: 2px solid #8FDADB;
    border-radius: 8px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.share-copy-btn:hover {
    background: linear-gradient(208deg, rgba(170, 221, 242, 1) 0%, rgba(170, 242, 218, 1) 100%);
}

.share-social-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-top: 12px;
}

.share-social-row span {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a2e;
}

.share-social-btn {
    background: none;
    border:none;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px;
    filter: drop-shadow(4px 7px 6px rgba(0, 0, 0, 0.4));
}

.share-social-btn:hover {
    transform: scale(1.05);
}

.share-social-btn img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.reply-preview-block {
    display: flex;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-bottom: 6px;
    border-left: 3px solid #8FDADB;
    overflow: hidden;
    max-height: 80px;
}

.reply-thumbnail-container {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    overflow: hidden;
    margin-right: 10px;
}

.reply-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reply-audio-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    font-size: 40px;
}

.reply-content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.reply-preview-name {
    font-weight: 600;
    font-size: 12px;
    color: #333;
    margin-bottom: 2px;
}

.reply-media-type {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.reply-text-preview {
    font-size: 13px;
    color: #555;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hashtag-link {
    color: #1895d6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}


.hashtag-link:hover {
    color: #003f96;
}

.post-title {
  margin: 16px;
  text-align: center;
  font-size:36px;
  font-weight:bold;
}

.logo-name img {
height: 40px;
display: flex;
}

.nav-link img {
    height: 30px;
    width: auto;
    padding: 3px;
}

#reset-password-send-link:disabled {
    cursor: not-allowed;
}

.comment-attachment-audio-item {
    background: linear-gradient(90deg, rgb(223 238 246 / 50%) 0%, rgb(150 214 246 / 50%) 100%);
    padding: 10px;
    border-radius: 6px;
    border-style: outset;
    border-width: 2px;
    border-color: #bccee2;
    width: 100%;
    margin-left: calc(5% - 14px);
}

.comment-attachment-audio-play-button {
    background: transparent;
    border: none;
    cursor: pointer;
    width: fit-content;
    aspect-ratio: 1/1;
}

.comment-attachment-audio-play-icon {
    width: 48px;
    aspect-ratio: 1/1;
}

.comment-attachment-audio-progress-container {
    width: 100%;
    display: flex;
    gap: 15px;
    align-items: center;

}

.lightbox-media-container {
    height: 100%;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-attachment-audio-progress-bar {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;

    outline: none;
    cursor: pointer;
    height: 6px;

    background-image: linear-gradient(#8FDADB, #8FDADB);
    background-color: rgba(0, 0, 0, 0.1);
    background-size: 0% 100%;
    background-repeat: no-repeat;
}

.comment-attachment-audio-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #8FDADB;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.comment-attachment-audio-progress-bar::-moz-range-thumb {
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #8FDADB;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.comment-attachment-audio-current-time, .comment-attachment-audio-duration {
    font-size: 14px;
    color: #666;
    font-variant-numeric: tabular-nums;
}

.comment-attachment-audio-current-time {
    padding-left: 10px;
}

.comment-attachment-audio-duration {
    padding-right: 20px;
}


.comment-attachment-audio-player {
    display: flex;
    align-items: center;
}

.comment-attachment-audio-name {
    font-size: 14px;
    font-weight: 500;
    color: #15141c
}

.comment-attachment-audio-artist {
    font-size: 12px;
    color: #666;
}

.comment-attachment-audio-actions {
    display: flex;
    gap: 5px;
}

.comment-attachment-audio-add-button {
    background: transparent;
    border: none;
    font-size: 16px;
    transition: background-color .2s ease;
    border-radius: 4px;
}

.comment-attachment-audio-add-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.comment-attachment-audio-download-button {
    background: transparent;
    border: none;
    color: #4CAF50;
    font-size: 16px;
    transition: background-color .2s ease;
    border-radius: 4px;
}

.comment-attachment-audio-download-button:hover {
    background-color: rgba(76, 175, 80, 0.1);
}


.comment-attachment-audio-top {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.comment-attachment-audio-volume {
    display: flex;
    align-items: center;
}

.comment-attachment-audio-volume-icon {
    width: 24px;
    height: 24px
}

.comment-attachment-audio-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    background-image: linear-gradient(#8FDADB, #8FDADB);
    background-color: rgba(0, 0, 0, 0.1);
    background-repeat: no-repeat;
    width: 80px;
    background-size: 0% 100%;
    cursor: pointer;

    border-radius: 2px;
    height: 4px;
}

.comment-attachment-audio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8FDADB;
    cursor: pointer;
}

.comment-attachment-audio-volume-slider::-moz-range-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8FDADB;
    cursor: pointer;
    border: none;
}

.comment-attachment:has(.comment-attachment-audio-item) {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
}
.comment-attachment .comment-attachment-audio-item {
    width: 100%;
    margin-left: 0;
    box-sizing: border-box;
}


.post-audio-item {
    background: linear-gradient(90deg, rgb(223 238 246 / 50%) 0%, rgb(150 214 246 / 50%) 100%);
    padding: 10px;
    border-radius: 6px;
    border-style: outset;
    border-width: 2px;
    border-color: #bccee2;
    width: 90%;
    margin-left: calc(5% - 14px);
}

.post-audio-play-button {
    background: transparent;
    border: none;
    cursor: pointer;
    width: fit-content;
    aspect-ratio: 1/1;
}

.post-audio-play-icon {
    width: 48px;
    aspect-ratio: 1/1;
}

.post-audio-progress-container {
    width: 100%;
    display: flex;
    gap: 15px;
    align-items: center;

}



.post-audio-progress-bar {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;

    outline: none;
    cursor: pointer;
    height: 6px;

    background-image: linear-gradient(#8FDADB, #8FDADB);
    background-color: rgba(0, 0, 0, 0.1);
    background-size: 0% 100%;
    background-repeat: no-repeat;
}

.post-audio-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #8FDADB;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.post-audio-progress-bar::-moz-range-thumb {
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #8FDADB;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.post-audio-current-time, .post-audio-duration {
    font-size: 14px;
    color: #666;
    font-variant-numeric: tabular-nums;
}

.post-audio-current-time {
    padding-left: 10px;
}

.post-audio-duration {
    padding-right: 20px;
}


.post-audio-player {
    display: flex;
    align-items: center;
}

.post-audio-info {
}

.post-audio-name {
    font-size: 14px;
    font-weight: 500;
    color: #15141c
}

.post-audio-artist {
    font-size: 12px;
    color: #666;
}

.post-audio-actions {
    display: flex;
    gap: 5px;
}

.post-audio-add-button {
    background: transparent;
    border: none;
    font-size: 16px;
    transition: background-color .2s ease;
    border-radius: 4px;
}

.post-audio-add-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.post-audio-download-button {
    background: transparent;
    border: none;
    color: #4CAF50;
    font-size: 16px;
    transition: background-color .2s ease;
    border-radius: 4px;
}

.post-audio-download-button:hover {
    background-color: rgba(76, 175, 80, 0.1);
}


.post-audio-top {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.post-audio-volume {
    display: flex;
    align-items: center;
}

.post-audio-volume-icon {
    width: 24px;
    height: 24px
}

.post-audio-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    background-image: linear-gradient(#8FDADB, #8FDADB);
    background-color: rgba(0, 0, 0, 0.1);
    background-repeat: no-repeat;
    width: 80px;
    background-size: 0% 100%;
    cursor: pointer;

    border-radius: 2px;
    height: 4px;
}

.post-audio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8FDADB;
    cursor: pointer;
}

.post-audio-volume-slider::-moz-range-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8FDADB;
    cursor: pointer;
    border: none;
}

/* ===== FLAG MODAL ===== */
.flag-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlayFadeIn 0.2s ease;
}

.flag-modal {
    background: linear-gradient(180deg, #dceaf5 0%, #b5d5e8 100%);
    border-radius: 16px;
    padding: 25px;
    width: 90%;
    max-width: 440px;
    border: 4px solid #cccfe0;
    border-style: outset;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalSlideIn 0.2s ease;
}

.flag-modal h3 {
    margin-top: 0;
    color: #1a1a2e;
}

.flag-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #555;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.flag-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.flag-modal-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.flag-modal-group label {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
}

.flag-modal-group select {
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #cccfe0;
    background: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}

.flag-modal-group select:focus {
    outline: none;
    border-color: #8FDADB;
}

.flag-modal-group textarea {
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #cccfe0;
    background: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
}

.flag-modal-group textarea:focus {
    outline: none;
    border-color: #8FDADB;
}

.flag-cancel-btn {
    padding: 8px 20px;
    border-radius: 8px;
    border: 2px solid #cccfe0;
    background: linear-gradient(180deg, #e8f0f8, #c8d8e8);
    color: #1a1a2e;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.flag-cancel-btn:hover {
    background: linear-gradient(180deg, #f0f8ff, #d8e8f8);
}

.flag-submit-btn {
    padding: 8px 20px;
    border-radius: 8px;
    border: 2px solid #cc3a3a;
    background: linear-gradient(180deg, #ff6b6b, #cc3a3a);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.flag-submit-btn:hover {
    background: linear-gradient(180deg, #ff7b7b, #dc4a4a);
}

.flag-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== FEED SETTINGS POPUP ===== */
.feed-settings-popup {
    position: fixed;
    background: linear-gradient(180deg, #dceaf5 0%, #b5d5e8 100%);
    border-radius: 12px;
    padding: 20px;
    width: 280px;
    border: 4px solid #cccfe0;
    border-style: outset;
    box-shadow: 5px 10px 20px rgba(0, 10, 90, 0.3);
    z-index: 50;
    animation: settingsSlideIn 0.2s ease;
}

@keyframes settingsSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.feed-settings-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 10px;
}

.feed-settings-header h3 {
    margin: 0;
    color: #1a1a2e;
    font-size: 16px;
}

.feed-settings-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-settings-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feed-settings-group label {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a2e;
}

.feed-settings-group select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 2px solid #cccfe0;
    background: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.feed-settings-group select:focus {
    outline: none;
    border-color: #8FDADB;
}

.feed-settings-apply {
    padding: 8px;
    border-radius: 6px;
    border: 2px solid #3a8e8f;
    background: linear-gradient(180deg, #8FDADB, #4a9e9f);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

.feed-settings-apply:hover {
    background: linear-gradient(180deg, #9feaeb, #5aaeaf);
}

/* ===== NEW POST FAB BUTTON ===== */
.new-post-fab {
    position: fixed;
    bottom: 55px;
    left: -30px;
    border: none;
    background: none;
    cursor: pointer;
z-index: 999;
}

.new-post-fab > img {
    filter: brightness(1.05) drop-shadow(5px 5px 5px #222);
    transform: scale(1) translateX(0px);
    transition:all 0.2s ease;
    width:100px;
    height:100px;
}

.new-post-fab > img:hover {
    filter: brightness(1.1) drop-shadow(5px 5px 5px #222);
    transform: scale(1.1) translateX(30px);
}


.new-post-fab:active {
    transform: scale(0.95);
}

.poll-undo-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    text-decoration: underline;
    transition: color 0.2s;
    font-family: inherit;
    position:absolute;
    left: 15px;
    bottom: 10px;
}

.poll-undo-btn:hover {
    color: #ff4444;
}

/* Or if you want it to be a white circle with a check inside */
.poll-choice-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    right: 65px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

/* ===== ADD BUTTON DROPDOWN ===== */
.add-button-container {
    position: relative;
    display: inline-block;
}

.add-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 2px solid #cccfe0;
    border-radius: 8px;
    padding: 5px 0;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 10000;
    margin-top: 4px;
}

.add-option {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a2e;
    transition: background 0.15s;
}

.add-option:hover {
    background: rgba(143, 218, 219, 0.2);
}

.add-option:not(:last-child) {
    border-bottom: 1px solid #eee;
}

/* ===== ADD LIGHTBOX ===== */
.add-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlayFadeIn 0.2s ease;
}

.add-lightbox {
    background: linear-gradient(180deg, #dceaf5 0%, #b5d5e8 100%);
    border-radius: 16px;
    padding: 25px;
    width: 90%;
    max-width: 480px;
    border: 4px solid #cccfe0;
    border-style: outset;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalSlideIn 0.2s ease;
}

.add-lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #555;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.add-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.add-lightbox h3 {
    font-size: 20px;
    font-weight: bold;
    color: #1a1a2e;
    margin-top: 0;
    margin-bottom: 16px;
}

.add-lightbox-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.add-lightbox-dropzone {
    border: 3px dashed #cccfe0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.add-lightbox-dropzone:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: #8FDADB;
}

.add-lightbox-dropzone span {
    color: #666;
    font-size: 15px;
}

.add-upload-btn {
    align-self: center;
    padding: 10px 30px;
    background: linear-gradient(180deg, #8FDADB, #4a9e9f);
    color: white;
    border: 2px solid #3a8e8f;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
}

.add-upload-btn:hover {
    background: linear-gradient(180deg, #9feaeb, #5aaeaf);
}

.add-upload-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== ADD LIGHTBOX MEDIA ===== */
.add-lightbox-media {
    max-width: 640px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.add-lightbox-media .add-lightbox-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    max-height: 60vh;
    position: relative;
}

.add-lightbox-upload-row {
    display: flex;
    margin-bottom: 12px;
    flex-shrink: 0;
    height: 42px;
}

/* ===== PHOTOS & GIFS GRID - Equal squares ===== */
.add-lightbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding: 4px;
    min-height: 100px;
    max-height: calc(60vh - 80px);
    align-content: start;
}

.add-lightbox-grid::-webkit-scrollbar {
    width: 6px;
}

.add-lightbox-grid::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 3px;
}

.add-lightbox-grid::-webkit-scrollbar-thumb {
    background: #8FDADB;
    border-radius: 3px;
}

.add-lightbox-grid-item {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: 200px;
    border-radius: 8px;
    margin-bottom: 0;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #cccfe0;
    transition: all 0.2s;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.add-lightbox-grid-item:hover {
    border-color: #8FDADB;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.add-lightbox-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.add-lightbox-grid-item-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== AUDIO GRID - Full rows, normal height ===== */
.add-lightbox-grid-audio {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    flex: 1;
    padding: 4px;
    min-height: 100px;
    max-height: calc(60vh - 80px);
}

.add-lightbox-grid-item-audio {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #cccfe0;
    background: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s;
    height: 56px;
    flex-shrink: 0;
}

.add-lightbox-grid-item-audio:hover {
    border-color: #8FDADB;
    background: rgba(255,255,255,0.9);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.add-lightbox-grid-item-audio .audio-order {
    font-size: 14px;
    font-weight: bold;
    color: #888;
    min-width: 30px;
    text-align: right;
}

.add-lightbox-grid-item-audio .audio-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.add-lightbox-grid-item-audio .audio-name {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.add-lightbox-grid-item-audio .audio-artist {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.add-lightbox-grid-item-audio .audio-length {
    font-size: 13px;
    color: #888;
    min-width: 50px;
    text-align: right;
}

.add-lightbox-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
}

.add-lightbox-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
}

.add-lightbox-dropzone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(143, 218, 219, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 10;
    animation: overlayFadeIn 0.2s ease;
}

.add-lightbox-dropzone-content {
    background: rgba(255,255,255,0.9);
    padding: 40px 60px;
    border-radius: 16px;
    border: 4px dashed #8FDADB;
    text-align: center;
}

.add-lightbox-dropzone-content span {
    font-size: 20px;
    color: #1a1a2e;
    font-weight: 500;
}

.add-lightbox {
    position: relative;
}

/* ===== NEW POST OVERLAY ===== */
.new-post-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.new-post-modal {
    background: white;
    border-radius: 16px;
    padding: 25px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border: 4px solid #cccfe0;
    border-style: outset;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.new-post-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.new-post-modal-header > span {
    font-size: 22px;
    font-weight: bold;
    color: #1a1a2e;
}

.new-post-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #555;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.new-post-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Scrollbar styling for modal */
.new-post-modal::-webkit-scrollbar {
    width: 8px;
}

.new-post-modal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.new-post-modal::-webkit-scrollbar-thumb {
    background: #8FDADB;
    border-radius: 4px;
}

/* Keep existing post creator styles but ensure they work in modal */
.new-post-modal .creator-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.new-post-modal .creator-avatar {
    width: 100px;
    height: 100px;
    border-radius: 0;
    border: 3px solid #cccfe0;
    position: relative;
}

.new-post-modal .post-creator-textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #cccfe0;
    background: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.new-post-modal .post-creator-textarea:focus {
    outline: none;
    border-color: #8FDADB;
    background: rgba(255, 255, 255, 0.9);
}

.new-post-modal .anonymous-text {
    font-size: 14px;
    color: #555;
    margin-right: 5px;
}

.new-post-modal .anonymous-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #4a9e9f;
    cursor: pointer;
}

.new-post-modal .post-creator-files-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.new-post-modal .files-preview-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.new-post-modal .preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #cccfe0;
    background: rgba(255,255,255,0.5);
}

.new-post-modal .preview-item img,
.new-post-modal .preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.new-post-modal .remove-file {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 50, 50, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-post-modal .audio-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #8FDADB;
    color: white;
    font-size: 12px;
    text-align: center;
    padding: 4px;
    word-break: break-all;
}

.new-post-modal .send-button {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    margin-inline: auto;
    place-self: center;
    transition: all 0.2s ease;
}

.new-post-modal .send-button:hover {
    filter: brightness(1.05);
    transform: scale(1.05);
}

.new-post-modal .send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== RESET & BASE ===== */
body {
  background-color: #c7eaf5;
  background-size: cover;
  color: #15141c;
  font-family: arial;
  font-size: 18px;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: url('bg.webp');
  background-attachment: fixed
}
img {
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}

.chat-badge-replacement {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #ff4444;
    color: white;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-family: arial, sans-serif;
    flex-shrink: 0;
    margin-right: 5px;
    margin-bottom: 3px;
}

/* ===== UTILITY BAR ===== */
.utility-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(0deg,rgba(10, 10, 10, 1) 50%, rgba(74, 74, 74, 1) 100%);;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    z-index: 998;
    box-sizing: border-box;
}

/* Top nav bar - also fixed */
.top-bar {
    position: fixed;
    top: 30px; /* Below utility bar */
    left: 0;
    width: 100%;
    background-color: #edeff4;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    box-sizing: border-box;
}

.utility-link {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 14px;
    transition: color 0.2s;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

.utility-link:hover {
    text-decoration: underline !important;
    color: #ffffff !important;
}

.utility-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.utility-right {
    display: flex;
    align-items: center;
    gap: 0px;
}

/* Profile section - DESKTOP ONLY (visible) */
.utility-profile {
    display: flex !important;
    align-items: center;
    gap: 8px;
    color: #ffffff !important;
}

.utility-username {
    font-size: 14px;
    color: #ffffff;
}

.utility-avatar {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: cover;
}

/* Logout - red, to the left of profile */
.utility-logout {
    margin-right:40px;
    color: #ff4444 !important;
}

.utility-logout:hover {
    color: #ff4444 !important;
    text-decoration: underline !important;
}

/* ============================================
   MASCOT
   ============================================ */

/* Mascot container - fixed position at bottom right */
.mascot-dummy {
    position: fixed;
    bottom: 0;
    right: 25%;
    transform: translateX(50%);
    z-index: 998;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: grab;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    width: 180px;
}

.mascot-dummy.mascot-dragging {
    cursor: grabbing;
    transition: none;
}

.mascot-dummy.mascot-dock-left,
.mascot-dummy.mascot-dock-right,
.mascot-dummy.mascot-dock-bottom {
    right: auto;
    bottom: auto;
    transform: none;
}

.mascot-dummy.mascot-dock-left .mascot-video {
    transform: rotate(90deg);
    transform-origin: center;
}

.mascot-dummy.mascot-dock-right .mascot-video {
    transform: rotate(-90deg);
    transform-origin: center;
}

.mascot-dummy.mascot-dock-bottom.mascot-facing-right .mascot-video {
    transform: scaleX(-1);
}

.mascot-dummy.mascot-dock-bottom.mascot-facing-left .mascot-video {
    transform: scaleX(1);
}

.mascot-dummy.mascot-dock-preview .mascot-video {
    filter: drop-shadow(0 0 16px rgba(74, 199, 255, 0.95)) brightness(1.08);
}

.mascot-dock-zones {
    position: fixed;
    inset: 0;
    z-index: 997;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.16s ease;
}

.mascot-dock-zones-visible {
    opacity: 1;
}

.mascot-dock-zone {
    position: absolute;
    border: 2px dashed rgba(73, 181, 235, 0.68);
    box-shadow: inset 0 0 30px rgba(72, 186, 238, 0.18);
    transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.mascot-dock-zone-left,
.mascot-dock-zone-right {
    top: 0;
    bottom: 0;
    width: 96px;
    background: linear-gradient(to right, rgba(104, 208, 255, 0.34), rgba(104, 208, 255, 0.04));
}

.mascot-dock-zone-left {
    left: 0;
    border-left: 0;
    border-radius: 0 24px 24px 0;
}

.mascot-dock-zone-right {
    right: 0;
    border-right: 0;
    border-radius: 24px 0 0 24px;
    background: linear-gradient(to left, rgba(104, 208, 255, 0.34), rgba(104, 208, 255, 0.04));
}

.mascot-dock-zone-bottom {
    left: 0;
    right: 0;
    bottom: 0;
    height: 96px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(to top, rgba(104, 208, 255, 0.34), rgba(104, 208, 255, 0.04));
}

.mascot-dock-zone-active {
    border-color: rgba(36, 158, 226, 1);
    background: linear-gradient(to top, rgba(104, 208, 255, 0.72), rgba(104, 208, 255, 0.16));
    box-shadow: inset 0 0 46px rgba(42, 174, 235, 0.48), 0 0 20px rgba(42, 174, 235, 0.28);
}

.mascot-being-petted .mascot-video {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15)) brightness(1.08);
}

/* Mascot video itself */
.mascot-video {
    height: auto;
    width: 180px;
    pointer-events: none;
    user-select: none;
    position: relative;
    z-index: 2;
    /* Subtle shadow for depth */
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* ============================================
   SPEECH BUBBLE
   ============================================ */

.m-speech-bubble {
    position: absolute;
    bottom: 270px; /* Sits above mascot */
    left: 50%;
    transform: translateX(50%);
    background: white;
    border: 3px solid #8FDADB;
    border-radius: 8px;
    padding: 16px 20px;
    min-width: 220px;
    max-width: 300px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    font-size: 14px;
    line-height: 1.5;
    color: #15141c;
    animation: bubbleFloat 3s ease-in-out infinite;
    transform-origin: bottom center;
    /* Tail */
}

/* Tail - points to mascot */
.m-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 18px solid white;
    z-index: 1;
    filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.05));
}

/* Tail outline */
.m-speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 22px solid #8FDADB;
    z-index: 0;
}

/* Bubble sway animation */
@keyframes bubbleFloat {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-50%) rotate(1.5deg); }
    75% { transform: translateX(-50%) rotate(-1.5deg); }
}

/* Bubble text */
.m-speech-text {
    padding-right: 24px; /* Space for close button */
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #15141c;
    word-wrap: break-word;
    white-space: pre-wrap;
}



/* ============================================
   BUBBLE BUTTONS
   ============================================ */

/* Close button - circle, absolute top right */
.m-bubble-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 2px solid #8FDADB;
    color: #8FDADB;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 10;
}

.m-bubble-close:hover {
    background: #bef1fc;
    border-color: #6fc0c1;
    transform: scale(1.05);
}

/* Buttons row */
.m-speech-buttons-row {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* Speech buttons */
.m-speech-button {
    background: white;
    border: 2px solid #8FDADB;
    color: #15141c;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.m-speech-button:hover {
    background: #bef1fc;
    border-color: #6fc0c1;
    transform: translateY(-1px);
}

.m-speech-button:active {
    transform: translateY(0px);
}

/* ============================================
   BRICK THROW ANIMATION
   ============================================ */

.mascot-brick-hit {
    animation: brickHit 0.5s ease forwards;
}

@keyframes brickHit {
    0% { transform: translateX(0) scale(1) rotate(0deg); }
    30% { transform: translateX(-30px) scale(0.8) rotate(-15deg); }
    60% { transform: translateX(10px) scale(0.9) rotate(5deg); }
    100% { transform: translateX(0) scale(1) rotate(0deg); }
}

/* If mascot gets bricked and disappears */
.mascot-bricked {
    animation: brickFade 0.6s ease forwards;
}

@keyframes brickFade {
    0% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(20deg); opacity: 0.8; }
    100% { opacity: 0; transform: scale(0.5) rotate(40deg) translateY(40px); }
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #edeff4;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 100;
  box-sizing: border-box;
}

body {
  padding-top: 70px;
}

#auth-buttons {
  display: flex;
  align-items: center;
}


/* ===== AUDIOS PAGE ===== */
.audios-container {
    margin-left: 0;
    width: 70%;
    max-width: 900px;
    min-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.audios-player {
    background: white;
    border: 4px solid #cccfe0;
    border-style: outset;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
    margin-top: 60px;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
    width: 110%;
}

.audios-tabs {
    display: flex;
    border-bottom: 4px solid #bccee2;
    background: rgb(188, 206, 226);
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
    position: absolute;
    top: -49px;
    height: 45px;
}

#library-view, #playlists-view {
    padding: 20px;
    flex: 1;
}


.audios-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
    border-right: 2px solid rgba(127, 129, 140, 0.3);
}

.audios-tab:hover {
    color: #15141c;
    background: rgba(255, 255, 255, 0.2);
}

.audios-tab.active {
    background: white;
    color: #15141c;
    font-weight: bold;
    border-radius: 12px 12px 0 0;
    border-bottom: 2px solid white;
}

.audios-content {
    background: white;
    border: 4px solid #bccee2;
    border-radius: 12px;
    padding: 0;
    flex: 1;
    min-height: calc(100vh - 100px);
    box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
    display: flex;
    flex-direction: column;
    position: relative;
    margin-top: 100px;
}

.audio-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
}

.audio-item:hover {
    background: rgba(190, 241, 252, 0.2);
}

.audio-item.active {
    background: rgba(190, 241, 252, 0.4);
}

.audio-item .audio-index {
    width: 30px;
    color: #999;
    font-size: 13px;
    text-align: center;
}

.audio-item .audio-info {
    flex: 1;
    margin-left: 10px;
}

.audio-item .audio-name {
    font-weight: 500;
    font-size: 14px;
    color: #15141c;
}

.audio-item .audio-artist {
    font-size: 12px;
    color: #666;
}

.audio-item .audio-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.audio-item:hover .audio-actions {
    opacity: 1;
}

.audio-item .audio-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.audio-item .audio-actions button:hover {
    background: rgba(0, 0, 0, 0.1);
}

.audio-item .audio-actions .remove-btn {
    color: #ff4444;
}

.audio-item .audio-actions .edit-btn {
    color: #4a8db7;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-area {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-btn {
    background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
    border: 2px solid #8FDADB;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.upload-btn:hover {
    background: linear-gradient(208deg, rgba(170, 221, 242, 1) 0%, rgba(170, 242, 218, 1) 100%);
    transform: translateY(-1px);
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
}

.playlist-item:hover {
    background: rgba(190, 241, 252, 0.2);
}

.playlist-item .playlist-info {
    flex: 1;
}

.playlist-item .playlist-name {
    font-weight: 500;
    font-size: 15px;
}

.playlist-item .playlist-count {
    font-size: 12px;
    color: #999;
}

.playlist-item .playlist-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.playlist-item:hover .playlist-actions {
    opacity: 1;
}

.playlist-item .playlist-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.playlist-item .playlist-actions button:hover {
    background: rgba(0, 0, 0, 0.1);
}

.playlist-item .playlist-actions .delete-btn {
    color: #ff4444;
}

/* Edit modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border: 4px solid #cccfe0;
    border-style: outset;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
}

.modal-content h3 {
    margin-top: 0;
    color: #15141c;
}

.modal-content label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-top: 12px;
    margin-bottom: 4px;
}

.modal-content input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #bccee2;
    border-radius: 8px;
    background: #edeff4;
    font-size: 14px;
    box-sizing: border-box;
}

.modal-content .modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.modal-content .modal-buttons button {
    padding: 8px 20px;
    border-radius: 8px;
    border: 2px solid #8FDADB;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}

.modal-content .modal-buttons .save-btn {
    background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
    border-color: #8FDADB;
}

.modal-content .modal-buttons .save-btn:hover {
    background: linear-gradient(208deg, rgba(170, 221, 242, 1) 0%, rgba(170, 242, 218, 1) 100%);
}

.modal-content .modal-buttons .cancel-btn:hover {
    background: #f0f0f0;
}

.player-btn.active {
    background: rgba(190, 241, 252, 0.6);
    border-radius: 6px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.player-btn.active img {
    filter: brightness(0.8);
}

/* Volume button states */
.player-btn.muted img {
    filter: grayscale(1) opacity(0.5);
}

.audios-player {
    background: white;
    border: 4px solid #cccfe0;
    border-style: outset;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
    position: sticky;
    top: 100px;
    z-index: 50;    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.player-info {
    flex: 1;
    min-width: 150px;
}

.player-info .song-name {
    font-weight: bold;
    font-size: 32px;
    color: #15141c;
}

.player-info .song-artist {
    font-size: 16px;
    color: #666;
}

.player-buttons {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top:10px;
}

.player-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-btn:hover {
    background: rgba(190, 241, 252, 0.3);
}

.audio-item .audio-actions .download-btn {
    color: #4CAF50;
}

.audio-item .audio-actions .download-btn:hover {
    background: rgba(76, 175, 80, 0.1);
}

.player-btn:active {
    transform: scale(0.9);
}

.player-btn.play-btn {
    width: 48px;
    height: 48px;
}

.player-btn.play-btn:hover {
    background:none;
    transform:scale(1.05);
    filter: brightness(1.05)
}

.player-btn img {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.player-btn.play-btn img {
    width: 32px;
    height: 32px;
}

.player-btn.active {
    background: rgba(190, 241, 252, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.player-btn.muted img {
    filter: grayscale(1) opacity(0.5);
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-volume input[type="range"] {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: #d0d0d0;
    border-radius: 2px;
    outline: none;
}

.player-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8FDADB;
    cursor: pointer;
}

.player-volume input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8FDADB;
    cursor: pointer;
    border: none;
}

.player-progress {
    width: calc(100% - 22px);
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #cccfe0;
}

.player-progress input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #d0d0d0;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    /* For the filled part */
    background-image: linear-gradient(to right, #8FDADB, #8FDADB);
    background-size: 0% 100%;
    background-repeat: no-repeat;
}

.player-progress input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: #d0d0d0;
    border-radius: 3px;
}

.player-progress input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #8FDADB;
    cursor: pointer;
    margin-top: -5px;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.player-progress input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Firefox */
.player-progress input[type="range"]::-moz-range-track {
    height: 6px;
    background: #d0d0d0;
    border-radius: 3px;
    border: none;
}

.player-progress input[type="range"]::-moz-range-progress {
    height: 6px;
    background: #8FDADB;
    border-radius: 3px;
}

.player-progress input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #8FDADB;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.player-time {
    font-size: 12px;
    color: #666;
    min-width: 40px;
    font-variant-numeric: tabular-nums;
}

.audios-bg-disc {
    position: fixed;
    left: -50px;
    top: -250px;
    width: 1200px;
    height: 1200px;
    z-index: -100;
    pointer-events: none;
    user-select: none;
    animation: spinDisc 4s linear infinite;
    animation-play-state: paused;
}

.audios-bg-disc.spinning {
    animation-play-state: running;
}

@keyframes spinDisc {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#upload-area.hidden {
    display: none;
}












.notifications-panel {
    position: fixed;
    width: 380px;
    max-height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid rgb(120 174 184);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    top:60px;
    right:10px;
}

.notifications-panel.show {
    opacity: 1;
    transform: translateY(0);
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #e0e0e0;
    background: rgba(199, 234, 245, 0.9);
    border-radius: 8px 8px 0 0;
}

.notifications-header h3 {
    margin: 0;
    font-size: 16px;
    color: #02383e;
}

.notifications-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.notifications-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.notifications-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    max-height: 400px;
}

.notifications-loading,
.notifications-empty,
.notifications-error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 14px;
}

.notifications-date-group {
    margin-bottom: 8px;
}

.notifications-date-header {
    padding: 8px 16px;
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 500;
}

.notification-item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 12px 16px 12px 60px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.notification-item:hover {
    background: rgba(199, 234, 245, 0.3);
}

.notification-read-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 11px;
    color: #4caf50;
    border-radius: 4px;
    transition: background 0.2s;
}

.notification-read-btn:hover {
    background: rgba(76, 175, 80, 0.1);
}

.notification-avatar {
    position: absolute;
    left: 16px;
    top: 12px;
    width: 32px;
    height: 32px;
}

.notif-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #a6d4dc;
}

.notif-avatar-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.notif-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
}

.notification-content {
    flex: 1;
    margin-right: 12px;
    min-width: 0;
}

.notification-actor {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
}

.notification-actor-name {
    max-width: min(220px, 50vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #173b66;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.notification-actor-name:hover {
    text-decoration: underline;
}

.notification-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-preview {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
    font-style: italic;
    background: #f9f9f9;
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 3px solid #a6d4dc;
}

.notification-time {
    font-size: 10px;
    color: #999;
    margin-top: 6px;
}

.notification-action-bottom {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.notification-action-btn {
    background: none;
    border: 1px solid #ddd;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    transition: all 0.2s;
    background: white;
}

.notification-action-btn:hover {
    background: #f0f0f0;
}

.notification-action-btn.accept-request {
    color: #4caf50;
    border-color: #4caf50;
}

.notification-action-btn.accept-request:hover {
    background: #4caf50;
    color: white;
}

.notification-action-btn.reject-request {
    color: #f44336;
    border-color: #f44336;
}

.notification-action-btn.reject-request:hover {
    background: #f44336;
    color: white;
}

.notifications-footer {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
    border-radius: 0 0 12px 12px;
}

.notifications-mark-all-btn,
.notifications-refresh-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.notifications-mark-all-btn:hover {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.notifications-refresh-btn:hover {
    background: #2196f3;
    color: white;
    border-color: #2196f3;
}

.notifications-content::-webkit-scrollbar {
    width: 6px;
}

.notifications-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notifications-content::-webkit-scrollbar-thumb {
    background: #a6d4dc;
    border-radius: 3px;
}

.notifications-content::-webkit-scrollbar-thumb:hover {
    background: #02383e;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f44336;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.logout-btn {
  background-color: #bef1fc;
  font-size: 16px;
  border: none;
  padding: 8px 20px;
  cursor: pointer;
  border-radius: 8px;
  width: auto;
  display: inline-block;
  transition: background-color 0.2s;
}

.logout-btn:hover {
  background-color: #9fd9e8;
}

/* ===== MAIN FEED CONTAINER ===== */
.feedmain {
  border-width: 4px;
  border-color: #bccee2;
  border-style: solid;
  border-radius: 12px;
  width: 50%;
  max-width: 1240px;
  min-width:680px;
  flex: 1;
  margin-left: 0;
  background-color: #edeff4;
  box-sizing: border-box;
  word-wrap: normal;
  position: relative;
  margin-top: 32px;
}

.main-feed {
  margin-top:-15px;
}
.chat-preview-image {
max-height:150px;
max-width:150px;
}
.chat-preview-video {
max-height:150px;
max-width:150px;
}
.feed-tabs {
    display: flex;
    margin:0;
    position:relative;
    height:65px;
    border-bottom: 4px solid rgb(127,129,140);
    padding-bottom: 0;
    background: linear-gradient(90deg, rgba(223, 238, 246, 1) 0%, rgba(150, 214, 246, 1) 100%);
    justify-content: space-between;
    filter: drop-shadow(-5px 8px 8px rgba(0, 10, 90, 0.2));
    border-top-right-radius: 8px;
    border-top-left-radius: 8px;
    align-items: center;
    padding: 0 20px;
}

.feed-button {
    width:45px;
    height:45px;
    border-radius:8px;
  display: flex;
  justify-content: center;
  align-items: center;
    background: #14458f2b;
    border: 2px outset #b8cae0;
    transform-origin:bottom;
    transition: all 0.2s ease;
}

.feed-button > img {
    width:35px;
    height:35px;
}

.feed-button:hover {
  filter: brightness(1.2);
  transform: scale(0.95,1.05);
}

.feed-button:active {
  filter: brightness(0.90);
  transform: scale(1.05 , 0.95);
}

.feed-select {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 22px;
    background: #deeef6;
    border: 2px outset #b9cbdf;
    text-align: center;
    transition: all 0.2s ease;
}

.feed-select:hover {
   filter: brightness(1.1);
}

.tab-btn {
    background: white;
    border: none;
    height:55px;
    padding: 0;
    width: 120px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border-color: rgb(127, 129, 140);
    border-width: 4px 2px;
    border-style: solid;
    /*border-bottom-style: none;*/
    /*border-radius: 0 0 12px 12px;*/
    /*height: 45px;*/
}

.tab-btn:hover {
    background-color: rgba(190, 241, 252, 0.3);
    color: #15141c;
}

.tab-btn.active {
    font-weight: bold;


    position: relative;
    background-color: rgba(237, 239, 244, 1);
    /*top: 10px;
    height: 45px;
    transition: left 1s linear;
    border-radius: 8px 8px 0 0;
    border-top-style: none;*/
}

/* ===== POST STYLES ===== */
.post {
    box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
    border-color: #bccee2;
    border-width: 3px;
    border-style: outset;
    border-radius: 12px;
    width: 100%;
    min-width: 670px;
    min-height: 100px;
    height: auto;
    background-color: #ffffff;
    margin-left: 50px;
    margin-top: 60px;
    padding: 25px;
    padding-top: 35px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 0;
    padding-right: 0;
}

/* ===== POST AUTHOR HEADER ===== */
.post-author {
  position: absolute;
  top: -5px;
  left: 25px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  z-index: 10;
  filter: drop-shadow(-5px 8px 8px rgba(0, 0, 0, 0.15));
}

/* Post author section */
.post-author {
  position: absolute;
    top: 0px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-left: 0px;
    height: 67px;
    padding-top: 0px;
    left: 0;
    border-bottom-style: solid;
    background: linear-gradient(90deg, rgba(223, 238, 246, 1) 0%, rgba(150, 214, 246, 1) 100%);
    margin-bottom: 20px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-color: #BCCEE2;
    border-width: 4px;
    z-index: 10;
    width: 100%;
    filter: drop-shadow(-5px 8px 8px rgba(0, 0, 0, 0.15));
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}
.community-author-avatar {
    margin-left: 25px;
    top: -18px;
    width: 84px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}
.author-avatar {
    margin-left: 25px;
    top: -15px;
    width: 78px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}
.post-author .community-author-avatar + .author-avatar {
    margin-left: 0px;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-top:30px;
}

.author-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    position: relative;
}

.author-info.community {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    margin-top: -20px;
    position: relative;
}

.author-name {
  color: #15141c;
  text-decoration: none;
  font-weight: bold;
  font-size: 24px;
  line-height: 1.2;
  display: inline-block;
  text-shadow:
    2px 2px 3px rgba(255, 255, 255, 0.8),
    1px 1px 2px rgba(0, 0, 0, 0.1);
}

.community-author-name {
  color: #15141c;
  text-decoration: none;
  font-weight: bold;
  font-size: 32px;
  line-height: 1.2;
  display: inline-block;
  margin-left:-60px;
  text-shadow:
    2px 2px 3px rgba(255, 255, 255, 1), 3px 3px 3px rgba(0, 0, 0, 0.2)
}

.community-author-name-alone {
  color: #15141c;
  text-decoration: none;
  font-weight: bold;
  font-size: 32px;
  line-height: 1.2;
  display: inline-block;
  text-shadow:
    2px 2px 3px rgba(255, 255, 255, 1), 3px 3px 3px rgba(0, 0, 0, 0.2)
}

.author-name:hover {
  text-decoration: underline;
  color: #2c5282;
}

.community-author-name:hover {
  text-decoration: underline;
  color: #2c5282;
}

.community-author-name-alone:hover {
  text-decoration: underline;
  color: #2c5282;
}
.author-timestamp {
  color: #666;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.9;
  text-decoration: none;
}
.author-timestamp:hover {
  text-decoration: underline;
}


/* ===== POST CONTENT ROW ===== */

.post-image {
  max-width: 300px;
  max-height: 300px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.2s;
}

.post-image:hover {
  opacity: 0.9;
}

.post-text {
  white-space: pre-wrap;
  flex: 1;
  font-size: 18px;
  line-height: 1.5;
  word-wrap: break-word;
}

/* ===== POST BOTTOM ROW ===== */
.post-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: auto;
    margin-top: 15px;
    background: linear-gradient(90deg, rgba(223, 238, 246, 1) 0%, rgba(150, 214, 246, 1) 100%);
    /*padding: 10px 20px;*/
    border: 2px solid #bccee2;
    border-width: 2px 0 2px 0;
}

.spoiler-contents {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
}

.spoiler-text {
    padding: 10px;
    background: rgba(243 249 255 / 80%);
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 24px;
    max-width: 70%;
    text-align: center;
}

.nsfw-text {
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px;
    background: none;
    border-style: solid;
    border-color: #e85f5f;
    font-size: 24px;
    border-width: 2px;
    color: #e85f5f;
}

.nsfw-text-secondary {
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 6px;
    background: none;
    border-style: solid;
    border-color: #e85f5f;
    font-size: 16px;
    border-width: 2px;
    color: #e85f5f;
}

.spoiler-open {
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: #efefef;
}

.spoiler-open:hover {
    transform: scale(1.1);
    background: #e7e7e7;
}

.spoiler-plaque:hover {
    filter: brightness(105%);
}

.post-interactions {
   padding: 5px;
   margin-right:10px;
   border-radius:6px;
   background: rgba(255,255,255, 0);
   transition: background 0.2s ease;
   position: absolute;
   right:0;
}

.post-interactions:hover {
   background: #e1ebf3;
   cursor:pointer;
}

.author-author-section {
  display:flex;
  flex-direction: row;
  gap:10px;
}

.post-left-section {
  display: flex;
  align-items: center;
  /*gap: 8px;*/
  flex-wrap: wrap;
  height:42px;
}

.post-right-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== LIKE BUTTON ===== */
.like-button {
  background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
  font-size: 16px;
  border-style: none;
  cursor: pointer;
  min-width: 80px;
  transition: all 0.2s ease;
  color: #15141c;
  width: auto !important;
  margin: 0;
  height:100%;
  transition: all 0.2s ease;
}

.like-button:hover {
  background: linear-gradient(208deg, rgba(170, 221, 242, 1) 0%, rgba(170, 242, 218, 1) 100%);
}

.like-button:active {
  background: linear-gradient(208deg, rgba(150, 201, 222, 1) 0%, rgba(150, 222, 198, 1) 100%);
  box-shadow: none;
}

.like-button.liked {
  background: linear-gradient(208deg, rgb(128 196 225) 0%, rgb(108 199 169) 100%);
  border-color: #6fc0c1;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.like-button.liked:hover {
  background: linear-gradient(208deg, rgba(140, 191, 212, 1) 0%, rgba(140, 212, 188, 1) 100%);
}

.dislike-button {
  background: linear-gradient(208deg, rgba(132, 123, 232, 0.5) 0%, rgba(190, 199, 255, 0.5) 100%);
  font-size: 16px;
  border-style: none;
  cursor: pointer;
  min-width: 80px;
  transition: all 0.2s ease;
  color: #15141c;
  width: auto;
  margin: 0;
  height:100%;
  border-width:2px;
  border-right-style:solid;
  border-color: #bccee2;
  transition: all 0.2s ease;
}

.dislike-button:hover {
  background: linear-gradient(208deg, rgb(92 83 195 / 50%) 0%, rgb(90 109 227 / 50%) 100%);
}

.dislike-button:active {
  background: linear-gradient(208deg, rgb(60 51 157 / 50%) 0%, rgb(55 71 169 / 50%) 100%);
  box-shadow: none;
}

.dislike-button.disliked {
  background: linear-gradient(208deg, rgb(69 56 215 / 50%) 0%, rgb(25 40 135 / 50%) 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dislike-button.liked:hover {
  background: linear-gradient(208deg, rgba(140, 191, 212, 1) 0%, rgba(140, 212, 188, 1) 100%);
}


.like-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    /* padding: 4px 8px; */
    height: 100%;
    /* border: 2px solid #8FDADB; */
    border-width: 0px 2px 0px 2px;
    border-color: #bccee2;
    border-style: solid;
    font-size: 16px;
    font-weight: normal;
    background-color: white;
    color: #15141c;
    transition: all 0.2s ease;
}

.like-button.liked + .like-counter {
  border-color: #6fc0c1;
  background-color: #f5f5f5;
}

/* ===== COMMENT COUNT ===== */
.comment-count-text {
  margin-left: 15px;
  font-size: 14px;
  color: #666;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===== DELETE/EDIT BUTTONS ===== */
.delete-btn {
  background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
  font-size: 16px;
  border-style: solid;
  border-width: 2px;
  border-color: #8FDADB;
  padding: 6px 15px;
  cursor: pointer;
  border-radius: 8px;
  min-width: 80px;
  transition: all 0.2s ease;
}

.delete-btn:hover {
  background: linear-gradient(208deg, rgba(170, 221, 242, 1) 0%, rgba(170, 242, 218, 1) 100%);
}

.delete-btn:active {
  background: linear-gradient(208deg, rgba(150, 201, 222, 1) 0%, rgba(150, 222, 198, 1) 100%);
}

/* ===== POST CREATOR SECTION ===== */
#new-post-box {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: min(45%, 760px);
  min-width: 640px;
  margin-left: 0;
}

.post-creator-row {
  display: flex;
  flex-direction: row;
  gap: 18px;
  width: 100%;
  align-items: stretch;
}

.content-row-container {
    margin-top: 65px;
    margin-bottom: 15px;
}

.spoiler-plaque {
    width:100%;
    height:100%;
    pointer-events: none;
    user-select: none;
    position: relative;
    transition: all 0.2s ease;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.spoiler-plaque * {
    pointer-events: none;
}

.spoiler-plaque button {
    pointer-events: auto;
}

.spoiler-content {
filter: blur(1.5rem);
height: 200px;
  overflow: hidden;
}

#post-input {
  flex: 3;
  min-width: 0;
  padding: 12px;
  font-size: 18px;
  border: 2px solid #bccee2;
  border-radius: 8px;
  background-color: #edeff4;
  resize: none;
}

.post-buttons {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 120px;
}

.post-dropdown {
  position: absolute;
  top: 40px;
  right: -150px;
  margin-top: 8px;
  min-width: 180px;
  background-color: white;
  border: 2px solid #8FDADB;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 10, 90, 0.2);
  display: none;
  z-index: 1000;
  overflow: hidden;
}

.author-name-user {
  text-decoration:none;
    font-weight: bold;
  color:#15141c;
}

.author-name-user:hover {
  text-decoration:underline;
    font-weight: bold;
  color: #2c5282;
}

.postbutton {
  background-color: #bef1fc;
  font-size: 18px;
  border: none;
  padding: 12px 15px;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.postbutton:hover {
  background-color: #9fd9e8;
}

.postbutton:active {
  background-color: #7479a1;
}

/* File input styling */
#image-input {
  color: transparent;
  padding: 12px 15px;
  background-color: #bef1fc;
  border-radius: 8px;
  cursor: pointer;
}

#image-input::file-selector-button {
  background-color: #bef1fc;
  font-size: 18px;
  border: none;
  padding: 0;
  margin-right: 10px;
  cursor: pointer;
  color: black;
  background: none;
  font-family: inherit;
}

/* ===== COMMENTS SECTION ===== */
.comments-section {
  //margin-top: 20px;
  padding-top: 15px;
  //border-top: 1px solid rgba(190, 241, 252, 0.3);
    margin-right:20px;
    margin-left:20px;
}

/* Comment input area */
.comment-input-area {
    background: linear-gradient(90deg, rgb(223 238 246 / 50%) 0%, rgb(150 214 246 / 50%) 100%);
    border-radius: 10px;
    padding: 10px;
    border-color: #cccfe0;
    width: 100%;
    box-sizing: border-box;
    border-width: 2px;
    border-style: outset;
    border-radius: 10px;
    display: flex;
    gap: 15px;
    margin-top: -15px;
    border-top-width: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    padding: 10px 15px;
}

.comment-input-avatar {
  width: 32px;
  height: 32px;
  border-radius: 12px;  /* Rounded squares! */
  object-fit: cover;
  flex-shrink: 0;
}

.comment-input {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid #bccee2;
  border-radius: 8px;
  background: #edeff4;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
  width: 70%
}

.comment-input:focus {
  outline: none;
  border-color: #bef1fc;
}

.comment-button {
  width: auto;
  padding: 8px 16px;
  font-size: 14px;
  align-self: flex-end;
  border: 2px outset #91b9df;
}

/* Comments list */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
    margin-top: 15px;
}

/* Individual comment */
.comment-item {
  background: rgba(237, 239, 244, 0.5);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}



.comment-author {
  color: #2c5282;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.comment-author:hover {
  text-decoration: underline;
}

.comment-time {
  color: #666;
  font-size: 10px;
  white-space: nowrap;
}

.comment-content {
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  margin-bottom: 8px;
  padding-left: 32px;
}

/* Comment footer - like button at bottom right */
.comment-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.comment-like-btn {
  background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
  font-size: 14px;
  border: 2px solid #8FDADB;
  padding: 4px 12px;
  cursor: pointer;
  border-radius: 8px;
  min-width: 50px;
  max-width: 50px;
  transition: all 0.2s ease;
  color: #15141c;
}

.comment-like-btn:hover {
  background: linear-gradient(208deg, rgba(170, 221, 242, 1) 0%, rgba(170, 242, 218, 1) 100%);
  transform: translateY(-1px);
}

.comment-like-btn.liked {
  background: linear-gradient(208deg, rgba(150, 201, 222, 1) 0%, rgba(150, 222, 198, 1) 100%);
  border-color: #6fc0c1;
}

.comment-like-counter {
  font-size: 14px;
  color: #666;
  min-width: 16px;
  border: 1px solid #8FDADB;
  border-radius: 4px;
  text-align: center;
  padding: 2px 6px;
    background: white;
}

.show-all-comments-container {
  margin-top: 10px;
  text-align: right;
}

.comments-divider {
  border: none;
  border-top: 1px solid #bccee2;
  margin: 10px 0;
  width: 100%;
}

.show-all-comments-btn {
  background: none;
  border: none;
  color: #2c5282;
  font-size: 13px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.2s;
    max-width: 250px;
    margin-right: auto;
    margin-left: auto;
}

.show-all-comments-btn:hover {
  background-color: rgba(190, 241, 252, 0.3);
  text-decoration: underline;
}

/* Hidden comments container */
.hidden-comments {
  margin-top: 10px;
}

/* Make textarea non-resizable */
.comment-input {
  resize: none !important;
    width: 100%;
    box-sizing: border-box;
}
.show-all-comments-container {
  margin: 0px;
  width: 100%;
}

.line-with-button {
  position: relative;
  width: 100%;
  height: 20px;
  border-bottom: 1px solid #bccee2;
  text-align: center;
  margin: 10px 0;
}

.show-all-comments-btn {
  position: relative;
  background-color: #edeff4; /* Match your feed background */
  border: 1px solid #bccee2;
  border-radius: 8px;
  color: #2c5282;
  font-size: 13px;
  padding: 5px 15px;
  cursor: pointer;
  display: inline-block;
  white-space: nowrap;
  transition: all 0.2s;
}

.show-all-comments-btn:hover {
  background-color: #bef1fc;
  border-color: #8FDADB;
  transform: scale(1.02);
}

/* Hidden comments container */
.hidden-comments {
  margin-top: 10px;
}

/* ===== EDIT MODE STYLES ===== */
.edit-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  width: 100%;
  align-items: flex-start;
}

.edit-text-editor {
  flex: 2;
  min-width: 0;
  resize: none;
  min-height: 80%;
  font-size: 18px;
  background-color: #edeff4;
  padding: 12px;
  border: 2px solid #bccee2;
  border-radius: 8px;
}

.edit-post-image {
  flex: 1;
  max-width: 300px;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
}

/* ===== LIGHTBOX ===== */
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s;
}

#lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.2s;
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

#lightbox-close:hover {
  color: #ff4444;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===== LIGHTBOX FOOTER ===== */
.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-media-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: calc(100% - 70px);
}

.lightbox-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.lightbox-footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lightbox-footer-avatar {
    width: 45px;
    height: 45px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.lightbox-footer-userinfo {
    display: flex;
    flex-direction: column;
}

.lightbox-footer-username-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lightbox-footer-username {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.lightbox-footer-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.lightbox-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lightbox-footer-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s;
    white-space: nowrap;
}

.lightbox-footer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.lightbox-footer-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.lightbox-footer-delete {
    border-color: rgba(255, 50, 50, 0.4);
    color: #ff6b6b;
}

.lightbox-footer-delete:hover {
    background: rgba(255, 50, 50, 0.15);
    border-color: rgba(255, 50, 50, 0.7);
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 20;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

/* ===== FRUTIGER AERO BORDER ===== */
.frutiger-aero-border {
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 2px rgba(190, 241, 252, 0.6),
    0 8px 16px -6px rgba(0, 0, 0, 0.3),
    inset 0 -3px 8px rgba(255, 255, 255, 0.8),
    inset 0 3px 8px rgba(255, 255, 255, 0.8);
  border-radius: 12px;
}

.frutiger-aero-border::after {
  content: '';
  position: absolute;
  top: 8%;
  left: 8%;
  width: 30%;
  height: 30%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  border-radius: 50%;
  pointer-events: none;
  transform: rotate(-15deg);
}

/* ===== RESPONSIVE ===== */


/* ===== NAVIGATION UPDATES ===== */
.nav-left-links {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-right: auto;  /* Pushes everything else to the right */
}

.nav-link:hover {
  background-color: rgba(190, 241, 252, 0.5);
  text-decoration: none;
}

.chats-toggle-btn {
  background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
  border: 2px solid #8FDADB;
  font-size: 16px;
  padding: 6px 15px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  color: #15141c;
}

.chats-toggle-btn:hover {
  background: linear-gradient(208deg, rgba(170, 221, 242, 1) 0%, rgba(170, 242, 218, 1) 100%);
  transform: translateY(-1px);
}

.nav-user-section {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

.nav-user-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #15141c;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.nav-user-link:hover {
  background-color: rgba(190, 241, 252, 0.5);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;  /* Rounded square */
  object-fit: cover;
}

.nav-username {
  font-weight: 600;
  font-size: 16px;
}

/* ===== CHATS PANEL ===== */
.chats-panel {
  position: fixed;
  right: 5%;
  top: 90px;
  width: 40%;
  max-width: 550px;
  height: auto;
  max-height: calc(100vh - 100px);
  background-color: #edeff4;
  border: 4px solid #bccee2;
  border-style: outset;
  border-radius: 12px;
  box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
  display: none;
  flex-direction: column;
  z-index: 90;
  overflow: hidden;
  transition: all 0.2s ease;
}

.chats-panel.open {
  display: flex;
}

/* Friends list view */
.chats-friends-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  margin-bottom:0;
  padding-bottom:0;
}

.chats-header {
  padding: 15px;
  border-bottom: 2px solid #bccee2;
  background: linear-gradient(208deg, rgba(190, 241, 252, 0.3) 0%, rgba(190, 252, 228, 0.3) 100%);
  flex-shrink: 0;
}

.chats-header h3 {
  margin: 0;
  color: #15141c;
  font-size: 18px;
}

.friends-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  min-height: 0;  /* Важно для правильного скролла */
}

.friend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  margin-bottom: 5px;
  background-color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.friend-item:hover {
  border-color: #8FDADB;
  transform: translateX(-2px);
  box-shadow: 2px 4px 8px rgba(0, 10, 90, 0.1);
}

.friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.friend-info {
  flex: 1;
  overflow: hidden;  /* Для обрезания длинных имён */
}

.friend-name {
  font-weight: 600;
  font-size: 16px;
  color: #15141c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-preview {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chat view - expanded */
.chat-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-bottom: 2px solid #bccee2;
  background: linear-gradient(208deg, rgba(190, 241, 252, 0.3) 0%, rgba(190, 252, 228, 0.3) 100%);
  flex-shrink: 0;
}

.back-to-friends {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #15141c;
  padding: 0 10px;
  line-height: 1;
}

.back-to-friends:hover {
  color: #2c5282;
  transform: scale(1.1);
}

.chat-friend-info {
  display: flex;
  align-items: center;
  gap: 15px;  /* Больше gap */
  flex: 1;
}

.chat-friend-avatar {
  width: 60px;  /* Больше аватарка */
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.chat-friend-name {
  font-weight: bold;
  font-size: 20px;
  color: #15141c;
}

.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.5);
  min-height: 0;  /* Важно для скролла */
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 15px;
  border-top: 2px solid #bccee2;
  background-color: white;
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  padding: 10px;
  border: 2px solid #bccee2;
  border-radius: 8px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
}

.chat-input:focus {
  outline: none;
  border-color: #8FDADB;
}

.chat-send-btn {
  background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
  border: 2px solid #8FDADB;
  font-size: 14px;
  padding: 8px 20px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  align-self: flex-end;
}

.chat-send-btn:hover {
  background: linear-gradient(208deg, rgba(170, 221, 242, 1) 0%, rgba(170, 242, 218, 1) 100%);
  transform: translateY(-1px);
}

/* Empty state */
.no-friends-message {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

@media (max-width: 1200px) {
  .feedmain {
    margin-right: 0;  /* On smaller screens, chats panel might cover feed */
  }
}

/* ===== USER MENU DROPDOWN ===== */
.user-menu-container {
  position: relative;
  display: none;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.user-menu-trigger:hover {
  background-color: rgba(190, 241, 252, 0.5);
}

.dropdown-arrow {
  font-size: 12px;
  color: #666;
  margin-left: 2px;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 10px;
  margin-top: 8px;
  min-width: 180px;
  background-color: white;
  border: 2px solid #8FDADB;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 10, 90, 0.2);
  display: none;
  z-index: 1000;
  overflow: hidden;
}

.user-dropdown.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 10px 16px;
  color: #15141c;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: rgba(190, 241, 252, 0.5);
}

.logout-item {
  color: #ff4444;
}

.logout-item:hover {
  background-color: #fff0f0;
}

.dropdown-divider {
  height: 1px;
  background-color: #e0e4e9;
  margin: 4px 0;
}

/* ===== POLLS ===== */

.post-poll-row {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
}

.post-poll-container {
    background: linear-gradient(90deg, rgb(223 238 246 / 50%) 0%, rgb(150 214 246 / 50%) 100%);
    width: 90%;
    border-radius: 10px;
    padding: 15px;
    border-color: #cccfe0;
    border-width: 2px;
    border-style: outset;
    box-shadow: inset 10px 10px 10px -5px rgba(0, 10, 90, 0.4);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    position: relative;
}

.poll-expires {
    font-size: 13px;
    color: #555;
    margin-top: -5px;
}

.post-poll-choices-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 5px 0;
    width: 95%;
}

.post-poll-choice {
    background: rgba(255, 255, 255, 0.6);
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #cccfe0;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.post-poll-choice:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #8FDADB;
}

.post-poll-choice.selected {
    background: rgba(143, 218, 219, 0.3);
    border-color: #4a9e9f;
    box-shadow: inset 0 0 10px rgba(143, 218, 219, 0.3);
}

.post-poll-choice.voted {
    background: rgba(143, 218, 219, 0.15);
    border-color: #4a9e9f;
    cursor: default;
    opacity: 0.8;
}

.poll-choice-text {
    font-size: 15px;
    color: #1a1a2e;
    z-index: 1;
    flex: 1;
}

.poll-choice-percent {
    font-size: 14px;
    font-weight: bold;
    color: #1a1a2e;
    z-index: 1;
    margin-left: 10px;
    min-width: 45px;
    text-align: right;
}

.poll-choice-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(143, 218, 219, 0.3), rgba(74, 158, 159, 0.25));
    border-radius: 6px;
    transition: width 0.5s ease;
    pointer-events: none;
}

.post-poll-choice.selected .poll-choice-bar {
    background: linear-gradient(90deg, rgba(143, 218, 219, 0.5), rgba(74, 158, 159, 0.4));
}

.poll-vote-btn {
    width: auto;
    border: 2px solid #8FDADB;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 17px;
    border: 2px solid #cccfe0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.poll-total-votes {
    font-size: 13px;
    color: #555;
    margin-top: 5px;
    position: absolute;
    bottom: 10px;
    right: 20px;
}

/* ===== FRIENDS PAGE STYLES ===== */
.friends-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background-color: white;
  border: 4px solid #cccfe0;
  border-style: outset;
  border-radius: 12px;
  box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
  transition: all 0.2s ease;
}

.friend-card:hover {
  transform: translateX(-2px);
  box-shadow: 8px 12px 12px -5px rgba(0, 10, 90, 0.4);
}

.friend-card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.friend-card-info {
  flex: 1;
  margin-top:0;
  display: block;
  gap: 4px;
}

.friend-card-name {
  color: #15141c;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
}

.chat-card-name {
  color: #15141c;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
}

.friend-card-name:hover {
  text-decoration: underline;
  color: #2c5282;
}

.friend-card-status {
  font-size: 12px;
  color: #4CAF50;
}

.friend-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.friend-card-type {
    font-size: 12px;
    color: #8891A8;
}

.friend-card-subcount {
    font-size: 12px;
    color: #1CA67E;
}

.friend-card-btn {
  background:  linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
  border: 2px solid #8FDADB;
  font-size: 14px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-width: 100px;
}

.promote-btn {
  background: #edeff4;
  border: 1px solid #bccee2;
  font-size: 12px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-width: 80px;
}

.friend-card-btn:hover {
  background: linear-gradient(208deg, rgba(170, 221, 242, 1) 0%, rgba(170, 242, 218, 1) 100%);
  transform: translateY(-1px);
}

.accept-btn {
  background: linear-gradient(208deg,rgba(150, 242, 192, 1) 0%, rgba(141, 235, 144, 1) 100%);
  border-color: #65B57E;
  color: white;
}

.reject-btn {
  background: linear-gradient(208deg,rgba(242, 150, 202, 1) 0%, rgba(149, 141, 235, 1) 100%);
  border-color: #6C65B5;
  color: white;
}

/* Панель чатов */
.chats-panel {
  position: fixed;
  right: 20px;
  top: 80px;
  width: 350px;
  max-height: 80vh;
  background: white;
  border: 4px solid #cccfe0;
  border-style: outset;
  border-radius: 12px;
  box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
  display: none;
  flex-direction: column;
  z-index: 90;
  overflow: hidden;
}

.chats-panel.open {
  display: flex;
}

/* Список чатов */
.chats-list {
  overflow-y: auto;

}

.chat-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #e0e4e9;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-item:hover {
  background: rgba(190, 241, 252, 0.3);
}

.chat-item-avatar {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 12px;
}

.chat-item-info {
  flex: 1;
  display:flex;
  flex-direction: column;
}

.chat-item-name {
  font-weight: bold;
  margin-bottom: 4px;
}

.chat-item-preview {
  font-size: 13px;
  color: #666;
}

.chat-item-time {
  font-size: 11px;
  color: #999;
}

/* Окно чата */
.chat-view {
  display: flex;
  flex-direction: column;
  height: 70vh;
}

.chat-header {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 2px solid #bccee2;
  background: #f5f5f5;
}

.back-to-chats {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  margin-right: 15px;
}

.chat-with-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-with-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}


/* Контейнер сообщений */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f9f9f9;
}

.message {

  max-width: 70%;
  padding: 10px;
  border-radius: 8px;
  position: relative;
}
/* ===== CHAT PANEL ===== */
.chats-panel {
  position: fixed;
  right: 20px;
  top: 80px;
  width: 40%;  /* 40% of screen width */
  min-width: 400px;  /* Minimum width */
  max-width: 600px;  /* Maximum width */
  height: calc(100vh - 100px);
  background: white;
  border: 4px solid #a3a5b7;
  border-style: outset;
  border-radius: 12px;
  box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
  display: none;
  flex-direction: column;
  z-index: 90;
  overflow: hidden;
}

.chats-panel.open {
  display: flex;
}

/* Chat view takes full height */
.chat-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

/* Messages container - takes all available space */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f9f9f9;
  min-height: 0;  /* Important for flex scrolling */
}

/* Message bubbles */
.message {
  max-width: 70%;
  padding: 8px 12px;
  border-radius: 12px;
  position: relative;
  word-wrap: break-word;
}

/* Your messages - on the right, teal color */
.message-mine {
  box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
  align-self: flex-end;
  background: #bef1fc;  /* Your teal color */
  border: 2px solid #4d8e9c;
  border-bottom-right-radius: 4px;
  margin-left: auto;
  transition: transform 0.3s ease 0s;
}

.message-reply {
  box-shadow: 5px 3px 3px -5px rgba(0, 10, 90, 0.2);
  align-self: flex-end;
  background: #9AD1F5;
  border: none;
  margin-left: auto;
  transition: transform 0.3s ease 0s;
  padding: 4px;
  font-size:14px;
  border-radius: 8px;
}

.message-reply:empty {
  display:none;
}

/* Their messages - on the left, light gray */
.message-theirs {
  box-shadow: 5px 10px 10px -5px rgba(10, 80, 30, 0.4);
  align-self: flex-start;
  background: #befcdb;
  border: 2px solid #67af88;
  border-bottom-left-radius: 4px;
  margin-right: auto;
  transition: transform 0.3s ease 0s;
}

.message-text {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.message-time {
  font-size: 10px;
  color: #666;
  text-align: right;
  opacity: 0.8;
}

/* Message input area - fixed at bottom */
.message-input-area {
  display: flex;
  gap: 10px;
  padding: 15px;
  border-top: 2px solid #bccee2;
  background: white;
  flex-shrink: 0;  /* Prevents shrinking */
  align-items: flex-end;
}

/* Textarea styling - fixed size, no resize */
.message-input-area textarea {
  flex: 1;
  padding: 10px;
  border: 2px solid #bccee2;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: none;  /* No resizing */
  height: 60px;  /* Fixed height */
  min-height: 60px;
  max-height: 60px;
  background: #f5f5f5;
}

.message-input-area textarea:focus {
  outline: none;
  border-color: #8FDADB;
  background: white;
}

/* Send button */
.message-input-area button {
  background: #bef1fc;
  border: 2px solid #8FDADB;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  height: 30px;  /* Match textarea height */
  width: 80px;
  margin-left:0;
  padding-left:5px;
  transition: all 0.2s;
  text-align:left;
}

.message-input-area button:hover {
  background: #9fd9e8;
  transform: translateY(-1px);
}

/* Chat list item */
.chat-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #e0e4e9;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-item:hover {
  background: rgba(190, 241, 252, 0.3);
}

.chat-item-avatar {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 12px;
}

.chat-item-info {
  flex: 1;
  min-width: 0;  /* For text truncation */
}

.chat-item-notification {
border-radius:8px;
background:#bef1fc;
width:16px;height:16px;
font-size:12px;
text-align: center;
margin:auto;
margin-left:10px;
}

.chat-item-notification:empty {
display:none;
}

/* Reply indicator in input area */
.reply-indicator-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f5f5f5;
    border-left: 3px solid #8FDADB;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 13px;
}

.reply-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reply-arrow {
    font-size: 16px;
    color: #8FDADB;
}

.reply-label {
    color: #666;
    font-weight: normal;
}

.reply-preview {
    color: #333;
    font-style: italic;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cancel-reply {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #999;
    padding: 0 8px;
}

.cancel-reply:hover {
    color: #ff4444;
}

/* Reply preview inside message */
.message-reply-preview {
    padding: 6px 10px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.04);
    border-left: 3px solid #8FDADB;
    border-radius: 6px;
    font-size: 12px;
}

.reply-indicator {
    font-size: 11px;
    color: #8FDADB;
    margin-bottom: 4px;
}

.reply-text {
    color: #666;
    font-style: italic;
    word-break: break-word;
    white-space: pre-wrap;
}

/* Message wrapper for click detection */
.message-wrapper {
    width: 100%;
}

.message-wrapper:hover {
    background:rgb(254 254 255 / 42%);
    filter: brightness(1.1);
    transition: filter 0.3s ease;
}

.message-wrapper.unread:hover {
    background: rgb(214 230 247 / 42%);
    transition: filter 0.3s ease;
}



.message-wrapper:hover .message-bubble {
    transform: translateY(-3px);
    transition: transform 0.3s ease;
}

.message-mine:hover {
    background: #E3FAFF;
    border-color: #65B8C9;
}

.message-theirs:hover {
    background: #D6FFEB;
    border-color: #77C99D;
}

.reply-indicator-container {
    padding: 0 15px;
    margin-top: 5px;
}

.reply-indicator-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f5f5f5;
    border-left: 3px solid #8FDADB;
    border-radius: 8px;
    font-size: 13px;
}

.reply-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reply-arrow {
    font-size: 16px;
    color: #8FDADB;
}

.reply-label {
    color: #666;
    font-weight: normal;
}

.reply-preview {
    color: #333;
    font-style: italic;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cancel-reply {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #999;
    padding: 0 8px;
}

.cancel-reply:hover {
    color: #ff4444;
}

.message-theirs:hover {
background:#D6FFEB;
border-color:#77C99D;
transform: translateY(-2px);
}
.message-mine:hover {
background:#E3FAFF;
border-color: #65B8C9;
transform: translateY(-2px);
}

.chat-item-name {
  font-weight: bold;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display:flex;

}

.chat-item-preview {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-time {
  font-size: 11px;
  color: #999;
  margin-left: 8px;
  white-space: nowrap;
}

/* Chat header */
.chat-header {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 4px solid #bccee2;
  background: #99effe;
  flex-shrink: 0;
}

.back-to-chats {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  margin-right: 15px;
  padding: 0 5px;
  color: #15141c;
}

.back-to-chats:hover {
  color: #2c5282;
}

.message-select-area {
display: flex;
    flex-direction: column;
width:100%;
}

.chat-with-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-with-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.chat-with-name {
  font-weight: bold;
  font-size: 24px;
  color:black;
  text-decoration:none;
}


/* No messages placeholder */
.no-messages {
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
}

/* No chats message */
.no-chats-message {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

/* Notification badges */
.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background-color: #4CAF50;
  color: white;
  font-size: 11px;
  font-weight: bold;
  border-radius: 10px;
  margin-left: 5px;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* For the chats toggle button */
#chats-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#chats-toggle .notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  margin-left: 0;
}

/* For the friends link */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  background-color:#bfe0f0;
  border-color:#8cb9df;
  border-style:solid;
  border-width:2px;
  text-shadow: 1px 2px 5px #a1abbc;
  padding-top:2px;
  padding-bottom:2px;
    background: linear-gradient(360deg, rgb(109 195 255) 0%, rgb(154 255 216) 100%);
    border: solid #cafeff;
    border-width: 2px 0 0 2px;
    outline: 1px solid #6c8abe;
    font-size: 16px;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: #ffffff;
    text-shadow: 1px 1px 3px #071e47;
    text-decoration:none;
    height: 25px;
    box-shadow: -2px -2px 4px #615b85, 2px 2px 4px white;
  transition: all 0.2s ease;
}

.nav-link:hover {
	background: linear-gradient(360deg, rgb(71 148 202) 0%, rgb(118 204 171) 100%);
    border-color: rgb(118 204 171);
}

.profile-subscriptions-container > label {
    flex: 1;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.sub-sub-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
    margin-top: 5px;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 8px;
    justify-items: center;
    align-items: center;
    width: fit-content;
}

.sub-sub-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    justify-content: center;
    column-gap: 4px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-align: center;
    width: 88px;
    justify-self: center;
    text-decoration:none;
    color:black;
    padding-top:5px;
    padding-bottom:5px;
}

.sub-sub-item:hover {
    filter:brightness(1.2);
    transform: translateY(-2px) scale(1.05);
}

.sub-sub-avatar {
    grid-column: 1 / -1;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 3px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.sub-sub-name {
    font-size: 11px;
    font-weight: normal;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 62px;
}

.sub-sub-name-line {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 100%;
}

.sub-sub-name-line > .role-badge {
    flex: 0 0 auto;
}

.sub-sub-item:hover {
    background: rgba(255, 255, 255, 0.8);
}

.sub-sub-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: normal;
    font-size: 13px;
}

.sub-sub-empty-slot {
    visibility: hidden;
}

.user-notifs {
  margin-right:5px;
  position: relative;
  display: inline-flex;
  align-items: center;
  background-color:#f5eecb;
  border-color: #dfbb8c;
  border-style:solid;
  border-width:2px;
  text-shadow: 1px 2px 5px #a1abbc;
  padding-top:2px;
  padding-bottom:2px;
  border-radius: 8px;
  filter: grayscale(0.8);
  transition: filter 0.2s ease, scale 0.2s ease;
}

.user-notifs.has-notifications {
    filter: grayscale(0);
}

.user-notifs:hover {
  scale: 1.07;
  cursor:pointer;
  filter: grayscale(0);
}

.nav-link .notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
}

/* Comment input with attachment preview */
.comment-input-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-preview-container {
  position: relative;
  padding: 8px;
  background: #f0f0f0;
  border: 2px solid #bccee2;
  border-radius: 8px;
  margin-bottom: 8px;
}

.comment-preview-container > video {
    max-width: 50%;
    max-height: 200px;
}
.comment-preview-content {
  max-height: 100px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-preview-image {
  max-height: 100px;
  max-width: 100%;
  object-fit: contain;
}

.comment-preview-video {
  max-height: 100px;
  max-width: 100%;
}

.comment-preview-audio {
  width: 100%;
}

.comment-preview-filename {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
  text-align: center;
}

.comment-preview-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #ff4444;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.comment-preview-remove:hover {
  background: #cc0000;
}

.comment-buttons {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.comment-attach-btn {
  background: none;
  border: 2px solid #8FDADB;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.community-layout {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-top: 80px;
    position: relative;
    align-items: flex-start;
    justify-content: flex-start; /* Don't spread, keep left */
}

.community-main {
    flex: 0 0 auto;
    width: 50%;
    min-width: 0;
}

.community-rules-container {
    flex: 0 0 auto;  /* Don't grow/shrink */
    width: 300px;    /* Fixed width */
    margin-left: 30px; /* 30px gap after main */
    top: 100px;
    height: fit-content;
    align-self: flex-start;
}


        .rules-box {
            background: white;
            border: 4px solid #cccfe0;
            border-style: outset;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
        }

        .rules-box h3 {
            margin-top: 0;
            margin-bottom: 15px;
            color: #15141c;
            border-bottom: 2px solid #bccee2;
            padding-bottom: 10px;
        }

        .rules-list {
            list-style-type: none;
            padding: 0;
            margin: 0;
    white-space: pre-wrap;
        }

        .rules-list li {
            padding: 8px 0;
            border-bottom: 1px solid #e0e4e9;
            font-size: 14px;
            line-height: 1.4;
        }

        .rules-list li:last-child {
            border-bottom: none;
        }

        .rules-list li::before {
            margin-right: 8px;
            opacity: 0.7;
        }

        .description-box {
            background: rgba(237, 239, 244, 0.5);
            border: 2px solid #bccee2;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 20px;
            font-size: 16px;
            line-height: 1.5;
        }

        /* Anonymous toggle styling */
        .anonymous-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            padding: 5px 10px;
            background: rgba(190, 241, 252, 0.2);
            border-radius: 8px;
        }

        .anonymous-checkbox {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        .anonymous-label {
            font-size: 14px;
            color: #666;
            cursor: pointer;
        }

        /* Stats styling */
        .community-stats {
            display: flex;
            gap: 30px;

    justify-content: space-around;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 2px solid #bccee2;
        }

        .stat {
            text-align: center;
        }

        .stat-value {
            display: block;
            font-size: 24px;
            font-weight: bold;
            color: #15141c;
        }

        .stat-label {
            font-size: 14px;
            color: #666;
        }

.comment-attach-btn:hover {
  background: #bef1fc;
}

.profile-info {
position:relative;
top:-25px;
    z-index: -1;
}

.comment-content-row {
  display: flex;
  gap: 12px;
  margin: 8px 0;
  margin-left: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.comment-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  order: 2;
}

.comment-attachment {
  order: 1;
  flex-shrink: 0;
  max-width:50%;
}

.comment-attachment-image {
  max-width: 100%;
  max-height: 150px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
  object-fit: cover;
}

.comment-attachment-image:hover {
  opacity: 0.9;
}

.comment-attachment-video {
  max-width: 260px; /* Half of previous */
  border-radius: 4px;
}

.comment-attachment-audio {
  height:50px;
  width: 100%;
  min-width: 150px;
  height: 30px; /* Smaller audio player */
}

/* Comment footer - FIXED */
.comment-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  margin-left:10px
}

.settings-container {
display:flex;
flex-direction:column;
padding-left:25px;
padding-right:25px;
padding-top:35px;
  gap:10px;
align-items:flex-start;
}

.setting-container {
background: linear-gradient(90deg, rgba(223, 238, 246, 1) 0%, rgba(150, 214, 246, 1) 100%);
width:80%;
margin-bottom:20px;
border-radius:10px;
padding:10px;
border-color: #cccfe0;
border-width: 4px;
border-style: outset;
box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
}

.toggle-replies-btn {
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    background: rgba(0,0,0,0.05);
}

.settings-textarea {
    padding: 8px 12px;
    border: 2px solid #bccee2;
    border-radius: 8px;
    background: #edeff4;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    margin-left:10px;
}

.setting-row {
    margin-left:10px;
margin-top:10px;
margin-bottom:10px;
display:flex;
align-items: center;
}

.comment-delete-btn {
  border: none;
    position: absolute;
    top: 0;
    right: 0;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  background: linear-gradient(208deg, rgba(132, 123, 232, 0.5) 0%, rgba(190, 199, 255, 0.5) 100%);
  border-color: #6C65B5;
  transition: all 0.2s;
}

.comment-delete-btn:hover {
  background: linear-gradient(208deg, rgba(152, 153, 252, 0.5) 0%, rgba(220, 229, 255, 0.5) 100%);
}

/* Like container - RIGHT side */
.comment-like-container {
  display: flex;
  align-items: center;
  gap: 6px;
  order: 2; /* Forces to be right */
  margin-left: auto; /* Pushes it to the right */
}

/* If there's no delete button, like container should still be right */
.comment-footer:has(.comment-delete-btn:only-child) .comment-like-container {
  margin-left: auto;
}

/* ===== COMMUNITIES PAGE STYLES ===== */
.communities-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.communites-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background-color: white;
  border: 4px solid #cccfe0;
  border-style: outset;
  border-radius: 12px;
  box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
  transition: all 0.2s ease;
}

.communites-card:hover {
  transform: translateX(-2px);
  box-shadow: 8px 12px 12px -5px rgba(0, 10, 90, 0.4);
}

.communites-card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.communites-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.communites-card-name {
  color: #15141c;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
}

.communites-card-name:hover {
  text-decoration: underline;
  color: #2c5282;
}

/* Comment overflow handling */
.comment_overflown {
    display: none;
}

.comment_overflown.visible {
    display: block;
}

.communites-card-status {
  font-size: 12px;
  color: #4CAF50;
}

.communites-card-btn {
  background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
  border: 2px solid #8FDADB;
  font-size: 14px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-width: 100px;
}

.communites-card-btn:hover {
  background: linear-gradient(208deg, rgba(170, 221, 242, 1) 0%, rgba(170, 242, 218, 1) 100%);
  transform: translateY(-1px);
}

.communites-leave-btn {
  background: linear-gradient(208deg,rgba(242, 150, 202, 1) 0%, rgba(149, 141, 235, 1) 100%);
  border-color: #6C65B5;
  color: white;
}

.profile-content {
    min-width:800px;
}
.profile-header {
    background: rgb(240 240 240 / 80%);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    padding: 0px;
    margin-bottom: 0px;
    border: 4px solid #cccfe0;
    border-style: solid;
    box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
    margin-top:-200px;
    min-width: calc(250px + 700px);
}

.profile-header-contents {
  display:flex;
  flex-direction:row;
  gap:0;
}

.profile-header-left {
    border: 4px solid #cccfe0;
    border-left-style: none;
    border-top-style: none;
    border-bottom-style: none;
  background:white;
  min-height:340px;
  width:250px;
  min-width:250px;
  display:flex;
  flex-direction:column;
  position:relative;
}


.profile-right-name {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    flex-flow: row nowrap;
    gap: 6px;
    max-width: calc(100% - 20px);
    height: 46px;
    width: fit-content;
    background: rgba(0, 0, 0, 0.1);
    padding: 4px 16px 4px 50px;
    border-radius: 12px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    font-size: 52px;
    font-weight: bold;
}


.profile-right-name > p{
margin:0;
padding:0;
    top: -10px;
    position: relative;
}

.profile-right-name > span {
margin:0;
padding:0;
    top: -10px;
    position: relative;
}

.profile-right-name .profile-name-text {
  position: static;
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
}

.profile-right-status {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 16px;
    padding-left: 50px;
    border-radius: 12px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    font-size: 20px;
    max-width: fit-content;
    color: #575757;
}

.profile-header-somethings {
    position: absolute;
    bottom: -52px;
    right: 40px;
    display: flex;
    gap: 20px;
}

.profile-header-somethings-thing {
  height:30px;
  border-radius:25px;
  border-top-left-radius:0;
  border-top-right-radius:0;
  background: rgb(240 240 240 / 80%);
    backdrop-filter: blur(5px);
  padding:10px 15px;
  padding-top:4px;
  border: 4px solid #cccfe0;
  border-top-style:none;
  transition: all 0.2s ease;
  transform-origin: top;
}

.profile-header-morethings {
    position: absolute;
    bottom: -42px;
    left: 40px;
  height:20px;
  border-radius:25px;
  border-top-left-radius:0;
  border-top-right-radius:0;
  background: rgb(240 240 240 / 80%);
    backdrop-filter: blur(5px);
  padding:5px 60px;
  padding-top:9px;
  border: 4px solid #cccfe0;
  border-top-style:none;
  transition: all 0.2s ease;
  transform-origin: top;
}

.profile-header-lessthings {
    position: absolute;
    bottom: -38px;
    left: 40px;
  height:20px;
  border-radius:25px;
  border-top-left-radius:0;
  border-top-right-radius:0;
  background: rgb(240 240 240 / 80%);
    backdrop-filter: blur(5px);
  padding:5px 60px;
  padding-top:9px;
  border: 4px solid #cccfe0;
  border-top-style:none;
  transition: all 0.2s ease;
  transform-origin:top;
  transform: scaleY(0);
}

.profile-header-lessthings:hover {
  padding-right:55px;
  padding-left:55px;
  transform: translateX(5%) scale(1, 1.1);
}

.profile-media-section {
    margin-top: 64px;
    padding: 18px;
    border: 4px solid #cccfe0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.28);
}

.profile-media-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.profile-media-heading h2 {
    margin: 0;
    color: #315767;
    font-size: 20px;
}

.profile-media-heading span {
    color: #66717a;
    font-size: 12px;
}

.profile-media-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.profile-media-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    padding: 0;
    border: 3px solid #cccfe0;
    border-radius: 8px;
    background: #edf9fb;
    cursor: pointer;
}

.profile-media-item:hover,
.profile-media-item:focus-visible {
    border-color: #5dbfc4;
    outline: 3px solid rgba(93, 191, 196, 0.28);
    transform: translateY(-2px);
}

.profile-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-media-loading {
    grid-column: 1 / -1;
    padding: 24px;
    color: #66717a;
    text-align: center;
}

.global-announcements-root {
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 10050;
    display: grid;
    width: min(680px, calc(100vw - 24px));
    gap: 8px;
    transform: translateX(-50%);
    pointer-events: none;
}

.global-announcement-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border: 2px solid #5dbfc4;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 28px rgba(25, 72, 82, 0.24);
    color: #203f4a;
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

.global-announcement-content {
    min-width: 0;
}

.global-announcement-text {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    font-weight: 700;
}

.global-announcement-meta {
    margin-top: 5px;
    color: #66717a;
    font-size: 11px;
}

.global-announcement-close {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid #8fdadb;
    border-radius: 999px;
    background: #edf9fb;
    color: #315767;
    cursor: pointer;
}

.global-announcement-close:hover,
.global-announcement-close:focus-visible {
    background: #d7f2f4;
    outline: 3px solid rgba(93, 191, 196, 0.28);
}

.developer-moderation-tools {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 900;
    display: grid;
    justify-items: end;
    gap: 8px;
}

.developer-moderation-tools.is-open {
    z-index: 10060;
}

.developer-moderation-panel[hidden] {
    display: none !important;
}

.developer-moderation-toggle {
    padding: 9px 14px;
    border: 2px solid #5dbfc4;
    border-radius: 999px;
    background: #fff;
    color: #315767;
    box-shadow: 0 6px 20px rgba(25, 72, 82, 0.22);
    cursor: pointer;
    font-weight: 700;
}

.developer-moderation-count {
    display: inline-grid;
    min-width: 22px;
    min-height: 22px;
    place-items: center;
    margin-left: 5px;
    border-radius: 999px;
    background: #315767;
    color: #fff;
}

.developer-moderation-panel {
    width: min(360px, calc(100vw - 28px));
    max-height: min(520px, calc(100vh - 90px));
    overflow: auto;
    padding: 12px;
    border: 2px solid #5dbfc4;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 12px 36px rgba(25, 72, 82, 0.28);
}

.developer-moderation-header,
.developer-moderation-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.developer-moderation-header {
    margin-bottom: 10px;
}

.developer-moderation-header a {
    color: #315767;
}

.developer-moderation-list {
    display: grid;
    gap: 8px;
}

.developer-moderation-item {
    padding: 9px;
    border: 1px solid #c7e3e5;
    border-radius: 9px;
    background: #f8fcfd;
}

.developer-moderation-item-summary {
    display: block;
    overflow: hidden;
    color: #203f4a;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.developer-moderation-item-meta {
    margin: 4px 0 7px;
    color: #66717a;
    font-size: 11px;
}

.developer-moderation-item-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.developer-moderation-item-actions button {
    padding: 4px 7px;
    border: 1px solid #8fdadb;
    border-radius: 7px;
    background: #edf9fb;
    color: #315767;
    cursor: pointer;
}

.profile-header-morethings:hover {
  padding-right:55px;
  padding-left:55px;
  transform: translateX(5%) scale(1, 1.1);
}

.profile-header-somethings-thing:hover {
  padding-right:10px;
  padding-left:10px;
  transform: scale(1, 1.1);
}

.profile-header-somethings-thing > a {
  color:black;
  text-decoration:none;
}

.profile-right-description {
    background: rgba(0, 0, 0, 0.08);
    padding: 8px 16px;
    padding-left: 50px;
    border-radius: 12px;
    font-size: 18px;
    width: 60%;
    min-height:70px;
    white-space: pre-wrap;
    margin-top:10px;
    border-bottom-left-radius:0;
    border-top-left-radius:0;
    color: #575757;
    margin-bottom: 80px;
}

.profile-right-homecountry {
    background: rgba(0, 0, 0, 0.05);
    padding: 10px 16px;
    padding-left: 45px;
    border-radius: 12px;
    font-size: 20px;
    max-width: fit-content;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    position: absolute;
    bottom: 30px;
}

.profile-right-birthday {
    background: rgba(0, 0, 0, 0.05);
    padding: 8px 16px;
    padding-right: 45px;
    padding-right: 50px;
    border-radius: 12px;
    font-size: 20px;
    max-width: fit-content;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    position: absolute;
    bottom: 30px;
    right: 0px;
}

.profile-pfp {
  width:250px;
  height:250px;
  right:-30px;
  top:-50px;
  position:absolute;
}

.profile-header-right {
  display:flex;
  flex-direction:column;
  gap:5px;
  padding: 20px;
  padding-left:0px;
  min-width:700px;
}

.community-header-right-type {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 16px;
    padding-left: 50px;
    border-radius: 12px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    font-size: 20px;
    max-width: fit-content;
    color: #575757;
    position:absolute;
    bottom:55px;
    padding-left:16px;
}

.community-header-right-bday {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 16px;
    padding-left: 50px;
    border-radius: 12px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    font-size: 20px;
    max-width: fit-content;
    color: #575757;
    position:absolute;
    bottom:20px;
    padding-left:16px;
}

.community-header-subs {
    background: white;
    padding: 8px;
    border-radius: 12px;
    position: absolute;
    bottom: 10px;
    right: 10px;
    border: 4px solid #cccfe0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.community-header-subs > label {
  font-size:16px;
}

.community-header-subs > p {
  font-weight:bold;
  font-size:24px;
  margin: 5px;
}

.profile-box-container {
    background: none;
    backdrop-filter: none;
    border: none;
    padding: 0;
    box-shadow: none;
    margin-top: 0;
    width: auto;
    gap:15px;

}

.profile-subscriptions-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 7px 20px 20px 20px;
    margin-bottom: 0px;
    border: 4px solid #cccfe0;
    border-style: outset;
    box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
    margin-top: 10px;
    flex-direction:row;
    gap:10px;
    width: fit-content;
}

.sub-sub-container {
   padding:10px 0;
    border-radius: 8px;
    margin-top:5px;
    background: rgb(0 0 0 /5%);
    box-shadow: 2px 2px 5px #7e7e7e inset;
}

/* Profile picture container */
.profile-picture-container {
    position: relative;
    height: min-content;
    top: -70px;
    margin-right: 24px;
}

.profile-audio-box {
    position:absolute;
    bottom:-10px;
    right:-10px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 0px;
    border: 4px solid #cccfe0;
    border-style: outset;
    box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
    margin-top: 10px;
    flex-direction:row;
    gap:10px;
    width: fit-content;
}

.profile-something-bigbox {
    position: absolute;
    bottom:-10px;
    right:-10px;
    display:flex;
    flex-direction:row;
    gap:15px;
}

.profile-something-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 10px;
    margin-bottom: 0px;
    border: 4px solid #cccfe0;
    border-style: outset;
    box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
    margin-top: 10px;
    flex-direction:row;
    gap:10px;
    width: fit-content;
}

.profile-something-link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap:5px;
    text-decoration: none;
    color: black;
    transition: all 0.2s ease;
}

.profile-something-link:hover {
    color: grey;
}

.profile-more-hint {
    user-select: none;
    position: absolute;
    bottom:-10px;
    left:15px;
    background: rgb(255, 255, 255);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 0px;
    border: 4px solid #cccfe0;
    border-style: outset;
    box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
    margin-top: 10px;
    flex-direction:row;
    gap:10px;
    width: fit-content;
    color: black;
    transition: all 0.2s ease;
}

.profile-more-hint:hover {
    color: grey;
}

.profile-neck {
  background: white;
  border-radius:4px;
  border: 4px solid #cccfe0;
  border-top-style:none;
  border-top-left-radius:0;
  border-top-right-radius:0;
  min-width: calc(250px + 650px);
  margin-right:20px;
  margin-left:20px;
  display:flex;
  flex-direction:row;
  transition: max-height 0.5s ease;
  max-height: 0px;
  overflow:hidden;
}

.profile-neck.open {
  max-height: 1000px;
}

.profile-neck-left {
  display:flex;
  flex-direction:column;
  gap:10px;
  width: calc(100% - 550px);
  padding:20px;
}

.profile-neck-left > p {
  font-size: 16px;
  margin:0;
  padding:0;
  line-height: 1.5;
}

.profile-neck-separator {
  border-bottom-style: dotted;
  border-width:2px;
  border-color: #cccfe0;
  width:90%;
  margin-left:5%;
}

.profile-neck-right {
    width: 650px;
    background: #f0f0f0;
    border-left-style: solid;
    border-color: #cccfe0;
    border-width: 4px;
    padding:20px;
    display:flex;
    flex-direction:column;
    justify-content: space-between;
    padding-bottom:0;
    gap:20px;
}

.profile-neck-right-top {
  display:flex;
  flex-direction:row;
  gap:20px;
  width:100%;
  justify-content: space-between;
}

.profile-things-container {
  display:flex;
  flex-direction:column;
  gap:5px;
    width: 50%;
}

.profile-audios-container {
  display:flex;
  flex-direction:column;
  gap:5px;
    width: calc(100% - 40px);
  background: white;
  padding: 6px 15px;
    border: 3px solid #cccfe0;
    box-shadow: 4px 4px 8px #00000047;
  position:relative;
  bottom:0;
  border-bottom-style:none;
}

.profile-audio-name {
    color: #555;
    font-size:14px;
}

.profile-audio-subname {
    color: #8b8b8b;
    font-size:10px;
}

.profile-things-container > label {
  font-size:18px;
}

.profile-things-container > div {
  background: white;
  display:grid;
    grid-template-columns: 1fr 1fr 1fr;
  padding:5px;
    border: 3px solid #cccfe0;
    box-shadow: 4px 4px 8px #00000047;
}

.profile-picture {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.community-feedmain {
margin-top: 200px;
width:100%;
padding:15px;
}

/* Frutiger Aero border effect */
.frutiger-aero-border {
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 0 0 2px rgba(190, 241, 252, 0.5),
        0 10px 20px -5px rgba(0, 0, 0, 0.3),
        inset 0 -5px 10px rgba(255, 255, 255, 0.6),
        inset 0 5px 10px rgba(255, 255, 255, 0.6);
}

/* Glass reflection */
.frutiger-aero-border::after {
    content: '';
    position: absolute;
    top: 5%;
    left: 5%;
    width: 30%;
    height: 30%;
    background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-container {
            min-width: 700px;
            max-width: 700px;
            margin-top:150px;
	    margin-left:170px;
            background: white;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
            border: 4px solid #cccfe0;
            border-style: outset;
        }

        .auth-container h1 {
            text-align: center;
            margin-bottom: 30px;
            color: #15141c;
        }

        .auth-form {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .auth-form input, .auth-form textarea {
            padding: 12px;
            font-size: 18px;
            border: 2px solid #bccee2;
            border-radius: 8px;
            background: #edeff4;
            font-family: inherit;
        }

        .auth-form textarea {
            resize: vertical;
            min-height: 100px;
        }

        .auth-form button {
            background-color: #bef1fc;
            font-size: 18px;
            border: none;
            padding: 12px;
            cursor: pointer;
            border-radius: 8px;
            margin-top: 10px;
        }

        .auth-form button:hover {
            background-color: #9fd9e8;
        }

        .auth-link {
            text-align: center;
            margin-top: 20px;
            font-size: 16px;
        }

        .error {
            color: #ff4444;
            text-align: center;
            font-size: 16px;
            min-height: 20px;
        }

        .success {
            color: #44aa44;
            text-align: center;
            font-size: 16px;
        }

        /* New styles for profile picture and name row */
        .profile-name-row {
            display: flex;
            gap: 20px;
            align-items: stretch;
        }

        .profile-pic-selector {
            width: 200px;
            height: 200px;
            border: 2px solid #8FDADB;
            border-radius: 8px;
            background: #edeff4;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .profile-pic-selector:hover {
            border-color: #6fc0c1;
            background: #e0e4e9;
        }

        .profile-pic-selector img {
            width: 40px;
            height: 40px;
            opacity: 0.5;
            margin-bottom: 5px;
        }

        .profile-pic-selector span {
            font-size: 12px;
            color: #666;
            text-align: center;
        }

        .name-input-container {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .name-input-container input {
            flex: 1;
            width: 100%;
            box-sizing: border-box;
        }

        /* Hide the actual file input */
        #profile-pic-input {
            display: none;
        }

/* Name with background */
.name-container {
    position: relative;
    display: inline-block;
}

.profile-name {
    position: relative;
    font-size: 48px;
    margin: 0;
    z-index: 2;
    color: #15141c;
}



/* Profile actions */
.profile-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.profile-btn {
    background-color: #bef1fc;
    font-size: 16px;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    height:50px;
}

.profile-btn:hover {
    background-color: #9fd9e8;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.profile-edit-btn {
    background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
    border: 2px solid #8FDADB;
    font-size: 16px;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    height:50px;
    position: relative;
    top: -30px;
    left: 20px;
}

.profile-edit-btn:hover {
    background-color: #9fd9e8;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* Stats bar */
.profile-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid rgba(190, 241, 252, 0.5);
}

.stat {
    text-align: center;
}

.description-name {
    border-radius:8px;
    position:relative;
    font-size:16px;
    color: #48484A;
    background:rgb(0 0 0 / 5%);
    padding:5px;
    padding-left:20px;
    left: -20px;
    white-space: pre-wrap;
    min-height:100px;
    min-width:400px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #15141c;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

/* Profile feed */
.profile-feed {
    margin-top: 20px;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}
.profile-picture-edit-container {
  position: relative;
  cursor: pointer;
  display: inline-block;
}

.profile-picture {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.profile-picture.dimmed {
  opacity: 0.5;
}

.comment-reply-deep {
	margin-left:0;
	margin-right:0;
	margin-bottom:0;
    padding-left: 0;
    padding-right: 0;
    padding-right: 0;
}

.comment-reply {
	margin-left:20px;
}

.profile-picture-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
}

.new-picture-preview {
  margin-top: 10px;
  font-size: 14px;
  color: #4CAF50;
  text-align: center;
  background: rgba(76, 175, 80, 0.1);
  padding: 5px;
  border-radius: 20px;
}

/* Username edit mode */
.profile-name-input {
  font-size: 48px;
  font-weight: bold;
  background: transparent;
  border: 2px solid #bef1fc;
  border-radius: 8px;
  padding: 5px 15px;
  width: 100%;
  font-family: inherit;
  position: relative;
  z-index: 2;
}

.profile-name-input:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

/* Profile actions */
.profile-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.chat-stickers-panel {
	width: 35%;
	height:100%;
        background: #FFFFFF;
	}

/* CHATS PAGE SPECIFIC LAYOUT */
        .chats-layout {
            display: flex;
            flex-direction: row;
            gap: 0;
            width: 100%;
            height: calc(100vh - 90px);
            position: relative;
        }

        /* LEFT PANEL: chats list (35%) */
        .chats-list-panel {
            width: 100%;
            flex-shrink: 0;
            background-color: #edeff4;
            border-right: 4px solid #bccee2;
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .chats-list-header {
            padding: 20px 20px 10px;
            border-bottom: 2px solid #bccee2;
            background: linear-gradient(90deg, rgba(223, 238, 246, 1) 0%, rgba(150, 214, 246, 1) 100%);
        }

        .chats-list-header h2 {
            margin: 0;
            font-size: 24px;
            color: #02383e;
        }

        .chats-scrollable {
            flex: 1;
            overflow-y: auto;
            padding: 10px;
        }

        /* Chat item card */
        .chat-card {
            background: white;
            border: 4px solid #cccfe0;
            border-style: outset;
            border-radius: 12px;
            margin-bottom: 12px;
            padding: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }
        .chat-card:hover {
            transform: translateX(-2px);
            box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.3);
	    z-index:100;
        }
        .chat-card:active {
            transform: translateX(2px);
		filter:brightness(95%);
	    z-index:100;
        }
        .chat-card-content {
            display: flex;
            gap: 12px;
            align-items: center;
        }
        .chat-card-avatar {
            width: 56px;
            height: 56px;
            border-radius: 12px;
            object-fit: cover;
            border: 2px solid #8FDADB;
        }
        .chat-card-info {
            flex: 1;
            overflow: hidden;
        }
        .chat-card-name {
            font-weight: bold;
            font-size: 18px;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .chat-card-lastmsg {
            font-size: 12px;
            color: #666;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .chat-card-time {
            font-size: 10px;
            color: #999;
            margin-top: 4px;
        }
        .more-actions-btn {
            position: absolute;
            top: 8px;
            right: 12px;
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: #555;
            width: 28px;
            height: 28px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .more-actions-btn:hover {
            background: rgba(0,0,0,0.1);
        }
        .chat-card-menu {
            position: absolute;
            top: 35px;
            right: 8px;
            background: white;
            border: 2px solid #8FDADB;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
            z-index: 550;
            min-width: 160px;
            display: none;
	    max-width:200px;
        }
        .chat-card-menu.show {
animation: squashStretch 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            display: block;
        }
        .chat-card-menu-item {
            padding: 8px 16px;
            font-size: 14px;
            cursor: pointer;
            transition: background 0.1s;
        }
        .chat-card-menu-item:hover {
            background: #bef1fc;
        }

        /* RIGHT PANEL: chat container (65%) */
        .chat-container-panel {
            width: 65%;
            display: flex;
            flex-direction: column;
            background: rgb(214,224,236);
            height: 100%;
            overflow: hidden;
    border-style: solid;
    border-left-width: 0;
    border-top-width: 0;
    border-bottom-width: 0;
    border-color: #bccee2;
        }

	.feedmain:has(.chat-stickers-panel.hidden) .chat-container-panel {
	width:100%;
	}


        .chat-header-info {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 12px;
            background: rgb(237,239,244);
            border-bottom: 4px solid #bccee2;
            box-shadow: 0px 12px 20px 0px rgb(29 44 61 / 28%);
            z-index: 10;
        }
        .chat-partner-info {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
        }
        .chat-partner-text {
            min-width: 0;
        }
        .chat-partner-name-line {
            max-width: min(50vw, 420px);
        }
        .chat-partner-avatar {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            object-fit: cover;
        }
        .chat-partner-name {
            font-weight: bold;
            font-size: 20px;
        }
        .chat-partner-status {
    font-size: 12px;
    color: #3b3b3b;
    margin-top: 3px;
    padding: 4px 6px;
    background: #00000014;
    border-radius: 4px;
        }
        .current-user-avatar {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            object-fit: cover;
        }

        /* MESSAGES AREA */
        .chat-messages-container {
            flex: 1;
            overflow-y: auto;
            padding: 16px 0;
            display: flex;
            flex-direction: column;
            gap: 0;
            background: rgba(237, 239, 244, 0.6);
        }
        /* Day separator */
        .day-separator {
            text-align: center;
            margin: 16px 0;
            position: relative;
        }
        .day-separator span {
            background: #bccee2;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            color: #15141c;
            font-weight: bold;
        }
        /* Message bubble wrapper */
        .message-wrapper {
            display: flex;
            flex-direction: column;
            width: 100%;
            position: relative;
	    padding: 3px 0;
        }

	.message-wrapper.unread {
	background: rgb(188 206 226 / 42%);
	}

        .message-wrapper.mine {
            align-self: flex-end;
        }
        .message-wrapper.theirs {
            align-self: flex-start;
        }
        /* bubble with tail */
        .message-bubble {
            padding: 8px 12px;
            border-radius: 12px;
            position: relative;
            word-wrap: break-word;
            background: white;
            border: 1px solid #c0d4e0;
    	    box-shadow: 2px 6px 10px #413e4347;
        }
        .mine .message-bubble {
            background: #bef1fc;
	    border-color: rgb(78, 143, 156);
            border-bottom-right-radius: 4px;
            align-self: flex-end;
	    max-width:80%;
	    margin-right:16px;
        }
        .theirs .message-bubble {
            background: rgb(192, 252, 219);
            border-color: rgb(103, 175, 136);
            border-bottom-left-radius: 4px;
            align-self: flex-start;
	    max-width:80%;
	    margin-left:16px;
        }
        .message-text {
            font-size: 14px;
            line-height: 1.4;
        }
        .message-time {
            font-size: 10px;
            color: #777;
            margin-top: 4px;
            text-align: right;
        }
        /* reply preview inside bubble */
        .reply-preview-block {
            background: rgba(0,0,0,0.05);
            border-left: 3px solid #8FDADB;
            padding: 5px 8px;
            margin-bottom: 6px;
            font-size: 12px;
            border-radius: 8px;
        }

.reply-preview-name {
    font-weight: bold;
    font-size: 14px;
    color: #555;
    margin-bottom:5px;
}
        .reply-text-preview {
            font-style: italic;
            color: #555;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        /* Grid for multiple images */
        .message-images-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
            gap: 6px;
            margin-top: 6px;
        }
        .chat-attachment-img {
            max-width: 100%;
            max-height: 40vh;
            border-radius: 12px;
            object-fit: cover;
            cursor: pointer;
        }
        .chat-attachment-vid {
            max-width: 100%;
            max-height: 150px;
            border-radius: 12px;
        }
        .chat-attachment-audio {
            width: 200px;
            height: 36px;
        }
        /* INPUT AREA */
        .chat-input-area {
            background: white;
            border-top: 4px solid #bccee2;
            padding: 12px 20px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .file-preview-row {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            padding: 5px;
            background: #f0f2f5;
            border-radius: 8px;
            min-height: 60px;
        }
        .preview-file-item {
            position: relative;
            width: 70px;
            height: 70px;
            background: #ddd;
            border-radius: 8px;
            overflow: hidden;
        }
        .preview-file-item img, .preview-file-item video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .remove-preview-btn {
            position: absolute;
            top: -6px;
            right: -6px;
            background: gray;
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            cursor: pointer;
            background: #ff4444;
        }
        .message-textarea {
            padding: 10px;
            border: 2px solid #bccee2;
            border-radius: 8px;
            resize: none;
            font-family: inherit;
            font-size: 14px;
            background: #edeff4;
        }
.message-textarea:focus-visible {
outline:none;
}
        .input-actions-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .attach-options {
            position: relative;
        }

        .attach-menu {
            display: flex;
            gap: 15px;
            flex-direction: row;
        }

        .attach-option {
            border: none;
            background: transparent;
            cursor: pointer;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            display: flex;
            justify-content: center;
            align-items: center;
            border-bottom: 1px solid #eee;
            transition: background-color .2s ease;
        }

        .attach-option:hover {
        background-color: rgba(255, 255, 255, .1);
        }

        .attach-option:hover > .attach-option-icon {
            width: 26px;
            height: 26px;
            opacity: 1;
        }

        .attach-option-icon {
            width: 24px;
            height: 24px;
            opacity: .5;
        }

        .send-msg-btn {
            background: #bef1fc;
            border: 2px solid #8FDADB;
            border-radius: 8px;
            padding: 8px 28px;
            cursor: pointer;
        }
        /* context menu imitation via click */
@keyframes squashStretch {
    0% {
        transform: scale(0.5, 0);
        opacity: 1;
    }
    15% {
        transform: scale(1.2, 0.2);
        opacity: 1;
    }
    50% {
        transform: scale(0.9, 1.2);
    }
    70% {
        transform: scale(1.05, 0.95);
    }
    85% {
        transform: scale(0.98, 1.02);
    }
    100% {
        transform: scale(1, 1);
        opacity: 1;
    }
}

.message-context-menu {
    position: fixed;
    background: white;
    border: 2px solid #8FDADB;
    border-radius: 12px;
    box-shadow: 0 4px 12px #0000006b;
    z-index: 200;
    transform-origin: top left;
    opacity: 0;
    pointer-events: none;
    overflow:hidden;
}

.message-context-menu.show {
    animation: squashStretch 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    pointer-events: auto;
}
        .context-item {
            padding: 8px 20px;
            cursor: pointer;
        }
        .context-item:hover {
            background: #bef1fc;
        }
        .edit-mode-indicator {
            background: #edeff4;
            padding: 5px 12px;
            border-radius: 12px;
            font-size: 12px;
            margin-bottom: 5px;
        }

	.chat-card-unread {
	background:rgb(255,248,228);
	}

	.chat-card-unread-badge {
	border-radius: 50%;
    background: rgb(255, 161, 151);
    color: white;
    width: 24px;
    height: 22px;
    text-align: center;
    align-content: center;
    padding-top: 2px;
    position: absolute;
    right: 20px;
    top: 50%;
	}

.profile-btn {
  background-color: #bef1fc;
  font-size: 16px;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    z-index: 10;
    position: relative;
    border-style: solid;
    border-width: 2px;
    border-color: #8FDADB;
}

.profile-btn:hover {
  background-color: #9fd9e8;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* Frutiger Aero border for profile picture */
.frutiger-aero-border {
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 0 0 2px rgba(190, 241, 252, 0.5),
    0 10px 20px -5px rgba(0, 0, 0, 0.3),
    inset 0 -5px 10px rgba(255, 255, 255, 0.6),
    inset 0 5px 10px rgba(255, 255, 255, 0.6);
}

.profile-btn-container {
    width: 125%;
    left: -12.5%;
    bottom: -50px;
    position: absolute;
    display: flex;
    margin-right: -24px;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
}

.profile-left-buttons {
    width: calc(100% - 40px);
    padding: 20px;
    display: flex;
    flex-direction: column;
    bottom: 0;
    position: absolute;
    gap: 15px;
}

.profile-btn-btn {
    width: auto;
    border: 2px solid #8FDADB;
    padding: 8px;
    border-radius: 15px;
    font-size: 17px;
    border: 2px solid #cccfe0;
    cursor: pointer;
    transition: all 0.2s ease;
    position:relative;
}

.profile-btn-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px) scale(1.02);
}


.frutiger-aero-border::after {
  content: '';
  position: absolute;
  top: 5%;
  left: 5%;
  width: 30%;
  height: 30%;
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
  border-radius: 50%;
  pointer-events: none;
}

/* ===== POST CREATOR REDESIGN ===== */
#new-post-box {
    padding: 20px;
    background: white;
    box-shadow: 0 -50px 50px -50px inset #4aa3db94;
}

/* Top Row */
.post-creator-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.creator-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    top: -5px;
}

.creator-avatar {
    margin-top:-56px;
    width: 124px;
    height: 124px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

.creator-username {
    font-weight: bold;
    font-size: 32px;
    color: #15141c;
    text-shadow: 2px 4px 3px rgba(0, 0, 0, 0.2);
}

/* Community Dropdown */
.creator-community-dropdown {
    padding: 4px 8px;
    width: 100%;
    overflow: scroll;
    font-size: 16px;
    border: 2px solid #8FDADB;
    border-radius: 8px;
    background: linear-gradient(208deg, rgba(190, 241, 252, 0.3) 0%, rgba(190, 252, 228, 0.3) 100%);
    cursor: pointer;
}

.creator-community-dropdown:hover {
    border-color: #6fc0c1;
}


/* Text next to switch */
.anonymous-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Files Row */
.post-creator-files-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.file-select-btn {
    width: auto !important;
    min-width: 150px;
    background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
    border: 2px solid #8FDADB;
}

.files-preview-area {
    flex: 1;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    min-height: 100px;
    background: rgba(237, 239, 244, 0.5);
    border: 2px dashed #bccee2;
    border-radius: 8px;
    flex-wrap: wrap;
}

/* File Previews */
.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border: 2px solid #8FDADB;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.preview-item.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item.video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poll-preview-item {
    min-width: 200px;
    max-width: 300px;
    padding: 12px;
    background: #f0f8ff;
    border: 2px solid #8FDADB;
    border-radius: 12px;
    position: relative;
}

.poll-preview-item .poll-preview-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 6px;
}

.poll-preview-item .poll-preview-choices {
    font-size: 13px;
    color: #555;
}

.poll-preview-item .poll-preview-meta {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Remove button for poll preview */
.poll-preview-item .remove-poll-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poll-preview-item .remove-poll-btn:hover {
    background: #cc0000;
}

.preview-item.audio-preview {
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(208deg, rgba(190, 241, 252, 0.3) 0%, rgba(190, 252, 228, 0.3) 100%);
}

.preview-item.audio-preview .audio-placeholder {
    font-size: 12px;
    text-align: center;
    padding: 5px;
    word-break: break-word;
}

.seq-row {
padding-bottom:15px;
margin-bottom:15px;
}

.remove-file {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.remove-file:hover {
    background: #cc0000;
}

/* File type warning */
.file-type-warning {
    color: #ff4444;
    font-size: 12px;
    margin-left: 15px;
}

/* Text Row */
.post-creator-text-row {
    margin-bottom: 15px;
}

.post-creator-textarea {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    border: 2px solid #bccee2;
    border-radius: 8px;
    background-color: #edeff4;
    resize: none;
    box-sizing: border-box;
    font-family: inherit;
}

.post-creator-textarea:focus {
    outline: none;
    border-color: #8FDADB;
}

/* Bottom Row */
.post-creator-bottom-row {
    display: flex;
    justify-content: flex-end;
}

.comment-footer-replies {
    //border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    //padding-bottom: 7px;
    //border-top-color: rgba(0, 0, 0, 0.1);
    //border-right-color: rgba(0, 0, 0, 0.1);
    //border-left-color: rgba(0, 0, 0, 0.1);
    //border-top-width: 2px;
    //border-right-width: 2px;
    //border-left-width: 2px;
}

.send-button {
    width: auto !important;
    min-width: 150px;
    background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
    border: 2px solid #8FDADB;
}

/* Post content section */
.post-content-section {
  margin-top: 45px;
  margin-bottom: 15px;
}

/* Files container */
.post-files-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

/* Individual post images */
.post-image {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  cursor: pointer;
  transition: opacity 0.2s;
}

.comment-avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;  /* Rounded squares! */
  object-fit: cover;
}

/* Individual post videos */
.post-video {
  max-width: 100%;
  max-height: 480px;
}

/* Mixed media items (images and videos together) */
.mixed-media-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mixed-media-item {
  flex: 1 1 200px;
  max-width: 300px;
  max-height: 200px;
  object-fit: cover;
}

/* Audio container - always at bottom */
.post-audio-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  width: 100%;
}

.post-audio {
  width: 100%;
  height: 40px;
}

/* Backward compatibility for old posts */
.post-image:only-child {
  max-width: 300px;
}

.settings-profile-picture {
    width: 200px;
    height: 200px;
    position: absolute;
    object-fit:cover;
}

.settings-background{
width:100%;
height:150px;
margin-top:5px;
    object-fit:cover;
border-radius:12px;
cursor:pointer;
margin-bottom:5px;
}


/* Media container (left side) */
.post-media-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;  /* Fixed max width for images */
  flex-shrink: 0;
}

/* Individual post images - proper size */
.post-image {
  max-width: 300px;
  max-height: 300px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.2s;
  width: auto;
  height: auto;
}

/* Videos - same size as images */
.post-video {
  max-width: 300px;
  max-height: 300px;
  border-radius: 8px;
}

/* Text on the right */
.post-text {
  white-space: pre-wrap;
  flex: 1;
  font-size: 18px;
  line-height: 1.5;
  word-wrap: break-word;
  min-width: 200px;
    word-wrap: break-word;
}

/* Audio container - full width below everything */
.post-audio-container {
  width: 100%;
  margin-top: 15px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-audio {
  width: 100%;
  height: 40px;
}

.comment-item {
    transition: background-color 0.2s ease;
}

.reply-reference {
    margin-left: 5px;
    font-size: 13px;
}

.reply-ref-link {
    cursor: pointer;
}

.reply-ref-link:hover {
    text-decoration: underline;
}


/* Backward compatibility */
.post-image:only-child {
  max-width: 300px;
}

/* Responsive */
@media (max-width: 700px) {
  .post-content-row {
    flex-direction: column;
  }

  .post-media-container {
    max-width: 100%;
  }

  .post-image, .post-video {
    max-width: 100%;
  }
}

/* Post carousel - images keep their natural size */
.post-carousel {
    float: left;
  position: relative;
  min-width:200px;
  min-height:200px;
  display: inline-block; /* This shrinks to fit content */
  max-width: 100%;
    margin-bottom: 10px;
}

.carousel-current {
  display: inline-block;
  line-height: 0; /* Removes extra space below image */
}

.carousel-image {
  max-width:100%;
  width: auto; /* Natural width */
  height: auto; /* Natural height */
  max-height: 500px; /* Optional: prevent extremely tall images */
  cursor: pointer;
  border: none;
  border-radius: 0;
  display: block;
}

.carousel-video {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 500px;
  border: none;
  border-radius: 0;
}

.profile-btn-mobile { display:none; }

.post-media-container {
  display: inline-block;
  flex-shrink: 0;
}

/* SQUARE navigation buttons - NOT CIRCLES */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #8FDADB;
  border-radius: 8px; /* RECTANGLE/SQUARE corners */
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
  color: #15141c;
}

.carousel-nav:hover {
  background: white;
  border-color: #6fc0c1;
}

.carousel-prev {
  left: 5px;
}

.carousel-next {
  right: 5px;
}

.carousel-counter {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 12px;
  border-radius: 4px; /* SLIGHTLY rounded, not circles */
  font-size: 12px;
  font-family: monospace;
}

/* Lightbox - SQUARE buttons */
.lightbox-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-media {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid white;
  border-radius: 8px; /* SQUARE corners */
  color: white;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  transition: all 0.2s;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.5);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}
.message-attachment-container:not(:has(img)) {
display:none;
}

.message-attachment-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 4px;
    margin-top: 5px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1002;
  font-family: monospace;
    margin-bottom: 60px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1002;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: #ff4444;
}
/* Post content row - image left, text right */
.post-content-row {
  display: flow-root;
  flex-direction: row;
  gap: 0px;
  width: auto;
  align-items: flex-start;
  flex-wrap: wrap;
  background: rgb(237, 239, 244);
    border-radius: 5px;
    margin-right:20px;
    margin-left:20px;
}

/* Text takes remaining space */
.post-text {
  padding: 10px;
  flex: 1;
  font-size: 18px;
  line-height: 1.5;
  word-wrap: break-word;
  min-width: 200px;
overflow-wrap: anywhere;
}

.community-rules-container {
    margin-left: 10px;
}
.name-container {
    position: relative;
    display: inline-block;
}
.profile-name {
    position: relative;
    font-size: 48px;
    margin: 0;
    z-index: 2;
    color: #15141c;
}
.name-background {
    position: absolute;
    top: 70%;
    left: -24px;
    width: 100%;
    height: 60%;
    padding-right: 40px;
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-50%);
    z-index: 1;
    border-radius: 8px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.status-background {
    position: relative;
    background: rgba(0, 0, 0, 0.05);
    z-index: 1;
    border-radius: 0 6px 6px 0;
    padding: 5px 10px;
    padding-left: 20px;
}

.status-container {
    display: flex;
    justify-content: flex-start;
    margin-left: -20px;
    margin-top: 5px;
}



.status-text {
    padding: 0;
    margin: 0;
}

.status-text:empty {
    display:none;
}

.chat-attachment-image {
  position: relative;
    overflow: hidden;
width: 100%;
    height: 100%;
    object-fit: cover; /* Use 'contain' if you don't want cropping */
    display: block;
}

.chat-attachment-video {
  max-width: 100%;
  margin-top: 5px;position: relative;
    overflow: hidden;
}

.chat-attachment-audio {
  width: 200px;
  margin-top: 5px;
}

.chat-attachments {
  margin-top: 5px;
}
.chat-preview-item {
max-height:150px;
max-width:150px;
}
.profile-picture-container.editable {
  position: relative;
  cursor: pointer;
}

.edit-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  color: white;
  text-align: center;
  padding: 5px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 0 0 12px 12px;
}

.profile-picture-container.editable:hover .edit-overlay {
  opacity: 1;
}

.edit-name-btn {
  cursor: pointer;
  background-color:rgba(0,0,0,0);
  border-style:none;
  transition: background-color 0.2s;
}

.name-container:hover .edit-name-btn {
  background-color:rgba(0,0,0,0.3);
}

.community-name-input {
  font-size: 32px;
  font-weight: bold;
  background: white;
}

.status-background.editable {
  cursor: pointer;
  position: relative;
}

.pfp-choose-new {
opacity:0%;
transition: opacity 0.5s ease;
}

.pfp-choose-new:hover {
opacity:90%;
cursor:pointer;
}

.status-input, .description-input, .rules-input {
  width: 100%;
  padding: 8px;
  font-size: 16px;
  border: 2px solid #8FDADB;
  border-radius: 8px;
  font-family: inherit;
  background: white;
  resize: vertical;
}
.post-carousel {
margin:10px;
max-width:50%;
}
.lightbox-single-img {
    max-height: 80%;
    max-width: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.top-bar {
display: flex;
justify-content: space-between;
padding: 10px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
background: linear-gradient(90deg, rgba(150, 246, 216, 1) 0%, rgba(100, 188, 255, 1) 100%);
}

.logo-name {
display: flex;
align-items: center;
justify-content: center;
gap:10px;
}

.chat-preview-image {
max-height:150px;
}

.remove-preview {
top:-40px;
}

.new-postbutton {
    font-size: 18px;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 20px;
    padding: 10px 20px;
    background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
    border: 2px outset rgb(107 211 206);
    text-align: center;
}


.new-postbutton:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.new-postbutton-exit {
position:absolute;
top:-10px;
right:-10px;
  font-size: 18px;
  border: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  transition: background-color 0.2s;
max-width:40px;
max-height:40px;
font-size:18px;
padding: 10px 0;
background: linear-gradient(208deg,rgba(132, 123, 232, 1) 0%, rgba(190, 199, 255, 1) 100%);
}

.chat-exit-btn {
    z-index: 1000;
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 18px;
    border: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    transition: background-color 0.2s;
    max-width: 40px;
    max-height: 40px;
    font-size: 18px;
    padding: 10px 0;
    background: linear-gradient(208deg, rgba(132, 123, 232, 1) 0%, rgba(190, 199, 255, 1) 100%);
}

.postbox {
        min-width:640px;
  }

.mainpage-logo {
padding:30px;
padding-top:45px;
max-width:55%;
min-width:700px;
}
.carousel-current {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    max-height: 500px;
    overflow: hidden;
}

.carousel-image, .carousel-video, .youtube-preview {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.youtube-preview {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.youtube-preview iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.communities-page-container {
  margin-top: 50px;
  max-width:750px;
  background: #edeff4;
  }


.friends-page-buttons {
  display: flex;
  gap: 10px;
}

.rules-mobile {
display:none;
}

.comment-item {
    position: relative;
}

.comment-replies-container {
    margin-top: 8px;
}

.reply-input-container {
    margin-top: 10px;
    padding: 10px;
    background: rgba(237, 239, 244, 0.5);
    border-radius: 8px;
}

.reply-buttons {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}

.reply-btn, .cancel-reply-btn {
    background: none;
    border: none;
    color: #2c5282;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
}

.reply-btn:hover {
    text-decoration: underline;
}

.settings-bio-container {
display:flex;
flex-direction:row;
gap:10px;
}

.profile-feedmain {
    margin-top: 280px;
    padding:15px;
}

@media (max-width: 1300px) {
	.community-rules-container {
	display:none;
	}
	.community-layout, .community-main {
	display:block;
	}

}



@media (max-width: 830px) {
  /* Reset body padding and overflow */
  body {
    width: 100%;
    min-height: 100dvh;
    padding-top: 105px;
    overflow-x: hidden;
    background-attachment: scroll;
  }
  .mainpage-logo {
  min-width: 0;
        max-width: 90%;
        padding-top: 90px;
  }
  .postbox {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }
  /* Navigation container - full width, no overflow */
  nav.top-bar {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100vw;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background-color: #edeff4;
    box-sizing: border-box;
    z-index: 100;
  }

  /* Logo stays left */
  .logo-name {
    display: flex;
    align-items: center;
    gap: 8px;
        margin-left: 10px;
        margin-top: 10px;
        margin-bottom: 10px;
  }

  .logo-name img {
    height: 32px;
  }

  .logo-name a {
    font-size: 18px;
  }

  /* User menu stays right */
  .nav-user-section {
    margin-left: auto;
  }

  .user-menu-trigger {
    padding: 4px 6px;
  }

  .nav-avatar {
    width: 28px;
    height: 28px;
  }

  .nav-username {
    font-size: 0px;
  }

  /* Button row - spans full width under the top row */
  .nav-left-links {
    order: 2;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: stretch;
    gap: 0;
    margin-top: 0;
    margin-bottom: 0;
    background-color: #3d58bc;
    border-radius: 0;
    padding: 0 12px;
  }

  /* All three buttons in one row, no rounding, cassette style */
  .nav-link,
  .chats-toggle-btn {
    flex: 1;
    text-align: center;
        flex-direction: column;
    margin: 0;
    padding: 16px 0px;
    border: none;
    border-radius: 0 !important;
    font-size: 14px;
    font-weight: 500;
    color: #15141c;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border:none;
        border-right: solid #3c57bc 2px;
    text-shadow:none;
    outline:none;
        font-size: 12px;
  }

  .nav-link img {
    height: 20px;
    width: auto;
    margin: 0 !important;
    padding: 0;
  }

  .chats-toggle-btn {
    background: #8FDADB;
    border-left: 1px solid #6caeaf;
    border-right: 1px solid #6caeaf;
  }

  /* Hide the old separate button containers */
  #auth-buttons {
   display: contents;
  }

  .feedmain {
    min-width: 100%;
    max-width: 100%;
    width:100%;
    background-image: url('/bg.webp');
    background-size: cover;
    background-position: right bottom;
    background-attachment: scroll;
    margin-right:0;
  }

  .profile-feedmain {
    padding:0;
    background: linear-gradient(90deg,rgba(0, 0, 0, 1) 1%, rgba(0, 0, 0, 0) 50%);
    border:none;
  }

  .community-feedmain {
    padding:0;
    background: rgba(0,0,0,0);
    border:none;
  }

  .post {
    margin-left: auto;
        margin-right: auto;
    min-width: 90%;
    max-width: 90%;
    width: 90%;
    margin-top: 60px;
        padding-left: 0;
        padding-right: 0;
  }

  /* Post creator adjustments */
  #new-post-box {
    margin-left: 0;
    width: 100%;
  }

  .creator-avatar {
    width: 60px;
    height: 60px;
    margin-top: -30px;
  }

  .creator-username {
    font-size: 24px;
  }

  .post-creator-files-row {
    flex-wrap: wrap;
  }

  /* Make chat panel fit phone */
  .chats-panel {
    height:80%;
    margin-top:60px;
    width: 90%;
    right: 5%;
    left: 5%;
    max-width: none;
    min-width: auto;
  }

  .chat-friend-avatar {
    width: 40px;
    height: 40px;
  }

  .chat-friend-name {
    font-size: 16px;
  }

  .chat-with-name {
    font-size: 18px;
  }

  /* Profile page adjustments */
  .profile-header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }



  .profile-name {
    font-size: 28px;
  padding:0px;
  }



  /* Post content adjustments */
  .post-content-row {
  display: flex;
    margin-right:20px;
    margin-left:20px;
    flex-direction: column;
  }

  .post-media-container {
    max-width: 100%;
  }

  .post-image, .post-video, .carousel-image, .carousel-video {
    max-width: 100%;
    height: auto;
  }

  .post-carousel {
    max-width: 90%;
    width: auto;
    min-width: auto;
  }

  /* Comments */
  .comment-content-row {
    margin-left: 10px;
    flex-direction:column;
  }

  .comment-footer {
    margin-left: 0;
  }

  /* Friend and community cards */
  .friend-card {
    flex-wrap: wrap;
  }

  .friend-card-info {
    width: 100%;
  }

  .friend-card div[style*="display: flex"] {
    width: 100%;
    justify-content: stretch;
  }

  .friend-card-btn {
    text-align: center;
  }


  /* Limit community name length in posts */
.community-author-name {
  max-width: 200px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  display: inline-block;
  font-size: 18px;
}

.community-author-name-alone {
        max-width: 200px;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        display: inline-block;
        font-size: 24px;
        margin-top: 0;
        position: relative;
}

.community-author-name {
margin-left:-35px;
}

.author-name {
  font-size: 18px;
  display: block;
  max-width: 290px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.author-name-user {
  display: block;
  max-width: 250px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size:14px;
  max-width:70%;
}
.author-avatar {
  width:50px;
  height:50px;
  border-radius:6px;
  top:0;
}

.author-timestamp {
  font-size:10px;
}

.community-author-avatar {
  width:50px;
  height:50px;
  border-radius:6px;
  top:0;
}
.post-author .community-author-avatar + .author-avatar {
  width:25px;
  height:25px;
  border-radius:4px;
  top:auto;
  bottom:3px;
}
.author-info {
top:0px;
margin-top:5px;
gap:0px;
}

.tab-btn {
width: 100px;
font-size:14px;
}


	.community-rules-container {
	display:none;
	}
  .community-layout {
  top:15px;
  }

	.community-layout, .community-main {
	display:block;
	}

	.community-main {
	width:100%;
	}

     .profile-header-content {
                text-align: left;
        display: flex;
        grid-auto-flow: column;
        gap: 0;
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        margin-bottom:  10px;
    }

  .profile-picture-container {
    position: relative;
  top: -10px;
  }
  .profile-actions {
  display:none;
  }
  .status-background {
  left:0;
  border-top-left-radius:0;
  border-bottom-left-radius:0;
  top:0;
  }
  .name-background {
  border-top-left-radius:0;
  border-bottom-left-radius:0;
  }
  .name-container {
        margin-bottom: 5px;
  }

  .profile-picture-container.editable {
    width: 130px;
  }
  .profile-picture {
        width:188px;
        height:188px;
  }
	.profile-btn-mobile {
  display: block;
  background: linear-gradient(208deg, rgba(190, 241, 252, 1) 0%, rgba(190, 252, 228, 1) 100%);
  border: 2px solid #8FDADB;
  font-size: 16px;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.profile-btn-mobile:hover {
  background-color: #9fd9e8;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.profile-picture-overlay {
font-size:10px;
width:80%;
}
  .communities-page-container {
  margin-top:120px;
  background: #edeff4;
  }

.friends-page-buttons {

    width: 100px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.community-post-buttons {
  display:flex;
  flex-direction: column;
  gap: 5px;

}

.profile-stats {
  border-top: 2px solid rgba(160, 211, 222, 1);
margin-top:0;
}

.rules-mobile {
display:block;
}

.settings-container {
width:95%;
min-width:95%;
max-width:95%;
padding:0;
}
.setting-container {
width:95%;
margin-left:10px;
}

.settings-bio-container {
display:flex;
flex-direction: column;
gap:10px;
}

.profile-btn-container {
    width: 120%;
    left: -12.5%;
    bottom: -30px;
    position: absolute;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
}
.profile-btn {
padding: 5px 10px;
font-size:14px;
}

.profile-info {
position: relative;
width:100%;
top:0;
}

.description-name {
    min-height: 60px;
    min-width: 200px;
}

.main-feed {
background-image:none;
background: linear-gradient(90deg, rgb(0 0 0 / 50%) 1%, rgba(0, 0, 0, 0) 50%);
        border-right-style: hidden;
        border-left-style: hidden;
}

.comment-reply-deep {
	margin-top: 10px;
	padding-top:5px;
	margin-left:0;
	margin-right:0;
	margin-bottom:0;
	padding-right:2px;
	padding-left:2px;
}

.comment-reply {
	margin-top: 10px;
	padding-top:5px;
	margin-left:0;
	margin-right:0;
	margin-bottom:0;
	padding-right:2px;
	padding-left:2px;
}

.comment-footer-replies{
	padding-bottom:20px;
}

.toggle-replies-btn {
    margin-top: 0;
}

.post-author {

}

.author-info.community {
margin-top:0;
}

.post-dropdown {
right:0;
}
.profile-content {
min-width:0;
}
.sub-sub-avatar {
    width: 50px;
    height: 50px;
}
.sub-sub-name {
    width: 70px;
}
.sub-sub-item {
    width: auto;
    padding: 5px 0;
}
.sub-sub-container {
    padding: 10px 5px;
    gap: 0;
    margin-top: 5px;
    width: min-content;
}
.profile-box-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    margin-bottom: 0px;
    box-shadow: 5px 10px 10px -5px rgba(0, 10, 90, 0.4);
    flex-direction:row;
    border-radius: 0;
    padding: 20px 0px;
    margin-bottom: 0px;
    margin-top: 10px;
    flex-direction: row;
    gap: 5px;
    width:100%;
justify-content: center;
}

.profile-subscriptions-container {
    background: none;
    backdrop-filter: none;
    border: none;
    padding: 0;
    box-shadow: none;
    margin-top: 0;
    width: auto;
    border-radius:0;
}

.profile-btn-icon {
    width:60px;
}
.remove-btn-size {
  width:55px;
}

.notifications-panel.show {
  width: min(380px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  right: 10px;
}

.lightbox-media {
  max-width: 100vw;
}

.utility-username {
display:none;
}

.utility-avatar {
display:none;
}

        .profile-pic-selector {
            width: 120px;
            height: 120px;
            border: 2px solid #8FDADB;
            border-radius: 8px;
            background: #edeff4;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .profile-pic-selector:hover {
            border-color: #6fc0c1;
            background: #e0e4e9;
        }

        .profile-pic-selector img {
            width: 40px;
            height: 40px;
            opacity: 0.5;
            margin-bottom: 5px;
        }
.auth-container {
padding:15px;
}

	.m-speech-bubble {
	font-size:10px;
	min-width:160px;
        bottom: 170px;
	}
	.mascot-dummy{
	width:100px;
	}
	.mascot-video{
	width:100px;
	}
    .mascot-dock-zone-left,
    .mascot-dock-zone-right {
        width: 72px;
    }
    .mascot-dock-zone-bottom {
        height: 72px;
    }
	.comment-attachment-video {
	max-width:160px;
	}

    .utility-bar {
        height: 20px;
        padding: 0 10px;
    }

    .utility-link {
        font-size: 11px;
    }

    .utility-left {
        gap: 15px;
    }

    .utility-username {
        font-size: 11px;
    }

    .utility-avatar {
        width: 16px;
        height: 16px;
    }

    .utility-logout {
        display: none !important;
    }

    .utility-profile {
        display: none !important;
    }
.user-menu-container {
display:block;
}

.comment-count-text {
display:none;
}
.new-postbutton {
width:auto;
font-size:14px;
padding: 10px 12px;
}

#library-view, #playlists-view {
 padding:10px;
}
.audio-item {
padding: 5px 6px;
}
.audio-item .audio-index {
width: 10px;
}
.audio-item .audio-actions {
opacity:1;
}
.audios-container {
width: 85%;
}
.audios-player {
width:100%;
margin-top: 90px;
top: 140px;
}

.profile-audio-box {
padding: 6px 12px;
font-size: 14px;
}

.profile-header {
min-width:auto;
}

.profile-right-name {
height: auto;
padding-left: 10px;
width: fit-content;
max-width: calc(100% - 20px);
flex-flow: row nowrap;
}

.profile-right-status {
padding-left:10px;
}

.profile-media-section {
    margin-top: 58px;
    padding: 12px;
}

.profile-media-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
}

.profile-media-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.profile-right-description {
	padding-left:10px;
	width:99%;
	margin-bottom: 110px;
}

.profile-right-name .profile-name-text {
    font-size: 24px;
    margin: 0;
    line-height: 1.1;
}

.profile-right-homecountry {
    bottom: 60px;
    font-size: 16px;
}

.profile-right-birthday {
    bottom: 20px;
    font-size: 16px;
    right: auto;
    border-radius: 12px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.profile-header-left {
    width: 200px;
    min-width: 200px;
}
.profile-pfp{
    width: 200px;
    top: 0;
    right: auto;
}
.profile-header-somethings{
    position: absolute;
    bottom: -50px;
    right: 0;
    display: flex;
    gap: 5px;
}
.profile-header-somethings-thing {
    padding: 6px;
    background: rgb(240 240 240);
}
.profile-header-morethings{
    padding: 9px 10px;
    left: 0;
}
.profile-header-lessthings:hover {
    filter: brightness(0.98);
}
.profile-neck-right-top {
    gap: 10px;
    padding: 10px;
}
.profile-neck-right {
    width: 100%;
    padding: 0;
    border-left-style: none;
    border-top-style: solid;
    padding-top: 10px;
}
.profile-audios-container {
    border-right: none;
    border-left: none;
    width: 100%;
}
.profile-neck-left {
  width: 90%;
  gap:8px;
}
.profile-header-somethings-thing > a {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.profile-neck {
    flex-direction: column;
    margin: 0;
    min-width: auto;
}

.profile-header-right {
    min-width: auto;
}

.community-header-subs {
        position: relative;
        right: auto;
        margin-top: -50px;
        margin-bottom: 70px;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 16px;
    padding-left: 50px;
    border-radius: 12px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    font-size: 20px;
    max-width: fit-content;
    color: #575757;
    /* position: absolute; */
    bottom: 20px;
    padding-left: 16px;
    flex-direction: row;
    border: none;
    }
.community-header-subs > label {
  font-size: 20px;
}
.community-header-subs > p {
    margin: 0;
    font-size: 20px;
    font-weight: normal;
    margin-left: 10px;
}
.community-header-right-type {
    bottom: 75px;
}
}

.post-pinned {
  position: relative;
  border-color: #6dc6ca;
  box-shadow: 0 0 0 3px rgba(109, 198, 202, 0.2), 0 8px 20px rgba(0, 10, 90, 0.18);
}

.post-pinned-badge {
  position: absolute;
  top: 8px;
  right: 44px;
  z-index: 2;
  padding: 4px 9px;
  border: 1px solid #5dbfc4;
  border-radius: 999px;
  background: #edf9fb;
  color: #315767;
  font-size: 11px;
  font-weight: 700;
}

.developer-badge,
.role-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  color: #163d70;
  line-height: 1;
  vertical-align: middle;
  cursor: help;
  overflow: visible;
  box-sizing: border-box;
}

.developer-badge > img,
.role-badge > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.developer-badge-compact,
.role-badge-compact {
  width: 19px;
  height: 19px;
}

.developer-badge-profile,
.role-badge-profile {
  width: 42px;
  height: 42px;
}

.role-name {
  min-width: 0;
  font-weight: 800;
  text-shadow: none !important;
  transition: color 0.15s ease;
}

.role-name-owner {
  color: #e52535 !important;
  text-shadow: none !important;
}

.role-name-developer {
  color: #238cf4 !important;
  text-shadow: none !important;
}

.role-name-moderator {
  color: #20a957 !important;
  text-shadow: none !important;
}

.role-identity-line,
.profile-right-name,
.comment-author-identity,
.friend-card-name-row,
.chat-card-name-row,
.notification-actor,
.lightbox-footer-username-row {
  display: inline-flex;
  align-items: center;
  flex-flow: row nowrap;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.role-identity-line {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap !important;
  vertical-align: middle;
}

.role-identity-line > .role-name,
.role-identity-line > a,
.role-identity-line > .profile-name-text,
.role-identity-line > .chat-partner-name {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.role-identity-line > .role-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  float: none;
  position: relative;
}

.profile-right-name .profile-name-text,
.comment-author-identity .role-name,
.friend-card-name-row .role-name,
.chat-card-name-row .role-name,
.notification-actor .role-name,
.lightbox-footer-username-row .role-name {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-right-name .role-badge,
.comment-author-identity > .role-badge,
.friend-card-name-row > .role-badge,
.chat-card-name-row > .role-badge,
.notification-actor > .role-badge,
.lightbox-footer-username-row > .role-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  float: none;
}

.profile-reset-avatar-btn {
  border-color: #a33 !important;
  color: #721c24 !important;
  background: linear-gradient(#fff5f5, #f1b8b8) !important;
}

.developer-badge::after,
.role-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(170px, calc(100vw - 24px));
  padding: 4px 7px;
  border: 1px solid rgba(49, 95, 156, 0.2);
  border-radius: 5px;
  background: #ffffff;
  color: #15141c;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
  text-align: center;
  text-shadow: none;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 1000;
}

.developer-badge:hover::after,
.developer-badge:focus-visible::after,
.developer-badge:active::after,
.role-badge:hover::after,
.role-badge:focus-visible::after,
.role-badge:active::after {
  opacity: 1;
}

.developer-badge:focus-visible,
.role-badge:focus-visible {
  outline: 3px solid rgba(49, 95, 156, 0.4);
  outline-offset: 2px;
}

@media (max-width: 600px), (pointer: coarse) {
  .developer-badge::after,
  .role-badge::after {
    bottom: calc(100% + 5px);
    max-width: min(150px, calc(100vw - 20px));
    padding: 3px 6px;
    font-size: 10px;
    line-height: 1.15;
  }

  .developer-badge:hover::after,
  .role-badge:hover::after {
    opacity: 0;
  }

  .developer-badge:focus-visible::after,
  .developer-badge:active::after,
  .role-badge:focus-visible::after,
  .role-badge:active::after {
    opacity: 1;
  }
}

.comment-notification-target {
  animation: comment-notification-highlight 3.2s ease-out;
  outline: 3px solid #5e9fd6;
  outline-offset: 4px;
  scroll-margin-block: 120px;
}

@keyframes comment-notification-highlight {
  0%, 35% { background-color: #fff3a6; }
  100% { background-color: transparent; }
}

.chat-feedmain {
  padding: 0;
  margin: 32px 30px 40px;
  height: calc(93dvh - 60px);
  background-color: #bccee2;
  max-width: none;
  width: min(65%, 1100px);
  min-width: 0;
  position: relative;
}

.post-page-feed {
  width: min(800px, calc(100% - 32px));
  min-width: 0;
  margin-inline: auto;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    border-bottom-style: none;
    padding-bottom: 100px;
}

.chats-page-shell {
  display: flex;
  flex-direction: row;
  width: 100%;
  margin-top: 20px;
}

.chats-sidebar {
  width: min(35%, 512px);
  min-width: 300px;
  max-width: 512px;
  margin-left: 0;
  padding: 0;
}

.chats-page-heading {
  display: flex;
  align-items: center;
  margin-top: -25px;
}

.chats-page-heading img {
  width: auto;
  height: 75px;
}

.chat-mobile-back {
  display: none;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 2px solid #8fdadb;
  border-radius: 10px;
  background: #fff;
  color: #315767;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 830px) {
  .chats-page-shell {
    display: block;
    width: 100%;
    height: calc(100dvh - 105px);
    margin-top: 0;
  }

  .chats-sidebar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .chats-page-heading {
    margin-top: 0;
    min-height: 66px;
    padding: 6px 12px;
  }

  .chats-page-heading img {
    height: 54px;
  }

  .chats-page-heading h2 {
    margin: 0;
    font-size: 20px;
  }

  .chats-page.mobile-chat-open .chats-sidebar {
    display: none;
  }

  .chat-feedmain {
    display: none;
    width: 100%;
    max-width: 100%;
    height: calc(100dvh - 105px);
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .chats-page.mobile-chat-open .chat-feedmain {
    display: flex !important;
  }

  .chat-mobile-back {
    display: inline-grid;
    place-items: center;
  }

  .chat-exit-btn {
    display: none;
  }

  .chat-header-info {
    gap: 8px;
    padding: 8px !important;
  }

  .chat-partner-info {
    flex: 1;
    min-width: 0;
  }

  .chat-partner-info > div {
    min-width: 0;
  }

  .chat-partner-name,
  .chat-partner-status {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .current-user-avatar {
    display: none;
  }

  .chat-messages-container {
    padding: 10px 4px !important;
  }

  .chat-message,
  .message {
    max-width: min(86%, 520px);
    overflow-wrap: anywhere;
  }

  .chat-attachment-image,
  .chat-attachment-video,
  .chat-attachment-audio {
    max-width: 100%;
  }

  .post-page-feed {
    width: 100%;
    margin-inline: 0;
  }
}

@media (max-width: 830px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }


  .feedmain,
  .profile-feedmain,
  .community-feedmain,
  .post-page-feed,
  .friends-container,
  .communities-page-container,
  .mod-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-inline: 0;
  }

  .profile-content,
  .profile-header,
  .profile-neck {
    min-width: 0;
    width: 100%;
  }

  .profile-header-contents {
    flex-direction: column;
        margin-top: 80px;
  }

  .profile-header-left,
  .profile-header-right {
    width: 100%;
    min-width: 0;
    border-right: 0;
  }

  .profile-header-left {
    min-height: 0;
    align-items: center;
    padding-bottom: 18px;
  }

  .profile-pfp,
  .profile-picture {
    width: min(200px, 80vw);
    height: min(200px, 80vw);
  }

  .profile-header-somethings {
    position: static;
    width: 100%;
    padding: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .profile-header-somethings-thing {
    flex: 1 1 30%;
    height: auto;
    border-top-style: solid;
    border-radius: 10px;
  }

  .profile-header-morethings,
  .profile-header-lessthings {
    position: static;
    width: 100%;
    height: auto;
    padding: 9px;
    border-top-style: solid;
    border-radius: 10px;
    text-align: center;
  }

  .profile-header-lessthings {
    display: none;
  }

  .profile-neck.open + .profile-header-lessthings {
    display: block;
    transform: none;
  }

  .profile-media-section {
    margin-top: 12px;
  }

  .post {
    width: calc(100% - 16px);
    min-width: 0;
    max-width: none;
    margin: 18px 8px 0;
  }

  .post-author,
  .author-author-section,
  .comment-header,
  .flag-card-header,
  .flag-card-actions {
    min-width: 0;
    max-width: 100%;
  }

  .post-content-row {
    margin-inline: 12px;
  }

  .post-pinned-badge {
    top: 6px;
    right: 38px;
  }

  .chats-layout {
    height: calc(100dvh - 105px);
  }

  .chats-list-panel,
  .chat-container-panel,
  .chat-stickers-panel {
    width: 100%;
    max-width: 100%;
        margin-top: 40px;
  }

  .chat-container-panel {
    border-right: 0;
        margin-top: 40px;
  }

  .chat-input-area {
    gap: 6px;
    padding: 8px;
  }

  .chat-input-area textarea,
  .chat-input-area input {
    min-width: 0;
    max-width: 100%;
  }

  .notifications-panel.show,
  .developer-moderation-panel {
    max-height: calc(100dvh - 120px);
  }

  .flag-card-actions > *,
  .friends-page-buttons > *,
  .announcement-form-actions > * {
    flex: 1 1 auto;
  }

  .developer-moderation-tools {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  .main-feed {
    margin-top: 0;
  }

  .mainpage-logo {
    display: block;
    width: min(90vw, 560px);
    max-width: 90vw;
    height: auto;
    margin-inline: auto;
  }

  #new-post-box {
    width: calc(100% - 16px) !important;
    min-width: 0;
    max-width: none;
    margin: 0 8px 16px !important;
    padding: 14px;
  }

  .post-creator-top-row {
    align-items: stretch;
    flex-direction: column;
  }

  .creator-user-info {
    min-width: 0;
  }

  .creator-username {
    max-width: calc(100vw - 110px);
    overflow: hidden;
    font-size: clamp(18px, 6vw, 24px);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .new-postbutton {
    width: 100%;
    min-height: 44px;
  }

  .feed-tabs {
    height: auto;
    min-height: 58px;
    gap: 8px;
    padding: 6px 8px;
  }

  .feed-select {
    min-width: 0;
    max-width: calc(100% - 62px);
    font-size: 17px;
  }

  .feed-settings-popup {
    right: 10px !important;
    left: 10px !important;
    width: auto;
    max-width: calc(100vw - 20px);
  }

  .new-post-overlay,
  .flag-modal-overlay,
  .add-lightbox-overlay {
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }

  .new-post-modal,
  .flag-modal,
  .add-lightbox {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 16px;
  }

  .new-post-modal .creator-avatar {
    width: 64px;
    height: 64px;
    object-fit: cover;
  }

  .new-post-modal .post-creator-files-row,
  .new-post-modal .creator-bottom-row {
    align-items: stretch;
    flex-direction: column;
  }

  .post-dropdown {
    right: 4px;
    left: auto;
    max-width: calc(100vw - 24px);
  }

  .comments-section {
    margin-inline: 8px;
  }

  .comment-content-row {
    margin-inline: 0;
  }

  .comment-attachment {
    width: 100%;
    max-width: 100%;
  }

  .comment-attachment-video,
  .comment-attachment-audio {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .profile-feedmain,
  .community-feedmain {
    margin-top: 0;
  }

  .profile-header {
    margin-top: 0;
    border-radius: 0;
  }

  .profile-pfp {
    position: static;
    inset: auto;
    margin: 12px auto;
  }

  .profile-header-right {
    position: relative;
    gap: 8px;
    padding: 12px 0 18px;
  }

  .profile-right-name,
  .profile-right-status,
  .profile-right-description,
  .profile-right-homecountry,
  .profile-right-birthday,
  .community-header-right-type,
  .community-header-right-bday,
  .community-header-subs {
    position: static;
    width: calc(100% - 16px);
    max-width: none;
    margin: 0 8px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .profile-right-name {
    display: inline-flex;
    min-height: 44px;
    height: auto;
    flex-flow: row nowrap;
    font-size: inherit;
  }

  .profile-right-name .profile-name-line {
    width: 100%;
  }

  .profile-right-name .profile-name-text {
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 42px);
    margin: 0;
    overflow: hidden;
    font-size: clamp(22px, 8vw, 32px);
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-right-name .role-badge {
    flex: 0 0 auto;
  }

  .profile-right-description {
    min-height: 0;
    margin-bottom: 0;
  }

  .profile-header-somethings {
    position: static;
    inset: auto;
  }

  .profile-neck {
    margin: 0;
    border-inline-width: 0;
  }

  .profile-neck-left,
  .profile-neck-right {
    width: 100%;
    padding: 12px;
  }

  .profile-neck-right-top {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-things-container {
    width: 100%;
  }

  .profile-feed {
    top: 0 !important;
    margin-top: 16px;
  }

  .community-header-subs {
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
  }

  .community-header-subs > label,
  .community-header-subs > p {
    margin: 0;
    font-size: 16px;
  }

  .communities-page-container {
    margin-top: 0;
    border-radius: 0;
  }

  .communities-page-container > h1,
  .communities-page-container h1 {
    overflow-wrap: anywhere;
    font-size: clamp(24px, 8vw, 34px);
  }

  .settings-container {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 12px;
    align-items: stretch;
  }

  .settings-container .feed-tabs,
  .communities-page-container .feed-tabs {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: thin;
  }

  .settings-container .feed-tabs > div,
  .communities-page-container .feed-tabs > div {
    width: max-content;
    min-width: 100%;
  }

  .settings-container .tab-btn,
  .communities-page-container .tab-btn {
    flex: 1 0 auto;
    min-width: max-content;
    padding-inline: 12px;
  }

  .setting-container {
    width: 100%;
    margin: 0 0 12px;
    padding: 12px;
  }

  .settings-bio-container {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-textarea,
  .setting-container textarea,
  .setting-container input:not([type="checkbox"]):not([type="radio"]),
  .setting-container select {
    display: block;
    width: 100% !important;
    max-width: 100%;
    margin: 6px 0 !important;
  }

  .setting-row,
  .seq-row {
    align-items: stretch !important;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin-inline: 0;
  }

  .settings-profile-picture {
    width: min(180px, 55vw);
    height: min(180px, 55vw);
  }

  .settings-background {
    height: min(150px, 38vw);
  }

  .friends-container,
  .communities-container {
    padding-inline: 0;
  }

  .friend-card {
    gap: 10px;
    padding: 10px;
  }

  .friend-card-avatar {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
  }

  .friend-card-info,
  .friend-card-name-row,
  .friend-card-name {
    min-width: 0;
    max-width: 100%;
  }

.profile-left-buttons {
  position:relative;
}


  .friend-card-name-row {
    flex-flow: row nowrap;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .friend-card-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .friend-card-btn { 
        height: 30%;
        font-size: 12px;
        padding: 6px 5px;
  }

  .notifications-panel {
    top: 105px;
    right: 8px;
    left: 8px;
    width: auto;
    max-width: none;
  }

  .notifications-content {
    max-height: calc(100dvh - 175px);
  }

  .notification-item {
    min-width: 0;
  }

  .notification-actor,
  .notification-text {
    min-width: 0;
  }

  .notification-actor {
    flex-flow: row nowrap;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .notification-text {
    overflow-wrap: anywhere;
  }

  .lightbox-content {
    justify-content: flex-start;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .lightbox-media-display {
    min-height: 0;
    height: calc(100dvh - 118px);
    padding: 50px 8px 8px;
  }

  .lightbox-footer {
    position: static;
    width: 100%;
    height: auto;
    min-height: 78px;
    gap: 8px;
    padding: 8px;
    align-items: stretch;
    flex-direction: column;
  }

  .lightbox-footer-left,
  .lightbox-footer-right {
    width: 100%;
    min-width: 0;
  }

  .lightbox-footer-right {
    flex-wrap: wrap;
  }

  .lightbox-footer-btn {
    flex: 1 1 auto;
  }

  .lightbox-close,
  #lightbox-close {
    top: max(8px, env(safe-area-inset-top));
    right: 10px;
    width: 44px;
    height: 44px;
    font-size: 34px;
  }

  .global-announcements-root {
    top: max(8px, env(safe-area-inset-top));
    width: calc(100vw - 16px);
  }

  .developer-moderation-panel {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 80px);
  }

  .feed-picker-edit {
    padding: 3px 8px;
    font-size: 11px;
  }
}


@media (prefers-reduced-motion: reduce) {
  .comment-notification-target {
    animation: none;
  }
}

.chat-attachment-audio-item {
    background: linear-gradient(90deg, rgb(223 238 246 / 50%) 0%, rgb(150 214 246 / 50%) 100%);
    padding: 10px;
    border-radius: 6px;
    border-style: outset;
    border-width: 2px;
    border-color: #bccee2;
    width: 100%;
    box-sizing: border-box;
}

.chat-attachment-audio-play-button {
    background: transparent;
    border: none;
    cursor: pointer;
    width: fit-content;
    aspect-ratio: 1/1;
}

.chat-attachment-audio-play-icon {
    width: 48px;
    aspect-ratio: 1/1;
}

.chat-attachment-audio-progress-container {
    width: 100%;
    display: flex;
    gap: 15px;
    align-items: center;

}



.chat-attachment-audio-progress-bar {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;

    outline: none;
    cursor: pointer;
    height: 6px;

    background-image: linear-gradient(#8FDADB, #8FDADB);
    background-color: rgba(0, 0, 0, 0.1);
    background-size: 0% 100%;
    background-repeat: no-repeat;
}

.chat-attachment-audio-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #8FDADB;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.chat-attachment-audio-progress-bar::-moz-range-thumb {
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #8FDADB;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.chat-attachment-audio-current-time, .chat-attachment-audio-duration {
    font-size: 14px;
    color: #666;
    font-variant-numeric: tabular-nums;
}

.chat-attachment-audio-current-time {
    padding-left: 10px;
}

.chat-attachment-audio-duration {
    padding-right: 20px;
}


.chat-attachment-audio-player {
    display: flex;
    align-items: center;
}

.chat-attachment-audio-name {
    font-size: 14px;
    font-weight: 500;
    color: #15141c
}

.chat-attachment-audio-artist {
    font-size: 12px;
    color: #666;
}

.chat-attachment-audio-actions {
    display: flex;
    gap: 5px;
}

.chat-attachment-audio-add-button {
    background: transparent;
    border: none;
    font-size: 16px;
    transition: background-color .2s ease;
    border-radius: 4px;
}

.chat-attachment-audio-add-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.chat-attachment-audio-download-button {
    background: transparent;
    border: none;
    color: #4CAF50;
    font-size: 16px;
    transition: background-color .2s ease;
    border-radius: 4px;
}

.chat-attachment-audio-download-button:hover {
    background-color: rgba(76, 175, 80, 0.1);
}


.chat-attachment-audio-top {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.chat-attachment-audio-volume {
    display: flex;
    align-items: center;
}

.chat-attachment-audio-volume-icon {
    width: 24px;
    height: 24px
}

.chat-attachment-audio-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    background-image: linear-gradient(#8FDADB, #8FDADB);
    background-color: rgba(0, 0, 0, 0.1);
    background-repeat: no-repeat;
    width: 80px;
    background-size: 0% 100%;
    cursor: pointer;

    border-radius: 2px;
    height: 4px;
}

.chat-attachment-audio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8FDADB;
    cursor: pointer;
}

.chat-attachment-audio-volume-slider::-moz-range-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8FDADB;
    cursor: pointer;
    border: none;
}

.reply-media-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.comment-media-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.comment-media-button {
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border-radius: 50%;
    transition: background-color .2s ease;
}

.comment-media-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.comment-media-button:hover > .comment-media-icon {
    width: 26px;
    height: 26px;
    opacity: 1;
}

.comment-media-icon {
    opacity: 0.5;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.role-name-sinner {
    color: #8232d1;
}

.mine .message-bubble::before {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -14px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 14px 14px 14px;
    border-color: transparent transparent #4e8f9c transparent;
}

.mine .message-bubble::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -12px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 14px 14px 14px;
    border-color: transparent transparent #bef1fc transparent;
}


.theirs .message-bubble::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -14px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 14px 0 14px 14px;
    border-color: transparent transparent rgb(103, 175, 136) transparent;
}

.theirs .message-bubble::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -12px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 14px 0 14px 14px;
    border-color: transparent transparent rgb(192, 252, 219) transparent;
}