@font-face {
    font-family: 'TwitterChirp';
    src: url('fonts/Chirp-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'TwitterChirp';
    src: url('fonts/Chirp-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'TwitterChirp';
    src: url('fonts/Chirp-Heavy.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
}

html, body {
    font-family: TwitterChirp, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    overscroll-behavior: none;
    touch-action: pan-y;
}

* {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

li, button, a, [role="button"] {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

input, textarea, select {
    font-size: 16px !important;
}

.nav-item-active {
    background: rgba(255, 255, 255, 0.1) !important;
    font-weight: bold;
}

.custom-dropdown .dropdown-menu {
    transform-origin: top right;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    display: block !important;
}

.custom-dropdown .dropdown-menu.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@media (max-width: 1023px) {
    .header h1 {
        font-size: 18px !important;
    }
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#post-textarea {
    transition: height 0.1s ease-in-out;
}

#chat-messages p {
    word-break: break-word;
    overflow-wrap: break-word;
}

.group-like:hover .fa-heart, .liked .fa-heart {
    color: #f91880;
}
.group-repost:hover .fa-retweet, .reposted .fa-retweet {
    color: #00ba7c;
}
.group-comment:hover .fa-comment {
    color: #1d9bf0;
}
.group-view:hover .fa-chart-bar {
    color: #1d9bf0;
}

.liked .heart-icon {
    font-weight: 900 !important;
}

.post-link {
    color: #1d9bf0;
    text-decoration: none;
}

.post-item {
    position: relative;
    z-index: 1;
}

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

.shimmer {
    background: #16181c;
    background-image: linear-gradient(
        to right,
        #16181c 0%,
        #212428 20%,
        #16181c 40%,
        #16181c 100%
    );
    background-repeat: no-repeat;
    background-size: 800px 100%;
    display: inline-block;
    position: relative;
    animation: shimmer 1.5s linear infinite;
}

.chat-blur-active {
    filter: blur(12px) grayscale(0.2);
    transition: filter 0.3s ease;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-name {
    width: 120px;
    height: 14px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-handle {
    width: 80px;
    height: 12px;
    border-radius: 4px;
}

.skeleton-text {
    width: 100%;
    height: 12px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.skeleton-image {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    margin-top: 12px;
}

.skeleton-button {
    width: 80px;
    height: 32px;
    border-radius: 9999px;
}

#emoji-list::-webkit-scrollbar {
    width: 6px;
}
#emoji-list::-webkit-scrollbar-track {
    background: transparent;
}
#emoji-list::-webkit-scrollbar-thumb {
    background: #2f3336;
    border-radius: 10px;
}
#emoji-list::-webkit-scrollbar-thumb:hover {
    background: #3e4144;
}

.poll-bar {
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.poll-option {
    user-select: none;
}
.poll-option:active {
    background: rgba(29, 155, 240, 0.1);
}

.poll-checkbox {
    transition: all 0.2s ease;
}

.message-row {
    position: relative;
    border-bottom: 1px solid transparent;
}

.message-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
    background: black;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.message-row:hover .message-actions {
    opacity: 1;
}

@media (max-width: 600px) {
    .sidebar.hidden-mobile {
        display: none !important;
    }
}

.reaction-picker {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #000;
    border: 1px solid #2f3336;
    border-radius: 9999px;
    padding: 2px 8px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    flex-direction: row;
    gap: 4px;
    width: 220px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    margin-bottom: 4px;
}

.reaction-picker::-webkit-scrollbar {
    display: none;
}

.reaction-picker.active {
    display: flex;
}

.reaction-btn {
    font-size: 18px;
    padding: 4px;
    border-radius: 50%;
    transition: transform 0.15s ease-out;
    background: transparent !important;
}

.reaction-btn:hover {
    transform: scale(1.15);
    background: transparent !important;
}

.reaction-badge {
    background: rgba(255,255,255,0.05);
    border: 1px solid #2f3336;
    border-radius: 9999px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #71767b;
    margin-top: 4px;
    cursor: pointer;
    transition: all 0.2s;
    width: fit-content;
}

.reaction-badge:hover {
    background: rgba(255,255,255,0.1);
    border-color: #71767b;
}

.bio-block {
    padding: 40px 16px;
    text-align: center;
    border-bottom: 1px solid #2f3336;
    margin-bottom: 20px;
}

.bio-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 12px;
    object-fit: cover;
}

.bio-name {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2px;
}

.bio-handle {
    color: #71767b;
    font-size: 15px;
    margin-bottom: 12px;
}

.bio-text {
    color: #fff;
    font-size: 15px;
    line-height: 20px;
    margin-bottom: 12px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.bio-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    color: #71767b;
    font-size: 14px;
    margin-bottom: 20px;
}

.bio-view-profile {
    background: #eff3f4;
    color: #0f1419;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 14px;
    transition: background 0.2s;
}

.bio-view-profile:hover {
    background: #d7dbdc;
}

.poll-option.bg-\[\#1d9bf0\]\/10 .poll-checkbox {
    background: #1d9bf0;
    border-color: #1d9bf0;
}

.poll-option.bg-\[\#1d9bf0\]\/10 .poll-checkbox i {
    display: block !important;
    color: white;
}

.post-link {
    color: #1d9bf0 !important;
}

.post-link:hover {
    text-decoration: underline !important;
}

.profile-tabs .tab {
    position: relative;
    padding: 15px 0;
    cursor: pointer;
    color: #71767b;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s;
}

.profile-tabs .tab:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.profile-tabs .tab.active {
    color: #e7e9ea;
    font-weight: bold;
}

.profile-tabs .tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 4px;
    background-color: #1d9bf0;
    border-radius: 9999px;
}

@media (max-width: 1280px) {
}

#right-sidebar.hidden-sidebar {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

#right-sidebar {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#main-layout.no-trends {
    grid-template-columns: 220px 1fr !important;
}

@media (max-width: 1300px) {
    #main-layout.no-trends {
        grid-template-columns: 88px 1fr !important;
    }
}
@media (max-width: 600px) {
    #main-layout.no-trends {
        grid-template-columns: 1fr !important;
    }
}

.nsfw-blur {
    filter: blur(50px);
    pointer-events: none;
    user-select: none;
    transition: filter 0.3s ease;
    overflow: hidden;
    position: relative;
    max-height: 400px;
}

.nsfw-overlay {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nsfw-overlay:hover {
    background-color: rgba(22, 24, 28, 0.8) !important;
}

.nsfw-overlay:hover i {
    transform: scale(1.1);
}

.nsfw-overlay i {
    transition: transform 0.2s ease;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

.nsfw-overlay .text-white {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.nsfw-overlay button, .nsfw-overlay div.bg-white {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.nsfw-overlay:hover div.bg-white {
    transform: scale(1.05);
    background-color: #eff3f4;
}

emoji-picker {
    --num-columns: 8;
    --emoji-size: 1.5rem;
    --background: #000000;
    --border-color: transparent;
    --outline-color: #1d9bf0;
    --category-font-size: 0.9rem;
    --border-radius: 16px;
    height: 350px;
    width: 320px;
    border-radius: 16px;
    overflow: hidden;
}

#emoji-picker-container, #emoji-picker-popover {
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    border: 1px solid #2f3336;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

emoji-picker {
    --border-size: 0;
    --background: #000;
    --num-columns: 8;
    --emoji-size: 1.5rem;
    height: 300px !important;
    width: 100% !important;
}

emoji-picker::part(search-row) {
    display: none;
}

emoji-picker::part(nav-row) {
    display: none;
}

emoji-picker::part(category-header) {
    padding: 8px;
    font-size: 12px;
    color: #71767b;
}

#comment-textarea {
    transition: height 0.1s ease;
    min-height: 40px;
}

#comments-modal .modal-glass {
    background: #000 !important;
    border: 1px solid #2f3336;
}

#comments-list > div:last-child {
    border-bottom: none;
}

@media (max-width: 600px) {
    #notification-popup-container {
        top: 0;
        bottom: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        align-items: center !important;
        pointer-events: none;
    }

    .toast-mobile {
        width: calc(100% - 20px) !important;
        max-width: 100% !important;
        transform: translateY(-100px);
        margin-bottom: 8px !important;
        border-radius: 16px !important;
        touch-action: pan-y;
        user-select: none;
        pointer-events: auto;
    }

    .toast-mobile.active {
        transform: translateY(0);
    }

    .toast-mobile.swiping {
        transition: none !important;
    }
}

.call-modal-minimized {
    width: auto !important;
    min-width: unset !important;
    max-width: 95vw !important;
    height: auto !important;
    padding: 8px !important;
    background: rgba(15, 15, 15, 0.95) !important;
    backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 999px !important;
    cursor: move;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6) !important;
    overflow: hidden;
}

.call-modal-minimized #call-avatar-wrapper {
    margin-bottom: 0 !important;
    order: 1 !important;
}

.call-modal-minimized #call-avatar-wrapper.video-mode {
    margin-bottom: 0 !important;
}

.call-modal-minimized #call-avatar-container {
    width: 42px !important;
    height: 42px !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
}

.call-modal-minimized #call-avatar-wrapper.video-mode #call-avatar-container {
    width: 42px !important;
    height: 42px !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
}

.call-modal-minimized #call-type-icon {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    border-width: 2px !important;
}

.call-modal-minimized #call-type-icon i {
    font-size: 9px !important;
}

.call-modal-minimized #call-avatar-wrapper.video-mode #call-type-icon {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    border-width: 2px !important;
}

.call-modal-minimized #call-avatar-wrapper.video-mode #call-type-icon i {
    font-size: 9px !important;
}

.call-modal-minimized #call-user-name {
    display: block !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    margin-bottom: 0 !important;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    order: 2 !important;
}

.call-modal-minimized #call-user-name.video-mode {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    margin-bottom: 0 !important;
    max-width: 100px;
}

.call-modal-minimized #call-status {
    display: block !important;
    font-size: 13px !important;
    margin-bottom: 0 !important;
    color: #71767b !important;
    white-space: nowrap;
    order: 4 !important;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-modal-minimized #call-status.video-mode {
    font-size: 13px !important;
    margin-bottom: 0 !important;
    max-width: 100px;
}

.call-modal-minimized #call-timer {
    display: block !important;
    margin: 0 5px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: white !important;
    opacity: 1 !important;
    order: 3 !important;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.call-modal-minimized #btn-reject-call {
    display: flex !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    background: #f4212e !important;
    box-shadow: none !important;
    border-radius: 50% !important;
    justify-content: center !important;
    align-items: center !important;
}

.call-modal-minimized #btn-reject-call i {
    font-size: 14px !important;
}

@media (max-width: 640px) {
    .call-modal-minimized #call-user-name,
    .call-modal-minimized #call-status,
    .call-modal-minimized #call-timer,
    .call-modal-minimized #btn-reject-call {
        display: none !important;
    }
}

.call-modal-minimized #call-main-content {
    flex-direction: row !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 0 !important;
    width: auto !important;
}

.call-modal-minimized #call-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    background: none !important;
    order: 6 !important;
}

.call-modal-minimized #call-maximize-btn {
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    order: 5 !important;
    flex-shrink: 0;
    margin: 0 !important;
    border-radius: 50% !important;
    justify-content: center !important;
    align-items: center !important;
}

.call-modal-minimized #call-maximize-btn i {
    font-size: 14px !important;
}

.call-modal-minimized #btn-toggle-mute:not(.hidden) {
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 50% !important;
}

.call-modal-minimized #btn-toggle-mute i {
    font-size: 13px !important;
}

.call-modal-minimized #btn-accept-call {
    display: none !important;
}

#call-modal-container.video-call-mode {
    max-width: 660px !important;
}

#call-avatar-wrapper.video-mode {
    margin-bottom: 16px !important;
}

#call-avatar-wrapper.video-mode #call-avatar-container {
    width: 80px !important;
    height: 80px !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
}

#call-avatar-wrapper.video-mode #call-type-icon {
    width: 28px !important;
    height: 28px !important;
    border-width: 3px !important;
}

#call-avatar-wrapper.video-mode #call-type-icon i {
    font-size: 12px !important;
}

#call-user-name.video-mode {
    font-size: 19px !important;
    font-weight: 800 !important;
    margin-bottom: 4px !important;
}

#call-status.video-mode {
    font-size: 14px !important;
    margin-bottom: 8px !important;
}

#call-video-container {
    position: relative;
}

.call-modal-minimized #call-video-container,
.call-modal-minimized #call-header-controls {
    display: none !important;
}

.call-modal-minimized #call-type-icon {
    width: 16px !important;
    height: 16px !important;
    border-width: 2px !important;
}

.call-modal-minimized #call-type-icon i {
    font-size: 10px !important;
}

#call-timer {
    font-family: inherit !important;
}

#btn-accept-call,
#btn-reject-call {
    flex-shrink: 0 !important;
}

#call-modal-container {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

@media (max-width: 640px) {
    body.modal-open {
        overflow: hidden !important;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .modal-glass {
        width: 100% !important;
        max-width: 100vw !important;
        height: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        border: none !important;
    }
    
    .fixed.flex.items-center.justify-center {
        align-items: flex-start !important;
    }

    #comments-modal .modal-glass {
        height: 100vh !important;
    }

    #call-modal-container {
        width: 100% !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        padding: 60px 24px 80px !important;
        justify-content: space-between !important;
    }

    #call-modal-container.video-call-mode {
        padding: 30px 10px 40px !important;
    }

    #call-modal-overlay {
        background: #000 !important;
        backdrop-filter: none !important;
    }

    #call-main-content {
        height: 100% !important;
        justify-content: center !important;
        gap: 0 !important;
    }

    #call-header-controls {
        top: 16px !important;
        right: 16px !important;
    }

    #call-header-controls button {
        width: 40px !important;
        height: 40px !important;
    }

    #call-avatar-wrapper {
        margin-top: 0 !important;
        margin-bottom: 12px !important;
    }

    #call-avatar-container {
        width: 110px !important;
        height: 110px !important;
        border-width: 2px !important;
    }

    #call-type-icon {
        width: 36px !important;
        height: 36px !important;
        bottom: -6px !important;
        right: -6px !important;
        border-width: 3px !important;
    }

    #call-type-icon i {
        font-size: 14px !important;
    }

    #call-user-name {
        font-size: 26px !important;
        margin-bottom: 2px !important;
    }

    #call-status {
        font-size: 16px !important;
        margin-bottom: 4px !important;
        color: #71767b !important;
    }

    #call-timer {
        font-size: 17px !important;
        margin-top: 0 !important;
        margin-bottom: 32px !important;
    }

    #call-actions {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        gap: 32px !important;
        margin-top: 0 !important;
        padding-bottom: env(safe-area-inset-bottom, 16px) !important;
    }

    #btn-toggle-mute,
    #btn-accept-call,
    #btn-reject-call {
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    #btn-toggle-mute,
    #btn-accept-call {
        width: 56px !important;
        height: 56px !important;
    }

    #btn-toggle-mute i,
    #btn-accept-call i {
        font-size: 22px !important;
    }

    #btn-reject-call {
        width: 56px !important;
        height: 56px !important;
    }

    #btn-reject-call i {
        font-size: 24px !important;
    }

    #call-avatar-wrapper.video-mode {
        margin-top: 0 !important;
        margin-bottom: 8px !important;
    }
    
    #call-user-name.video-mode {
        font-size: 22px !important;
        margin-bottom: 2px !important;
    }

    #call-status.video-mode {
        font-size: 15px !important;
        margin-bottom: 4px !important;
    }

    #call-video-container {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 85vh !important;
        margin-bottom: 12px !important;
        border-radius: 20px !important;
        aspect-ratio: 9/19.5 !important;
    }

    #local-video {
        width: 100px !important;
        aspect-ratio: 9/19.5 !important;
        bottom: 8px !important;
        right: 8px !important;
        border-radius: 12px !important;
        border-width: 3px !important;
    }

    #call-flip-camera-btn {
        width: 44px !important;
        height: 44px !important;
        top: 16px !important;
        right: 16px !important;
    }

    #call-modal-container.call-modal-minimized {
        top: 62px !important;
        right: 8px !important;
        bottom: auto !important;
        left: auto !important;
        width: auto !important;
        height: auto !important;
        max-width: 80px !important;
        min-width: unset !important;
        padding: 8px !important;
        border-radius: 40px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        justify-content: center !important;
        position: fixed !important;
    }

    #call-modal-container.call-modal-minimized #call-main-content {
        height: auto !important;
        flex-direction: column !important;
        gap: 4px !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .call-modal-minimized #call-avatar-container {
        width: 38px !important;
        height: 38px !important;
    }

    .call-modal-minimized #call-maximize-btn,
    .call-modal-minimized #btn-toggle-mute:not(.hidden) {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        margin: 0 !important;
    }

    .call-modal-minimized #call-actions {
        flex-direction: column !important;
        gap: 4px !important;
    }
}
