
/* Fancy cursive font */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 30px 24px 110px;
    background: radial-gradient(circle at top, #111 0%, #050505 65%);
    color: #f0d670;
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

.header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 20px 28px;
    border-radius: 28px;
    background: #161616;
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 12px;
}

.logout a,
.help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    background: rgba(212, 175, 55, 0.16);
    color: #f0d670;
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.22),
                0 18px 38px rgba(0,0,0,0.18);
    transition: 0.2s ease;
}

.logout a:hover,
.help-btn:hover {
    background: #d4af37;
    color: #111;
}

.site-title a {
    align-items: center;
    color: #d4af37;
    font-family: 'Great Vibes', cursive;
    font-size: clamp(3rem, 4vw, 5rem);
    letter-spacing: 2px;
    text-shadow:
        0 0 18px rgba(212, 175, 55, 0.45),
        0 0 35px rgba(212, 175, 55, 0.2);
}

.site-title a:hover {
    color: #ffd46d;
}

.username
{
    font-size: 24px;
    color: #dd270b;
}
.logout a,
.help-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    background: rgba(212, 175, 55, 0.16);
    color: #f0d670;
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.22),
                0 18px 38px rgba(0,0,0,0.18);
    transition: 0.2s ease;
}

.logout a:hover,
.help-btn:hover {
    background: #d4af37;
    color: #111;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 18px;
}

.model-card {
    background: #141414;
    border-radius: 28px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 70px rgba(0,0,0,0.45);
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
    border-radius: 24px;
    background: #111;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.model-card:hover .image-wrapper img {
    transform: scale(1.03);
}

.placeholder {
    width: 100%;
    height: 100%;
    background: #181818;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #777;
    font-size: 0.95rem;
}

.medal {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 26px;
}

.model-name {
    display: block;
    margin-top: 12px;
    margin-bottom: 8px;
    text-align: center;
    position: relative;
    z-index: 10;

    /* readable on any background */
    text-shadow:
        -1px -1px 0 #000,
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}


.help-content,
.model-profile-content,
.chat-container,
.set-detail-content {
    border-radius: 28px;
    box-shadow: 0 28px 90px rgba(0,0,0,0.45);
}

.help-content {
    width: 100%;
    margin: auto;
    padding: 24px;
    color: #f0d670;
    border: none;
}

.help-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 24px;
    text-align: center;
}

.close-help {
    margin-top: 26px;
    width: 100%;
    padding: 14px;
    background: #d4af37;
    border: none;
    color: #111;
    font-weight: bold;
    cursor: pointer;
    border-radius: 16px;
}

    .help-panel {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(5, 5, 5, 0.92);
        backdrop-filter: blur(10px);
        z-index: 99999;
        padding: 0px;
        overflow-y: auto;
        justify-content: center;
        align-items: center;
    }

    .help-panel.visible {
        display: flex;
    }


    .package-card {
        background: #131313;
        border: 1px solid rgba(212, 175, 55, 0.16);
        border-radius: 24px;
        padding: 20px;
        text-align: center;
    }

    .package-card h3 {
        margin-bottom: 12px;
        color: #f0d670;
    }

    .package-card p {
        margin: 8px 0;
    }

    .primary-btn {
        padding: 12px 18px;
        border-radius: 16px;
        border: none;
        background: #d4af37;
        color: #111;
        cursor: pointer;
        margin-top: 12px;
        transition: background 0.2s ease;
    }

    .primary-btn:hover {
        background: #f5d96c;
    }


    .notifications-page,
    .feed-page {
        max-width: 1000px;
        margin: 0 auto 120px;
        padding: 24px;
        background: rgba(20, 20, 20, 0.95);
        border-radius: 28px;
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    }

    .notification-list,
    .feed-list {
        display: grid;
        gap: 20px;
        margin-top: 20px;
    }

    .notification-item,
    .feed-card {
        background: #131313;
        border: 1px solid rgba(212, 175, 55, 0.16);
        border-radius: 24px;
        padding: 20px;
    }

    .notification-item.unread {
        border-color: #d4af37;
    }

    .notification-title {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 700;
        color: #f0d670;
    }

    .notification-content {
        margin-top: 10px;
        color: #ddd;
        white-space: pre-wrap;
    }

    .footer-summary {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        flex-wrap: wrap;
    }

    .footer-actions {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 14px;
        flex-wrap: wrap;
    }

    .footer-action-btn {
        display: flex;
        align-items: center;   /* fixes vertical alignment */
        justify-content: center;
        gap: 8px;
        background: #222;
        border: 1px solid #3a2f14;
        padding: 6px 14px;
        border-radius: 8px;
        color: #d4af37;
        font-size: 16px;
    }


    .footer-action-btn:hover {
        background: #d4af37;
        color: #111;
        transform: translateY(-1px);
    }

    .footer-notifications {
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 12px;
        padding-right: 10px;
    }
    @media (max-width: 480px) {
    .footer-notifications {
        padding-right: 6px;
    }
}

    .chat-credits-summary {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: 8px;
        color: #f0d670;
        justify-content: space-between;
    }

    .footer-notifications span {
        display: inline-block;
    }

    .footer-notif-names {
        color: #fff;
        font-size: 14px;
    }

    .footer-credits, .reputation {
        font-size: 16px;
        padding: 6px 12px;
    }

    .notification-empty,
    .feed-empty {
        color: #ccc;
        margin-top: 16px;
    }

    .error-message {
        margin: 18px 0;
        padding: 14px;
        border-radius: 18px;
        background: rgba(255, 0, 0, 0.12);
        color: #ffb3b3;
    }
    .footer-icon {
    width: 22px;
    height: 22px;
    filter: invert(80%) sepia(60%) saturate(300%) hue-rotate(10deg); /* gold tint */
}

.model-profile-panel {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.91);
    backdrop-filter: blur(10px);
    z-index: 99999;
    padding: 22px 14px 28px;
    overflow: hidden;
}

.model-profile-content {
    position: relative;
    width: min(100%, 1120px);
    max-width: 1120px;
    margin: auto;
    padding: 32px;
    color: #f0d670;
    border: none;
    box-sizing: border-box;
}

.profile-panel-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 28px;
    align-items: start;
    margin-top: 24px;
}

.mobile-profile-footer {
    display: none;
}

.profile-left {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    padding-right: 10px;
}

.profile-left,
.profile-right,
.profile-sets-list,
.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 rgba(20, 20, 20, 0.8);
}

.profile-left::-webkit-scrollbar,
.profile-right::-webkit-scrollbar,
.profile-sets-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 12px;
}

.profile-left::-webkit-scrollbar-thumb,
.profile-right::-webkit-scrollbar-thumb,
.profile-sets-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 12px;
    border: 3px solid rgba(20, 20, 20, 0.95);
}

.profile-left::-webkit-scrollbar-track,
.profile-right::-webkit-scrollbar-track,
.profile-sets-list::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
    background: rgba(20, 20, 20, 0.9);
}

.profile-right {
    background: #141414;
    border-radius: 24px;
    padding: 22px;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    padding-right: 10px;
}

.profile-sets-header h3 {
    margin: 0;
    font-size: 16px;
}

.profile-sets-intro {
    margin: 10px 0 10px;
    color: #ccc;
}

.profile-sets-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 6px;
    max-height: calc(100vh - 360px);
    overflow-y: auto;
}

.profile-id-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    margin-top: 10px;
    border-radius: 6px;
    border: 1px solid #333;
}

.set-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 18px;
    align-items: stretch;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid rgba(212, 175, 55, 0.14);
    background: #111;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.set-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.set-thumbnail {
    width: 140px;
    min-height: 120px;
    height: 100%;
    max-width: 140px;
    overflow: hidden;
    border-radius: 18px;
    background: #0f0f0f;
}

.set-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.set-detail-thumbnail-wrapper {
    width: 100%;
    min-height: 220px;
    background: #171717;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.set-detail-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.set-detail-preview {
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
    max-height: 440px;
    cursor: zoom-in;
    display: block;
}

.set-detail-preview-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-instruction {
    color: #cfc2a1;
    font-size: 0.95rem;
    text-align: center;
}

.set-image-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100001;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.set-image-overlay.visible {
    display: flex;
}

.set-image-overlay img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.no-sets {
    color: #ccc;
    padding: 16px;
    border: 1px dashed #3a2f14;
    border-radius: 12px;
    background: #0c0c0c;
    min-height: 240px;
}

.set-card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.set-card-title {
    font-size: 1.05rem;
}

.set-card-meta {
    color: #cfc2a1;
}

.set-detail-button {
    width: fit-content;
    padding: 12px 18px;
    border-radius: 18px;
    border: none;
    background: #d4af37;
    color: #111;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 18px 34px rgba(212, 175, 55, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
}

.set-detail-button:hover {
    background: #ffd46d;
    transform: translateY(-1px);
}

.set-detail-modal {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(10px);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.set-detail-modal.active,
.set-detail-modal[style*="display: flex"] {
    display: flex;
}

.set-detail-content {
    max-width: 940px;
    padding: 30px;
}

.set-detail-top {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: flex-start;
}

.set-detail-thumbnail-wrapper {
    min-height: 240px;
}

.close-profile {
    position: absolute;
    top: 12px;
    right: 8px;
    color: #111;
    background: #7d2323;
    border: none;
    padding: 12px 16px;
    border-radius: 18px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 18px 36px rgba(0,0,0,0.18);
}

.close-profile:hover {
    background: #ffd46d;
}

.profile-avatar {
    width: 100%;
    max-width: 250px;
    max-height: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 28px;
    border: 2px solid rgba(212, 175, 55, 0.18);
    margin: 0 auto;
    box-shadow: 0 28px 70px rgba(0,0,0,0.35);
}

.profile-buttons {
    margin-top: 20px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.profile-btn {
    padding: 14px 20px;
    border-radius: 18px;
    background: rgba(212, 175, 55, 0.16);
    color: #f0d670;
    border: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.12), 0 12px 28px rgba(0,0,0,0.18);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    margin-bottom: 5px;
}

.profile-btn:hover {
    background: #d4af37;
    color: #111;
    transform: translateY(-1px);
}

.chat-container {
    width: min(100%, 860px);
    margin: 5px auto;
    padding: 28px;
    border: none;
}

.chat-header {
    margin-bottom: 5px;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.chat-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #d4af37;
}

.chat-messages {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-msg,
.model-msg {
    padding: 14px 18px;
    border-radius: 18px;
}

.user-msg {
    align-self: flex-end;
    background: #d4af37;
    color: #000;
    max-width: 72%;
}

.model-msg {
    align-self: flex-start;
    background: #1b1b1b;
    border: 1px solid rgba(212, 175, 55, 0.3);
    max-width: 72%;
}

.chat-input {
    display: flex;
    margin-top: 20px;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 14px;
    background: #0f0f0f;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    border-radius: 18px;
}

.chat-input button {
    padding: 14px 20px;
    background: #d4af37;
    border: none;
    color: #000;
    font-weight: bold;
    border-radius: 18px;
    cursor: pointer;
}

.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(17, 17, 17, 0.96);
    padding: 18px 22px;
    display: flex;
    justify-content: center;
    align-items: center;  
    color: #d4af37;
    font-size: 16px;
    z-index: 999;
    box-shadow: 0 -10px 35px rgba(0,0,0,0.45);
}
@media (max-width: 1080px) {
    .profile-panel-grid,
    .set-detail-top {
        grid-template-columns: 1fr;
    }

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

    .model-card {
        width: 100%;
    }

    .chat-container {
        width: min(100%, 94vw);
    }
}

@media (max-width: 900px) {
    .model-grid {
        grid-template-columns: 1fr;
        gap: 22px;
        max-width: 100%;
    }

    .model-card {
        width: 100% !important;
        max-width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        display: grid;
        grid-template-rows: 1fr auto;
        overflow: hidden;
        padding: 22px;
    }

    .image-wrapper {
        aspect-ratio: 1 / 1 !important;
        width: 100% !important;
        min-height: 0;
        height: auto;
    }

    .model-name {
        font-size: 1.8rem;
        margin-top: 16px;
    }

    .help-btn,
    .logout a,
    .profile-btn,
    .set-detail-button {
        font-size: 1.25rem;
        padding: 18px 22px;
    }

    body {
        font-size: 21px;
    }
}

@media (max-width: 768px) {
    .footer-bar {
        font-size: 12px;
    }

    body {
        padding: 18px 14px 140px;
        font-size: 18px;
    }

    .header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 24px 20px;
    }

    .header-right {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: auto !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
    }

    .help-btn,
    .logout a,
    .username {
        font-size: 10px !important;
        padding: 12px 16px !important;
        min-width: 0 !important;
        white-space: nowrap !important;
    }

    .model-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .model-card {
        width: 100%;
        aspect-ratio: 1 / 1;
        min-height: 0;
        max-height: none;
        display: grid;
        grid-template-rows: 1fr auto;
        overflow: hidden;
        padding: 18px;
    }

    .image-wrapper {
        aspect-ratio: 1 / 1;
        width: 100% !important;
        min-height: 0;
        height: auto;
    }

    .profile-avatar {
        max-width: 100%;
        height: auto;
    }

    .profile-sets-list {
        max-height: calc(100vh - 320px);
        gap: 18px;
        width: 100% !important;
        margin-top: 0 !important;
    }

    .set-card {
        grid-template-columns: 1fr;
    }

    .set-thumbnail {
        width: 100%;
        min-height: 220px;
        max-width: 100%;
    }

    .chat-container {
        padding: 10px;
    }

    .model-profile-content {
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        position: relative !important;
        padding-bottom: 0 !important;
        height: 90%;
        width: min(100%, calc(100vw - 32px));
        max-width: 100%;
        margin: 16px auto;
        padding: 20px;
    }

    .profile-left h2,
    .profile-sets-header h3,
    .set-card-title,
    .profile-btn,
    .set-detail-button,
    .profile-sets-intro,
    .username {
        font-size: 16px;
    }

    .profile-buttons {
        gap: 14px;
    }

    .set-detail-preview {
        max-height: 380px;
    }

    .profile-right {
        padding: 18px;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .model-profile-panel {
        align-items: flex-start;
        padding: 8px;
        overflow-y: auto;
    }

    .mobile-profile-footer {
        display: flex !important;
        justify-content: space-between;
        gap: 10px;
        position: sticky;
        bottom: 0;
        left: 0;
        width: 100%;
        border-top: 1px solid rgba(212, 175, 55, 0.16);
        padding: 12px 14px;
        z-index: 10000;
    }

    .mobile-profile-tab {
        flex: 1 1 0;
        min-width: 0;
        border-radius: 16px;
        border: none;
        padding: 14px 12px;
        font-family: inherit;
        font-weight: 700;
        background: rgba(212, 175, 55, 0.14);
        color: #f0d670;
        cursor: pointer;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .mobile-profile-tab.active {
        background: #d4af37;
        color: #111;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }

    .profile-panel-grid {
        grid-template-columns: 1fr;
    }

    .profile-left,
    .profile-right {
        width: 100%;
        padding-right: 0;
    }

    .model-profile-panel.mobile-view-left .profile-right,
    .model-profile-panel.mobile-view-right .profile-left {
        display: none !important;
    }

    .model-profile-panel.mobile-view-left .profile-left,
    .model-profile-panel.mobile-view-right .profile-right {
        display: flex !important;
    }
}

@media (max-width: 540px) {
    .site-title a {
        font-size: 24px;
    }

    body {
        font-size: 14px;
    }

    .header {
        padding: 10px 10px;
    }

    .header-right {
        justify-content: flex-start;
        gap: 10px;
        flex-wrap: wrap;
    }

    .help-btn,
    .logout a {
        width: auto;
        min-width: 120px;
        font-size: 12px;
        padding: 18px 22px;
    }

    .profile-btn,
    .set-detail-button {
        width: 60%;
        font-size: 12px;
        padding: 14px 12px;
    }

    .username {
        width: 100%;
        text-align: left;
        font-size: 16px;
    }

    .footer-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 18px 16px;
    }

    .chat-input {
        flex-direction: column;
    }

    .chat-input button,
    .chat-input input {
        width: 100%;
    }

    .profile-buttons {
        gap: 12px;
    }

    .model-profile-content {
        padding: 18px;
    }

    .profile-left h2,
    .profile-sets-header h3,
    .set-card-title,
    .profile-sets-intro,
    .profile-btn,
    .set-detail-button {
        font-size: 16px;
    }

    .model-card {
        padding: 24px;
    }

    .model-name {
        font-size: 1.4rem;
    }
}

body.modal-open {
    overflow: hidden;
    position: relative;
    height: 100%;
    touch-action: none;
}

.set-detail-modal {
    overflow: auto;
}

.set-detail-modal .set-detail-content {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.telegram-btn {
    justify-content: center;
    align-items: center;
}

.telegram-icon {
    width: 20px;
    margin-right: 8px;
}
#profile-telegram-btn {
    display: none;
}

.model-card {
    position: relative;
}

.favorite-btn {
    position: absolute;
    top: 6px;
    left: 12px;
    font-size: 26px;
    cursor: pointer;
    z-index: 20; /* ⭐ puts star above avatar */
    color: rgb(255, 255, 255);
    transition: 0.2s;
}

.favorite-btn.active {
    color: #ffc400;            /* gold star */
    -webkit-text-stroke: 1px black;  /* black outline */
}

.image-wrapper {
    position: relative;
    z-index: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* USER MENU WRAPPER */
.user-menu {
    position: relative;
}

/* USER MENU BUTTON (USERNAME + DOTS) */
.user-menu-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
}

/* PILL STYLE FOR USERNAME BUTTON */
.user-menu-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 20px;
    cursor: pointer;
    border: none;
    background: rgba(255,255,255,0.08);
    transition: background 0.2s ease, transform 0.1s ease;
}

.user-menu-pill:hover {
    background: rgba(255,255,255,0.15);
}

.user-menu-pill:active {
    transform: scale(0.97);
}

/* THREE DOTS ICON */
.menu-dots {
    font-size: 18px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.user-menu-pill:hover .menu-dots {
    opacity: 1;
}

.user-menu.show .menu-dots {
    transform: scale(1.2);
}

/* DROPDOWN MENU */
.user-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 42px;
    background: #222;
    border: 1px solid #444;
    border-radius: 8px;
    min-width: 200px;
    padding: 6px 6px;
    z-index: 100;
}

.user-menu-dropdown a {
    display: block;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.user-menu-dropdown a:hover {
    background: #333;
}

.user-menu.show .user-menu-dropdown {
    display: block;
}

.tip-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.tip-modal.show {
    display: flex;
}

.tip-modal-content {
    background: #1e1e1e;
    padding: 20px 25px;
    border-radius: 10px;
    width: 300px;
    text-align: center;
    border: 1px solid #444;
}

.tip-modal-content h3 {
    margin-bottom: 15px;
    color: white;
}

#tipAmount {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #111;
    color: white;
    margin-bottom: 15px;
}

.tip-modal-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.tip-cancel,
.tip-send {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-weight: bold;
}

.tip-cancel {
    background: #333;
    color: white;
}

.tip-send {
    background: #ffcc00;
    color: black;
}

.tip-error {
    color: #ff6666;
    font-size: 14px;
    margin-bottom: 10px;
    min-height: 18px;
}

img {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}



.mark-read-btn {
    background: linear-gradient(135deg, #4a90e2, #357ABD);
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    margin: 15px 0;
    width: 50%;
    align-self: center;
}

.mark-read-btn:hover {
    background: linear-gradient(135deg, #5aa0f2, #3f86d1);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}

.mark-read-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}