:root {
    --bg-main: #080a0f;
    --bg-card: #12151d;
    --bg-hover: #1a1f2c;
    --bg-elevated: #1a1f2c;
    --border: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 242, 254, 0.25);
    --text-main: #ffffff;
    --text-secondary: #8b949e;
    --text-muted: #7d8590;
    --accent: #00f2fe;
    --accent-hover: #4facfe;
    --accent-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    --like-color: #ffffff;
    --share-color: #00ba7c;
    --glass-blur: blur(16px);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    min-height: 100vh;
}

/* --- Left Sidebar --- */
.sidebar-left {
    width: 25%;
    padding: 20px 10px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
}

.brand-logo {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 21px;
    font-weight: 900;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    letter-spacing: 0.8px;
    border-radius: 16px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-logo:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
    filter: drop-shadow(0 0 16px rgba(0, 210, 255, 0.35));
}

.brand-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    object-fit: cover;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.4), 0 0 20px rgba(168, 85, 247, 0.25);
    border: 1px solid rgba(0, 210, 255, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brand-logo:hover .brand-logo-img {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 0 18px rgba(0, 210, 255, 0.6), 0 0 28px rgba(168, 85, 247, 0.4);
}

.brand-logo-text {
    display: flex;
    align-items: center;
    line-height: 1;
}

.brand-kan {
    color: #ffffff;
    font-weight: 900;
}

.brand-loop {
    background: linear-gradient(135deg, #00d2ff 0%, #1d9bf0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.brand-hub {
    background: linear-gradient(135deg, #b05bf7 0%, #f91880 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.sidebar-profile-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px 25px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 15px;
}

.sidebar-profile-pic {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    margin-bottom: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.sidebar-profile-pic:hover {
    filter: brightness(0.8);
}

.sidebar-username {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 12px;
    cursor: pointer;
    word-break: break-all;
}

.sidebar-username:hover {
    text-decoration: underline;
}

.sidebar-stats {
    display: flex;
    gap: 20px;
    font-size: 15px;
    color: var(--text-muted);
}

.sidebar-stats span {
    cursor: pointer;
    transition: 0.2s;
}

.sidebar-stats span:hover {
    color: var(--text-main);
    text-decoration: underline;
}

.sidebar-left a,
.sidebar-left .menu-item-custom {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 19px;
    font-weight: bold;
    border-radius: 30px;
    margin-bottom: 5px;
    transition: 0.2s;
    cursor: pointer;
}

.sidebar-left a:hover,
.sidebar-left .menu-item-custom:hover {
    background-color: rgba(231, 233, 234, 0.1);
}

.menu-icon {
    font-size: 24px;
    margin-right: 20px;
    width: 30px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.menu-icon svg {
    width: 25px;
    height: 25px;
    color: #ffffff;
    stroke: #ffffff;
    stroke-width: 2;
    transition: transform 0.15s ease;
    display: block;
}

.sidebar-aura-svg {
    filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.7));
}

.sidebar-left a:hover .menu-icon svg,
.sidebar-left .menu-item-custom:hover .menu-icon svg {
    transform: scale(1.08);
}

.menu-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 12px;
    position: absolute;
    top: -5px;
    right: -4px;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000000;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
    z-index: 10;
}

/* --- Main Feed --- */
.main-feed {
    width: 50%;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    min-height: 100vh;
    padding-bottom: 60px;
}

.header-top {
    padding: 15px 20px;
    font-size: 20px;
    font-weight: bold;
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border);
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-main);
}

.back-btn:hover {
    background-color: rgba(231, 233, 234, 0.1);
}

.feed-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-top: 15px;
}

.feed-tabs a {
    flex: 1;
    text-align: center;
    padding: 15px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
    position: relative;
}

.feed-tabs a:hover {
    background-color: var(--bg-hover);
}

.feed-tabs a.active {
    color: var(--text-main);
}

.feed-tabs a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 4px;
}

/* --- Post Form Box --- */
.post-box {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 15px;
}

.profile-pic-small {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.post-form {
    width: 100%;
}

.post-form textarea {
    width: 100%;
    border: none;
    font-size: 19px;
    outline: none;
    resize: none;
    min-height: 80px;
    font-family: inherit;
    background: transparent;
    color: var(--text-main);
    line-height: 1.5;
}

.post-form textarea::placeholder {
    color: var(--text-muted);
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    gap: 12px;
    flex-wrap: wrap;
}

.post-tools-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
}

.post-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 8px 22px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.post-btn:hover {
    background-color: var(--accent-hover);
}

.post-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 🌌 Sci-Fi Cyber Post Button */
.cyber-post-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #00f2fe 0%, #1d9bf0 100%) !important;
    color: #000000 !important;
    font-weight: 800 !important;
    padding: 8px 26px !important;
    border-radius: 25px !important;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.45);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cyber-post-btn:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.8), 0 0 40px rgba(0, 242, 254, 0.3) !important;
    filter: brightness(1.1);
}

.cyber-post-btn:active {
    transform: scale(0.95);
}

.cyber-post-btn .cyber-btn-glare {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg, transparent 40%, rgba(255, 255, 255, 0.6) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease-in-out;
    pointer-events: none;
}

.cyber-post-btn:hover .cyber-btn-glare {
    transform: translateX(100%);
}

.upload-btn-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.btn-upload-custom {
    background: #16181c;
    color: #1d9bf0;
    border: 1px solid #2f3336;
    padding: 6px 14px;
    border-radius: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    font-size: 13px;
}

.btn-upload-custom:hover {
    background: rgba(29, 155, 240, 0.1);
    border-color: rgba(29, 155, 240, 0.4);
}

.btn-upload-video {
    color: #00ba7c;
}

.btn-upload-video:hover {
    background: rgba(0, 186, 124, 0.1);
}

/* --- Media Preview --- */
#preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.preview-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-badge-video {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.75);
    color: #00ba7c;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 6px;
    pointer-events: none;
    max-width: calc(100% - 8px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #f91880;
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer !important;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    padding: 0;
    transition: transform 0.15s ease, background 0.15s ease;
    z-index: 30 !important;
    pointer-events: auto !important;
}

.btn-remove-preview:hover {
    background-color: #ff2b90;
    transform: scale(1.15);
}

.preview-wrapper.preview-video-item {
    cursor: pointer;
    border: 1px solid #00ba7c;
}

.preview-overlay-action {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.2s;
    color: #fff;
    font-size: 20px;
    pointer-events: none;
    z-index: 5;
}

.preview-wrapper:hover .preview-overlay-action {
    opacity: 1;
}

.btn-trim-quick {
    background: #16181c;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-trim-quick:hover {
    border-color: #00ba7c;
    background: rgba(0, 186, 124, 0.1);
}

/* --- Post Item --- */
.post-item {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: background 0.2s;
    transform: translateZ(0);
    contain: style;
}

@media (hover: hover) {
    .post-item:hover {
        background-color: var(--bg-hover);
    }
}

.post-content-container {
    flex: 1;
    min-width: 0;
}

.post-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.post-author {
    font-weight: bold;
    color: var(--text-main);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    line-height: 1.4;
}

.author-display-name {
    font-weight: 700;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    margin-right: 2px;
    transition: color 0.15s ease;
}

.author-display-name:hover {
    text-decoration: underline;
}

.author-handle {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
    cursor: pointer;
    margin-left: 2px;
    transition: color 0.15s ease;
}

.author-handle:hover {
    color: var(--accent);
}

.post-dot {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 2px;
}

.post-time {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    white-space: nowrap;
}

.btn-follow {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid #38444d;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
    margin-left: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap !important;
    min-width: 86px !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.btn-follow:active {
    transform: scale(0.92);
}

.btn-follow.following {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    min-width: 86px !important;
}

.btn-follow.following:hover {
    color: #f91880 !important;
    border-color: rgba(249, 24, 128, 0.5) !important;
    background-color: rgba(249, 24, 128, 0.1) !important;
}

.btn-follow:not(.following):hover {
    border-color: var(--accent);
    color: #ffffff;
    background-color: rgba(0, 242, 254, 0.1);
}

.pinned-post-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(90deg, rgba(0, 242, 254, 0.12), rgba(0, 242, 254, 0.03));
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: #00f2fe;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
    user-select: none;
}
.pinned-post-badge svg {
    filter: drop-shadow(0 0 5px rgba(0, 242, 254, 0.6));
    flex-shrink: 0;
}

.post-pinned-card {
    border-left: 3px solid #00f2fe;
    background: rgba(0, 242, 254, 0.02);
}

.post-options {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.post-option-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.post-option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: scale(1.08);
}

.post-option-btn.pin-btn:hover {
    background: rgba(0, 242, 254, 0.12);
    border-color: rgba(0, 242, 254, 0.3);
    color: #00f2fe;
}

.post-option-btn.pin-btn.pinned {
    background: rgba(0, 242, 254, 0.15) !important;
    border: 1px solid #00f2fe !important;
    color: #00f2fe !important;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.35);
}

.post-option-btn.pin-btn.pinned svg {
    fill: #00f2fe !important;
    stroke: #00f2fe !important;
    filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.8));
}

.post-content {
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 15px;
    word-break: break-word;
}

.hashtag {
    color: var(--accent);
    text-decoration: none;
}

.hashtag:hover {
    text-decoration: underline;
}

.edit-textarea,
.comment-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 12px;
    font-size: 16px;
    outline: none;
    background: var(--bg-card);
    color: var(--text-main);
    font-family: inherit;
}

/* --- Action Buttons (Monochrome Line-Art Vector SVGs) --- */
.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 480px;
    width: 100%;
    margin-top: 14px;
    color: var(--text-secondary);
    font-size: 13px;
    box-sizing: border-box;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-secondary);
    padding: 6px 8px;
    min-height: 40px;
    min-width: 40px;
    border-radius: 20px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 13px;
    font-weight: 500;
    user-select: none;
    flex-shrink: 0;
    outline: none;
    position: relative;
    touch-action: manipulation;
}

.action-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.btn-tool-icon {
    min-width: 40px !important;
    min-height: 40px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    touch-action: manipulation;
}

#clear-media-btn {
    display: none !important;
}

#clear-media-btn.is-active {
    display: inline-flex !important;
}

.btn-tool-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.action-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    color: inherit;
    pointer-events: none;
}

.action-svg {
    stroke: currentColor;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.action-btn:hover {
    color: #ffffff;
}

.action-btn:hover .action-icon-wrap {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.action-btn.comment-btn:hover {
    color: #00f2fe;
}
.action-btn.comment-btn:hover .action-icon-wrap {
    background-color: rgba(0, 242, 254, 0.12);
}

.action-btn.share-btn:hover {
    color: #00ba7c;
}
.action-btn.share-btn:hover .action-icon-wrap {
    background-color: rgba(0, 186, 124, 0.12);
}
.action-btn.share-btn.shared {
    color: #00ba7c;
}

.action-btn.like-btn:hover {
    color: #ffffff;
}
.action-btn.like-btn:hover .action-icon-wrap {
    background-color: rgba(255, 255, 255, 0.12);
}
.action-btn.like-btn.liked {
    color: #ffffff;
}
.action-btn.like-btn.liked .icon-like-outline {
    display: none !important;
}
.action-btn.like-btn.liked .icon-like-solid {
    display: inline-block !important;
    fill: #ffffff;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
    animation: heartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* 🔁 Repost Active State */
.action-btn.share-btn.shared,
.action-btn.share-btn.reposted {
    color: #00ba7c !important;
}
.action-btn.share-btn.shared .action-icon-wrap,
.action-btn.share-btn.reposted .action-icon-wrap {
    background-color: rgba(0, 186, 124, 0.15) !important;
    color: #00ba7c !important;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 186, 124, 0.35);
}
.action-btn.share-btn.shared svg,
.action-btn.share-btn.reposted svg {
    stroke: #00ba7c !important;
}

/* 🔖 Bookmark Active State */
.action-btn.bookmark-btn.bookmarked {
    color: #00f2fe !important;
}
.action-btn.bookmark-btn.bookmarked .action-icon-wrap {
    background-color: rgba(0, 242, 254, 0.15) !important;
    color: #00f2fe !important;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.35);
}
.action-btn.bookmark-btn.bookmarked .icon-bm-outline {
    display: none !important;
}
.action-btn.bookmark-btn.bookmarked .icon-bm-solid {
    display: inline-block !important;
    fill: #00f2fe !important;
    stroke: #00f2fe !important;
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.6));
    animation: bookmarkPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bookmarkPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.action-btn.dm-share-btn:hover {
    color: #00f2fe;
}
.action-btn.dm-share-btn:hover .action-icon-wrap {
    background-color: rgba(0, 242, 254, 0.12);
}

.action-btn.view-btn {
    cursor: default;
    opacity: 0.85;
}
.action-btn.view-btn:hover {
    background-color: transparent;
    color: var(--text-secondary);
}
.action-btn.view-btn:hover .action-icon-wrap {
    background-color: transparent;
    transform: none;
}

/* Action Buttons Mobile Responsiveness - Flawless Fit for All Screen Sizes */
@media (max-width: 768px) {
    .action-buttons {
        max-width: 100%;
        margin-top: 10px;
        justify-content: space-between;
    }

    .action-btn {
        padding: 3px 4px;
        gap: 3px;
        font-size: 13px;
    }
    
    .action-icon-wrap {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        max-width: 100%;
        margin-top: 8px;
        justify-content: space-between;
    }

    .action-btn {
        padding: 2px 2px;
        gap: 2px;
        font-size: 12px;
    }

    .action-icon-wrap {
        width: 26px;
        height: 26px;
    }

    .action-svg {
        width: 16px;
        height: 16px;
    }

    .bookmark-btn .bookmark-text {
        display: none !important;
    }
}

@media (max-width: 375px) {
    .action-buttons {
        max-width: 100%;
        justify-content: space-between;
    }

    .action-btn {
        padding: 2px 1px;
        gap: 1px;
        font-size: 11px;
    }

    .action-icon-wrap {
        width: 22px;
        height: 22px;
    }

    .action-svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 320px) {
    .action-buttons {
        max-width: 100%;
    }

    .action-btn {
        padding: 1px 0;
        gap: 1px;
        font-size: 10px;
    }

    .action-icon-wrap {
        width: 20px;
        height: 20px;
    }

    .action-svg {
        width: 13px;
        height: 13px;
    }
}

/* --- Image Grid --- */
.post-image-grid {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 15px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000000;
}

.post-image-grid.grid-1 {
    grid-template-columns: 1fr;
    max-height: 540px;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000000;
}

.post-image-grid.grid-2 {
    grid-template-columns: 1fr 1fr;
    height: 280px;
}

.post-image-grid.grid-3,
.post-image-grid.grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 180px 180px;
}

.post-image-grid.grid-3 img:first-child {
    grid-row: span 2;
    height: 100%;
}

.post-image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    background: #111;
}

.post-image-grid.grid-1 img {
    width: auto;
    max-width: 100%;
    max-height: 540px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    display: block;
}

.more-images-wrapper {
    position: relative;
    cursor: pointer;
    display: block;
    height: 100%;
}

.more-images-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

/* --- Video Grid & X/Twitter Player --- */
.post-video-grid {
    display: grid;
    gap: 2px;
    margin-top: 10px;
    margin-bottom: 14px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000000;
}

.post-video-grid.grid-1 {
    grid-template-columns: 1fr;
    max-height: 540px;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000000;
}

.post-video-grid.grid-2 {
    grid-template-columns: 1fr 1fr;
    height: 280px;
}

.post-video-grid.grid-3 {
    grid-template-columns: 1fr 1fr;
    height: 320px;
}

.post-video-grid.grid-3 .x-video-wrapper:first-child {
    grid-row: span 2;
    height: 100%;
}

.post-video-grid.grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 160px 160px;
}

.x-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
}

/* 🚫 Suppress Android Chromium Default Black Circle Play Overlay & Shadow DOM */
video::-webkit-media-controls,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-overlay-enclosure,
video::-webkit-media-controls-enclosure,
video::-internal-media-controls-overlay-cast-button,
video::-internal-media-controls-download-button {
    display: none !important;
    -webkit-appearance: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
}

.x-video-wrapper video.post-video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000000;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

#lightbox-video,
#lightbox-video-poster {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    outline: none;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform, opacity;
}

#lightbox-video {
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#lightbox-video-poster {
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-video-grid.grid-1 .x-video-wrapper {
    width: 100%;
    min-height: 220px;
    aspect-ratio: 16 / 9;
    max-height: 540px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
}

.post-video-grid.grid-1 .x-video-wrapper video.post-video-player {
    width: 100%;
    height: 100%;
    max-height: 540px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* X Overlay Controls */
.x-video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
    z-index: 5;
}

/* On hover, paused, or touched: show X controls */
.x-video-wrapper:hover .x-video-overlay,
.x-video-wrapper.paused .x-video-overlay,
.x-video-wrapper.show-controls .x-video-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* On mobile show controls overlay with touch access */
@media (max-width: 768px) {
    .x-video-overlay {
        opacity: 0.92;
        pointer-events: auto;
    }
}

/* Timeline Progress Bar */
.x-video-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    position: relative;
    transition: height 0.15s ease;
}

.x-video-progress-container:hover {
    height: 6px;
}

.x-video-progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--accent);
    position: relative;
    border-radius: 2px;
}

/* Controls Bar */
.x-video-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
}

.x-video-controls-left,
.x-video-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.x-video-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s ease, transform 0.15s ease;
}

.x-video-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.x-video-btn:active {
    transform: scale(0.95);
}

.x-v-icon {
    width: 19px;
    height: 19px;
    fill: #ffffff;
}

.x-video-time {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* --- Right Sidebar --- */
.sidebar-right {
    width: 25%;
    padding: 20px;
    height: 100vh;
    position: sticky;
    top: 0;
}

.search-box {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 14px 20px;
    border-radius: 30px;
    width: 100%;
    outline: none;
    font-size: 15px;
    margin-bottom: 20px;
}

.search-box:focus {
    border-color: var(--accent);
}

.trends-box {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
}

.trends-box h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    font-size: 18px;
}

.trend-item {
    margin-bottom: 15px;
}

.trend-item:last-child {
    margin-bottom: 0;
}

.trend-tag {
    font-weight: bold;
    color: var(--text-main);
    text-decoration: none;
    display: block;
    margin-bottom: 2px;
}

.trend-tag:hover {
    text-decoration: underline;
}

.trend-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Modals & Lightbox --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    overscroll-behavior: contain;
}

.modal-box {
    background: #000;
    border: 1px solid var(--border);
    width: 440px;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 18px;
    padding: 20px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
}

#notifList,
#modalUserList {
    margin-top: 15px;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 5px;
    overscroll-behavior: contain;
}

#notifList::-webkit-scrollbar,
#modalUserList::-webkit-scrollbar {
    width: 6px;
}

#notifList::-webkit-scrollbar-thumb,
#modalUserList::-webkit-scrollbar-thumb {
    background: #2f3336;
    border-radius: 10px;
}

/* ======================================================== */
/* 🌌 KANLOOP CYBER MEDIA THEATER & PREVIEW OVERLAY         */
/* ======================================================== */
#lightbox,
.cyber-theater-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background-color: rgba(5, 7, 10, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
    user-select: none;
    overflow: hidden;
}

#lightbox.active,
.cyber-theater-overlay.active {
    opacity: 1;
    transform: scale(1);
}

.cyber-theater-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 100002;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    pointer-events: auto;
}

.cyber-theater-counter-pill {
    background: rgba(18, 21, 29, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 16px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.cyber-theater-counter-pill .pill-dot {
    width: 6px;
    height: 6px;
    background: #00f2fe;
    border-radius: 50%;
    box-shadow: 0 0 8px #00f2fe;
}

.cyber-theater-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cyber-theater-btn {
    background: rgba(18, 21, 29, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.cyber-theater-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #00f2fe;
    color: #00f2fe;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.cyber-theater-stage {
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 70px 20px 90px 20px;
    box-sizing: border-box;
    overflow: hidden;
}

#lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 242, 254, 0.08);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

#lightbox-video,
.cyber-theater-media {
    width: 92vw;
    max-width: 1100px;
    height: auto;
    max-height: calc(100vh - 170px);
    object-fit: contain;
    border-radius: 14px;
    background: #000;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 242, 254, 0.08);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

#lightbox-img.zoomed {
    transform: scale(1.75);
    cursor: zoom-out;
}

/* 🎬 Cyber Theater Video Player Bar (Scrubber, Play/Pause, Counter) */
.cyber-theater-video-bar {
    position: absolute;
    bottom: 95px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: rgba(15, 18, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 28px;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100003;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 242, 254, 0.15);
    user-select: none;
}

.theater-v-btn {
    background: none;
    border: none;
    color: #00f2fe;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: transform 0.15s ease, color 0.15s ease;
}

.theater-v-btn:hover {
    transform: scale(1.15);
    color: #38ef7d;
}

.theater-v-time {
    font-size: 12px;
    font-weight: 600;
    color: #a0aec0;
    font-variant-numeric: tabular-nums;
    min-width: 32px;
}

.theater-v-progress-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: height 0.15s ease;
}

.theater-v-progress-track:hover {
    height: 9px;
}

.theater-v-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00f2fe, #4facfe);
    border-radius: 6px;
    box-shadow: 0 0 8px #00f2fe;
    transition: width 0.08s linear;
}

.cyber-theater-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(18, 21, 29, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100001;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.cyber-theater-nav-btn:hover {
    background: rgba(0, 242, 254, 0.2);
    border-color: #00f2fe;
    color: #00f2fe;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
}

.cyber-theater-prev { left: 24px; }
.cyber-theater-next { right: 24px; }

/* Bottom Thumbnail Filmstrip */
.cyber-theater-filmstrip {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    display: flex;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(14, 17, 23, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow-x: auto;
    z-index: 100002;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
    scrollbar-width: none;
}
.cyber-theater-filmstrip::-webkit-scrollbar { display: none; }

.cyber-theater-thumb {
    position: relative;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    opacity: 0.6;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.cyber-theater-thumb img,
.cyber-theater-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    pointer-events: none;
}

.cyber-theater-thumb .cyber-thumb-vid-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(168, 85, 247, 0.2));
}

.cyber-theater-thumb .cyber-thumb-vid-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.cyber-theater-thumb:hover {
    opacity: 0.9;
    transform: scale(1.08);
}

.cyber-theater-thumb.active {
    opacity: 1;
    border-color: #00f2fe;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.7);
    transform: scale(1.12);
}

/* Cyber Theater Floating Post Action Bar */
.cyber-theater-bottom-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(14, 17, 23, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    padding: 8px 22px;
    z-index: 100003;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 242, 254, 0.1);
    transition: bottom 0.25s ease;
}

.cyber-theater-bottom-bar.has-filmstrip {
    bottom: 76px;
}

.theater-action-btn {
    background: none;
    border: none;
    color: #8b949e;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.theater-action-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.08);
}

.theater-action-btn#theater-cmt-btn:hover { color: #1d9bf0; }
.theater-action-btn#theater-like-btn:hover { color: #f91880; }
.theater-action-btn#theater-repost-btn:hover { color: #00ba7c; }
.theater-action-btn#theater-bm-btn:hover { color: #00f2fe; }

/* Active States */
.theater-action-btn.liked {
    color: #f91880 !important;
}
.theater-action-btn.liked .icon-like-outline { display: none !important; }
.theater-action-btn.liked .icon-like-solid { display: inline-block !important; fill: #f91880 !important; }

.theater-action-btn.reposted {
    color: #00ba7c !important;
}
.theater-action-btn.reposted svg { stroke: #00ba7c !important; }

.theater-action-btn.bookmarked {
    color: #00f2fe !important;
}
.theater-action-btn.bookmarked .icon-bm-outline { display: none !important; }
.theater-action-btn.bookmarked .icon-bm-solid { display: inline-block !important; fill: #00f2fe !important; }

.theater-view-badge {
    cursor: default;
    color: #71767b;
}

@media (max-width: 768px) {
    .cyber-theater-header { height: 54px; padding: 0 12px; }
    .cyber-theater-stage { padding: 60px 8px 80px 8px; }
    .cyber-theater-nav-btn { width: 40px; height: 40px; }
    .cyber-theater-prev { left: 8px; }
    .cyber-theater-next { right: 8px; }
    .cyber-theater-filmstrip { bottom: 10px; padding: 6px 10px; gap: 6px; }
    .cyber-theater-thumb { width: 38px; height: 38px; }
    .cyber-theater-bottom-bar {
        bottom: 12px;
        gap: 6px;
        padding: 6px 14px;
        font-size: 12px;
        max-width: 95vw;
    }
    .cyber-theater-bottom-bar.has-filmstrip {
        bottom: 64px;
    }
    .theater-action-btn { padding: 4px 6px; gap: 4px; font-size: 12px; }
}

/* ========================================================
   🔫 KANLOOP CYBER LASER CANNON UPLOAD MODAL & BREAKTHROUGH
======================================================== */
#upload-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10, 14, 23, 0.88) 0%, rgba(0, 0, 0, 0.95) 100%);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    perspective: 1000px;
    padding: 20px;
}

/* ========================================================
   🛸 KANLOOP CYBER MECHA HUD UPLOAD OVERLAY
   (Authentic Sci-Fi Beveled Armor & Segmented Matrix Bar)
======================================================== */
.cyber-mecha-modal {
    width: 100%;
    max-width: 580px;
    background: linear-gradient(135deg, rgba(20, 26, 38, 0.95) 0%, rgba(10, 14, 22, 0.98) 100%);
    border: 2px solid #2a384c;
    position: relative;
    padding: 24px 28px;
    color: #ffffff;
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.95),
        0 0 30px rgba(0, 242, 254, 0.2),
        inset 0 0 25px rgba(0, 242, 254, 0.06);
    /* 45-degree cyber beveled chamfer corners */
    clip-path: polygon(
        22px 0%, calc(100% - 22px) 0%, 
        100% 22px, 100% calc(100% - 22px), 
        calc(100% - 22px) 100%, 22px 100%, 
        0% calc(100% - 22px), 0% 22px
    );
    animation: mechaModalEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mechaModalEnter {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Corner Hex Bolts */
.mecha-bolt {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #a6b5c9 30%, #475569 80%);
    border: 1px solid #1e293b;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px #fff, 0 1px 3px rgba(0,0,0,0.8);
    z-index: 10;
}
.bolt-tl { top: 10px; left: 10px; }
.bolt-tr { top: 10px; right: 10px; }
.bolt-bl { bottom: 10px; left: 10px; }
.bolt-br { bottom: 10px; right: 10px; }

/* Top Status LED bar */
.mecha-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.mecha-chip-id {
    font-size: 10px;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    color: #00f2fe;
    opacity: 0.8;
}
.mecha-status-leds {
    display: flex;
    align-items: center;
    gap: 6px;
}
.led-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.led-cyan {
    background: #00f2fe;
    box-shadow: 0 0 8px #00f2fe;
}
.led-pink {
    background: #ff007f;
    box-shadow: 0 0 8px #ff007f;
    animation: ledBlink 1.2s infinite alternate;
}
@keyframes ledBlink {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}
.led-bar {
    width: 18px;
    height: 4px;
    background: #00f2fe;
    border-radius: 2px;
    box-shadow: 0 0 6px #00f2fe;
}

/* Header System Title */
.mecha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.mecha-system-title {
    font-size: 17px;
    font-family: 'Courier New', monospace;
    font-weight: 800;
    letter-spacing: 1px;
    color: #00f2fe;
    text-shadow: 0 0 12px rgba(0, 242, 254, 0.6);
    margin: 0;
    text-transform: uppercase;
}
.mecha-badge-icon {
    width: 32px;
    height: 32px;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid #00f2fe;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

/* ========================================================
   ⚡ THE SEGMENTED NEON PROGRESS CORE (หลอดบล็อกขีดนีออน)
======================================================== */
.mecha-energy-chamber {
    position: relative;
    margin-bottom: 18px;
}
.mecha-bezel-border {
    position: relative;
    background: rgba(8, 12, 18, 0.9);
    border: 2px solid #ff007f;
    box-shadow: 
        0 0 15px rgba(255, 0, 127, 0.4),
        0 0 25px rgba(0, 242, 254, 0.3),
        inset 0 0 15px rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    /* Cyber chamfered track */
    clip-path: polygon(
        10px 0%, calc(100% - 10px) 0%, 
        100% 10px, 100% calc(100% - 10px), 
        calc(100% - 10px) 100%, 10px 100%, 
        0% calc(100% - 10px), 0% 10px
    );
}

.mecha-inner-track {
    flex: 1;
    height: 36px;
    background: #05080e;
    border: 1px solid rgba(0, 242, 254, 0.4);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Glowing Matrix Blocks (แถบขีดสีฟ้าเรืองแสง) */
.mecha-segmented-fill {
    height: 100%;
    background: #00f2fe;
    box-shadow: 0 0 20px #00f2fe, 0 0 35px rgba(0, 242, 254, 0.8);
    position: relative;
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    /* Repeating vertical segmented slots */
    mask-image: repeating-linear-gradient(90deg, #000, #000 8px, transparent 8px, transparent 12px);
    -webkit-mask-image: repeating-linear-gradient(90deg, #000, #000 8px, transparent 8px, transparent 12px);
}
.mecha-head-glare {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: #ffffff;
    box-shadow: 0 0 20px #ffffff;
}

/* Big Cyber Percentage Display */
.mecha-percent-wrap {
    padding-right: 12px;
    min-width: 90px;
    text-align: right;
}
.mecha-percent-val {
    font-family: 'Courier New', monospace;
    font-size: 26px;
    font-weight: 900;
    color: #00f2fe;
    text-shadow: 0 0 15px #00f2fe, 0 0 25px rgba(0, 242, 254, 0.6);
    letter-spacing: 1px;
}

/* ========================================================
   📊 BOTTOM SCI-FI METADATA HUD
======================================================== */
.mecha-bottom-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 242, 254, 0.2);
    padding-top: 10px;
    font-family: 'Courier New', monospace;
}
.meta-line-1 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #00f2fe;
}
.meta-line-2 {
    font-size: 11px;
    color: #8b9bb4;
    letter-spacing: 0.5px;
}
.mecha-meta-telemetry {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 2px;
}
.telemetry-item {
    font-size: 10px;
    color: #64748b;
    letter-spacing: 1px;
}
.telemetry-item strong {
    color: #00f2fe;
    font-weight: 800;
}

.laser-percent-display {
    font-size: 32px;
    font-weight: 900;
    font-family: 'Prompt', monospace, sans-serif;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffffff 0%, #00d2ff 50%, #f91880 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
    animation: percentGlow 1s ease-in-out infinite alternate;
}
@keyframes percentGlow {
    from { filter: drop-shadow(0 0 8px rgba(0,210,255,0.4)); }
    to   { filter: drop-shadow(0 0 16px rgba(249,24,128,0.7)); }
}

.laser-sparks-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.loading-spinner-bottom {
    text-align: center;
    padding: 20px;
    color: var(--accent);
    font-weight: bold;
    display: none;
}

/* --- Mobile Search Popup --- */
.mobile-search-container {
    display: none;
}

.search-icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}

.search-icon-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.search-popup-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.search-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
}

.search-close-btn:hover {
    color: var(--text-main);
}

/* --- Responsive for Mobile Bottom Navigation --- */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar-left,
    .container.messages-container .sidebar-left {
        position: fixed !important;
        bottom: 0 !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100vw !important;
        height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
        min-height: 56px !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-evenly !important;
        align-items: center !important;
        background: #000000 !important;
        border-top: 1px solid var(--border) !important;
        border-right: none !important;
        border-left: none !important;
        border-bottom: none !important;
        padding: 0 !important;
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        margin: 0 !important;
        z-index: 1000 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .sidebar-left a,
    .sidebar-left .menu-item-custom,
    .container.messages-container .sidebar-left a,
    .container.messages-container .sidebar-left .menu-item-custom {
        display: flex !important;
        flex: 1 1 0% !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 56px !important;
        padding: 0 !important;
        margin: 0 !important;
        justify-content: center !important;
        align-items: center !important;
        text-decoration: none !important;
        background: transparent !important;
        box-sizing: border-box !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    /* 🛑 ซ่อนปุ่มรองบนมือถืออย่างเด็ดขาด เหลือเฉพาะ 6 ปุ่มหลักที่จัดพอดี 100% */
    .sidebar-left a.nav-desktop-only,
    .sidebar-left .nav-desktop-only,
    .container.messages-container .sidebar-left a.nav-desktop-only,
    .container.messages-container .sidebar-left .nav-desktop-only {
        display: none !important;
    }

    .sidebar-left .nav-mobile-only,
    .container.messages-container .sidebar-left .nav-mobile-only {
        display: flex !important;
    }

    .sidebar-left span,
    .brand-logo,
    .sidebar-profile-box,
    .container.messages-container .sidebar-left span,
    .container.messages-container .sidebar-left .brand-logo,
    .container.messages-container .sidebar-left .sidebar-profile-box {
        display: none !important;
    }

    .sidebar-left .menu-icon,
    .container.messages-container .sidebar-left .menu-icon {
        position: relative !important;
        margin: 0 auto !important;
        width: clamp(20px, 5vw, 24px) !important;
        height: clamp(20px, 5vw, 24px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .sidebar-left .menu-icon svg,
    .container.messages-container .sidebar-left .menu-icon svg {
        width: clamp(18px, 4.8vw, 22px) !important;
        height: clamp(18px, 4.8vw, 22px) !important;
        max-width: 22px !important;
        max-height: 22px !important;
    }

    .sidebar-left .menu-avatar-nav,
    .sidebar-left .menu-avatar,
    .container.messages-container .sidebar-left .menu-avatar {
        width: clamp(20px, 5.5vw, 25px) !important;
        height: clamp(20px, 5.5vw, 25px) !important;
        min-width: clamp(20px, 5.5vw, 25px) !important;
        min-height: clamp(20px, 5.5vw, 25px) !important;
        max-width: 25px !important;
        max-height: 25px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        margin: 0 !important;
        border: 1.5px solid var(--border) !important;
    }

    .sidebar-left .menu-item-custom .badge,
    .sidebar-left a .badge,
    .menu-icon .badge {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: -6px;
        right: -6px;
        background: #ef4444 !important;
        color: #ffffff !important;
        border-radius: 12px;
        padding: 1px 4px;
        min-width: 14px;
        height: 14px;
        font-size: 8.5px;
        font-weight: 800;
        line-height: 1;
        border: 1.5px solid #000000 !important;
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
        z-index: 10;
    }

    .main-feed {
        width: 100%;
        border: none;
        padding-bottom: 75px;
    }

    /* ซ่อนแถบด้านล่างเมื่ออยู่ในห้องแชทบนมือถือ */
    body.chat-open .sidebar-left,
    body:has(.messages-layout.in-chat) .sidebar-left {
        display: none !important;
    }
    .messages-layout.in-chat {
        height: 100dvh;
    }

    .sidebar-right {
        display: none;
    }

    .mobile-search-container {
        display: block;
    }

    .modal-box {
        width: 92%;
    }

    .post-image-grid.grid-3,
    .post-image-grid.grid-4 {
        grid-template-rows: 140px 140px;
    }

    .post-video-grid.grid-3,
    .post-video-grid.grid-4 {
        grid-template-rows: 140px 140px;
    }

    .post-box {
        padding: 15px;
    }

    .post-item {
        padding: 14px 12px;
        gap: 10px;
    }

    .action-buttons {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 10px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .action-btn {
        padding: 2px 1px !important;
        gap: 2px !important;
        font-size: 11.5px !important;
        min-width: 0 !important;
        flex-shrink: 1 !important;
    }

    .action-icon-wrap {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
    }

    .action-svg {
        width: 15px !important;
        height: 15px !important;
    }
}

/* ==========================================================================
   📱 TABLET ADAPTIVE LAYOUT ENGINE (769px - 1100px: Samsung Tab, iPad, Fold)
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1100px) {
    .container {
        max-width: 100% !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin: 0 auto !important;
        padding: 0 10px !important;
    }

    /* 1. Hide Heavy 3rd Column Sidebar on Tablet */
    .sidebar-right {
        display: none !important;
    }

    /* 2. Compact Icon-Only Left Sidebar (Like X / Twitter on Tablet) */
    .sidebar-left {
        width: 80px !important;
        min-width: 80px !important;
        max-width: 80px !important;
        padding: 16px 6px !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }

    .brand-logo {
        padding: 8px 0 !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .brand-logo-text,
    .brand-logo span {
        display: none !important;
    }

    .brand-logo-img {
        width: 38px !important;
        height: 38px !important;
        margin: 0 auto !important;
    }

    .sidebar-profile-box {
        padding: 10px 0 15px !important;
        width: 100% !important;
        align-items: center !important;
    }

    .sidebar-profile-pic {
        width: 48px !important;
        height: 48px !important;
        margin-bottom: 0 !important;
    }

    .sidebar-username,
    .sidebar-stats {
        display: none !important;
    }

    .sidebar-left a,
    .sidebar-left .menu-item-custom {
        width: 52px !important;
        height: 52px !important;
        padding: 0 !important;
        margin: 4px auto !important;
        justify-content: center !important;
        border-radius: 50% !important;
    }

    .sidebar-left a span,
    .sidebar-left .menu-item-custom span {
        display: none !important;
    }

    .sidebar-left .menu-icon {
        margin: 0 !important;
        width: auto !important;
        font-size: 22px !important;
    }

    /* 3. Spacious Centered Feed with Full GPU Optimization */
    .main-feed {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: 680px !important;
        min-width: 0 !important;
        margin: 0 auto !important;
        border-right: 1px solid var(--border) !important;
        border-left: 1px solid var(--border) !important;
    }
}

/* ==========================================================================
   NEW ENHANCEMENTS: Skeleton, Emoji Picker, Mentions, Drag&Drop, Bookmarks
   ========================================================================== */

/* --- 1. Skeleton Shimmer Loading --- */
.skeleton-container {
    width: 100%;
}

.skeleton-card {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #16181c;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.skeleton-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-line {
    height: 14px;
    border-radius: 7px;
    background: #16181c;
    position: relative;
    overflow: hidden;
}

.skeleton-line.short { width: 35%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long { width: 90%; }
.skeleton-line.media-box { height: 180px; width: 100%; border-radius: 14px; margin-top: 5px; }

.skeleton-avatar::after,
.skeleton-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* --- 2. Upward Emoji Picker Popup --- */
.emoji-picker-popup {
    position: fixed;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: #16181c;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.85);
    z-index: 3000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: popupSlideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
}

@keyframes popupSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.emoji-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: #0d0f12;
    padding: 8px 10px;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.emoji-tabs::-webkit-scrollbar {
    display: none;
}

.emoji-tab-btn {
    background: transparent;
    border: none;
    padding: 6px 10px;
    font-size: 17px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.15s;
    color: var(--text-muted);
    flex-shrink: 0;
}

.emoji-tab-btn.active,
.emoji-tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    transform: scale(1.1);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 12px;
    max-height: 220px;
    overflow-y: auto;
    background: #16181c;
}

.emoji-item {
    font-size: 22px;
    text-align: center;
    padding: 6px 0;
    cursor: pointer;
    border-radius: 10px;
    transition: transform 0.12s, background 0.12s;
    user-select: none;
}

.emoji-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.25);
}

.emoji-item:active {
    transform: scale(0.95);
}

/* --- GIF Badges, GIF Picker Modal & Embedded GIF Stickers --- */
.gif-tab-btn {
    font-size: 11px !important;
    font-weight: 900 !important;
    color: #00f2fe !important;
    background: rgba(0, 242, 254, 0.12) !important;
    border: 1px solid rgba(0, 242, 254, 0.3) !important;
    padding: 4px 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.gif-btn-badge {
    font-size: 11px;
    font-weight: 900;
    color: #00f2fe;
    border: 1.5px solid #00f2fe;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1;
    display: inline-block;
    transition: 0.2s;
}

.gif-btn-badge-small {
    font-size: 11px;
    font-weight: 900;
    color: #00f2fe;
    border: 1px solid #00f2fe;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1;
    display: inline-block;
    transition: 0.2s;
}

.btn-upload-custom:hover .gif-btn-badge,
.post-option-btn:hover .gif-btn-badge-small {
    background: #00f2fe;
    color: #000;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
}

.emoji-gif-sticker-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #0d0f12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, border-color 0.15s;
    padding: 4px;
}

.emoji-gif-sticker-item:hover {
    transform: scale(1.15);
    border-color: #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
    z-index: 2;
}

.emoji-gif-sticker-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* GIF Modal Dialog */
.gif-modal-dialog {
    max-width: 540px !important;
    width: 95% !important;
    max-height: 85vh !important;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    background: #0d1117 !important;
    border: 1px solid rgba(0, 242, 254, 0.3) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 242, 254, 0.15) !important;
    border-radius: 20px !important;
}

.gif-modal-title-badge {
    background: #00f2fe;
    color: #000;
    font-weight: 900;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 6px;
}

.gif-modal-search-bar {
    padding: 14px 18px;
    background: #090c10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gif-search-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.gif-search-icon {
    position: absolute;
    left: 14px;
    color: #8b949e;
    font-size: 15px;
    pointer-events: none;
}

.gif-search-input {
    width: 100%;
    background: #161b22;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 10px 38px 10px 38px;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gif-search-input:focus {
    border-color: #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.gif-search-clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #8b949e;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
}

.gif-category-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.gif-category-pills::-webkit-scrollbar {
    display: none;
}

.gif-cat-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c9d1d9;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.18s;
    flex-shrink: 0;
}

.gif-cat-pill:hover,
.gif-cat-pill.active {
    background: rgba(0, 242, 254, 0.18);
    border-color: #00f2fe;
    color: #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.gif-results-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    max-height: 440px;
    background: #0d1117;
}

.gif-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 480px) {
    .gif-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gif-card-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #161b22;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, box-shadow 0.2s;
}

.gif-card-item:hover {
    transform: scale(1.04);
    border-color: #00f2fe;
    box-shadow: 0 4px 18px rgba(0, 242, 254, 0.35);
    z-index: 2;
}

.gif-card-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gif-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    padding: 18px 8px 6px 8px;
    font-size: 11px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transition: opacity 0.2s;
}

.gif-card-item:hover .gif-card-title {
    opacity: 1;
}

/* Post Embedded GIF & Chat Sticker */
.post-embedded-gif-wrap {
    margin: 8px 0;
    max-width: 380px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    display: inline-block;
}

.post-embedded-gif {
    max-width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.chat-gif-sticker-wrap {
    margin-top: 4px;
    max-width: 240px;
    border-radius: 12px;
    overflow: hidden;
    display: inline-block;
}

.chat-gif-sticker {
    max-width: 100%;
    max-height: 220px;
    border-radius: 10px;
    display: block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* --- 3. Mention Autocomplete Popup --- */
.mention-popup {
    position: absolute;
    background: #16181c;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.7);
    z-index: 2600;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    width: 240px;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.mention-item:hover,
.mention-item.selected {
    background: #202227;
}

.mention-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.mention-uname {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-main);
}

/* --- 4. Drag & Drop Media Upload Overlay --- */
.post-box.drag-over {
    border: 2px dashed var(--accent) !important;
    background: rgba(29, 155, 240, 0.05) !important;
    position: relative;
}

.drag-drop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 12px;
    display: none;
    justify-content: center;
    align-items: center;
    color: var(--accent);
    font-size: 16px;
    font-weight: bold;
    pointer-events: none;
    z-index: 10;
}

/* --- 5. Bookmarks & View Counter Styles --- */
.action-btn.bookmark-btn.bookmarked {
    color: var(--accent);
}

.action-btn.view-btn {
    cursor: default;
}

.action-btn.view-btn:hover {
    color: var(--text-muted);
}

/* ==========================================================================
   ADVANCED SUITE: Live Banner, Polls, Voice, Banner, Links, DMs
   ========================================================================== */

/* --- 6. X (Twitter) Authentic "Show Posts" System --- */
.x-show-posts-banner {
    width: 100%;
    padding: 13px 16px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--accent);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    background-color: transparent;
    transition: background-color 0.2s ease;
    user-select: none;
}

.x-show-posts-banner:hover {
    background-color: rgba(29, 155, 240, 0.08);
}

.x-floating-pill {
    position: fixed;
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1d9bf0;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 700;
    display: none;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    z-index: 9999;
    transition: background-color 0.2s ease, transform 0.2s ease;
    user-select: none;
    animation: xPillSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.x-floating-pill:hover {
    background-color: #1a8cd8;
    transform: translateX(-50%) scale(1.03);
}

.x-floating-pill:active {
    transform: translateX(-50%) scale(0.97);
}

.x-micro-avatars {
    display: inline-flex;
    align-items: center;
    margin-right: 2px;
}

.x-micro-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #000000;
    margin-left: -7px;
    object-fit: cover;
}

.x-micro-avatar:first-child {
    margin-left: 0;
}

.x-floating-pill .x-micro-avatar {
    border: 2px solid #1d9bf0;
}

@keyframes xPillSlideDown {
    0% { opacity: 0; transform: translateX(-50%) translateY(-15px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* New Post Arrival Highlight */
.new-post-incoming {
    animation: newPostSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.just-arrived-highlight {
    background: rgba(29, 155, 240, 0.08) !important;
    border-left: 3px solid var(--accent) !important;
    transition: background 2.5s ease, border-left 2.5s ease;
}

@keyframes newPostSlideIn {
    0% { opacity: 0; transform: translateY(-16px); max-height: 0; }
    100% { opacity: 1; transform: translateY(0); max-height: 1200px; }
}

/* --- 7. Polls / Voting System --- */
.poll-container {
    margin-top: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
}

.poll-option-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 8px;
    text-align: left;
    transition: background 0.2s, color 0.2s;
}

.poll-option-btn:hover {
    background: rgba(29, 155, 240, 0.1);
}

.poll-result-item {
    position: relative;
    background: #202227;
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    justify-content: space-between;
    font-size: 14px;
}

.poll-result-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(29, 155, 240, 0.35);
    border-radius: 10px;
    transition: width 0.4s ease-out;
    z-index: 1;
}

.poll-result-bar.user-choice {
    background: rgba(0, 186, 124, 0.4);
}

.poll-result-text {
    position: relative;
    z-index: 2;
    font-weight: 500;
    color: var(--text-main);
}

.poll-result-pct {
    position: relative;
    z-index: 2;
    font-weight: bold;
    color: var(--text-main);
}

.poll-footer-stats {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
}

/* --- 9. Link Preview Cards --- */
.link-preview-card {
    margin-top: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.link-preview-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.link-preview-icon {
    font-size: 24px;
    flex-shrink: 0;
}

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

.link-preview-host {
    font-size: 13px;
    font-weight: bold;
    color: var(--accent);
}

.link-preview-url {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-preview-arrow {
    color: var(--text-muted);
    font-size: 16px;
}

/* --- 10. Profile Banner Cover --- */
.profile-banner-container {
    width: 100%;
    height: 180px;
    background: #202227;
    position: relative;
    overflow: hidden;
}

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

.btn-upload-banner {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: 0.2s;
}

.btn-upload-banner:hover {
    background: rgba(0,0,0,0.85);
}

/* --- 11. Pinned Post Badge --- */
.pinned-post-badge {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-weight: bold;
}

/* --- 12. Direct Messages Redesigned Layout --- */
.container.messages-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    min-height: 100vh;
}

@media (min-width: 769px) {
    .container.messages-container .sidebar-left {
        width: 275px !important;
        min-width: 260px !important;
        max-width: 280px !important;
        flex-shrink: 0 !important;
        padding: 20px 16px !important;
    }
}

.container.messages-container .main-feed.messages-main-feed {
    width: auto !important;
    flex: 1 !important;
    max-width: none !important;
    border-right: none !important;
    min-height: 100vh;
    display: flex;
    padding: 0 !important;
}

.messages-layout {
    display: flex;
    width: 100%;
    height: 100vh;
    background: var(--bg-main);
    border-right: 1px solid var(--border);
    overflow: hidden;
    flex: 1;
}

.messages-sidebar {
    width: 380px;
    min-width: 320px;
    max-width: 420px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background: #000;
}

.messages-sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(22, 24, 28, 0.6);
    backdrop-filter: blur(10px);
}

.messages-chat-room {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--bg-main) !important;
    min-width: 0 !important;
    position: relative !important;
    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}

.conv-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.conv-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.conv-item.active {
    background: rgba(29, 155, 240, 0.08);
    border-left: 3px solid var(--accent);
}

.conv-avatar-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.conv-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #00ba7c;
    border: 2px solid #000;
    border-radius: 50%;
}

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

.conv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.conv-username {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-time {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.conv-snippet-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.conv-snippet {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.conv-snippet.unread {
    color: #fff;
    font-weight: 600;
}

.conv-unread-pill {
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.chat-room-header {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(22, 24, 28, 0.85);
    backdrop-filter: blur(12px);
    z-index: 10;
}

.chat-room-header-user {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.chat-room-header-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-room-header-info {
    display: flex;
    flex-direction: column;
}

.chat-room-header-name {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.chat-room-header-status {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-room-header-status.online {
    color: #00ba7c;
}

.chat-bubble-stream {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: auto;
}

.chat-unread-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
    width: 100%;
    position: relative;
    user-select: none;
}
.chat-unread-separator::before,
.chat-unread-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 242, 254, 0.1), rgba(0, 242, 254, 0.4), rgba(0, 242, 254, 0.1));
}
.chat-unread-separator span {
    padding: 4px 14px;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #00f2fe;
    letter-spacing: 0.4px;
    margin: 0 12px;
    box-shadow: 0 2px 8px rgba(0, 242, 254, 0.1);
}

.chat-bubble-group {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    width: fit-content;
    margin-bottom: 2px;
}

.chat-bubble-group.mine {
    margin-left: auto;
    align-items: flex-end;
}

.chat-bubble-group.theirs {
    margin-right: auto;
    align-items: flex-start;
}

.chat-bubble {
    padding: 8px 14px;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    max-width: 100%;
    width: fit-content;
    min-width: 0;
    display: inline-block;
}
.chat-msg-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-bubble.mine {
    background: linear-gradient(135deg, #1d9bf0 0%, #0d8bd8 100%);
    color: #fff;
    border-radius: 20px 20px 4px 20px;
}

.chat-bubble.theirs {
    background: #1c1e22;
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 20px 20px 20px 4px;
}

.chat-bubble img {
    max-width: 100%;
    max-height: 360px;
    border-radius: 12px;
    margin-top: 8px;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s;
}

.chat-bubble img:hover {
    opacity: 0.9;
}

.chat-bubble-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 6px;
}

.chat-input-bar {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.chat-input-bar .action-btn {
    flex-shrink: 0;
    font-size: 20px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-pill {
    flex: 1;
    min-width: 0;
    background: #16181c;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.chat-input-pill:focus {
    border-color: var(--accent);
}

.chat-send-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: transform 0.15s, background 0.15s;
    box-sizing: border-box;
}

.chat-send-btn:hover {
    background: #1a8cd8;
    transform: scale(1.06);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mobile-chat-back-btn {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e7e9ea;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    padding: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.mobile-chat-back-btn:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: rgba(0, 242, 254, 0.5);
    color: #00f2fe;
    transform: scale(1.08) translateX(-2px);
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.35);
}

.mobile-chat-back-btn:active {
    transform: scale(0.92);
}

/* Mobile Responsive Breakpoint (< 768px) */
@media (max-width: 768px) {
    html:has(.messages-layout.in-chat),
    body:has(.messages-layout.in-chat),
    body.chat-open {
        height: 100% !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
        position: fixed !important;
        width: 100vw !important;
        inset: 0 !important;
    }

    .container.messages-container {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .container.messages-container .sidebar-left {
        width: 100% !important;
    }

    .container.messages-container .main-feed.messages-main-feed {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        height: 100% !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .messages-layout {
        height: 100% !important;
        max-height: 100% !important;
        width: 100% !important;
        max-width: 100vw !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
        border-right: none;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* เมื่อไม่ได้เลือกแชท: ซ่อน Chat Room แสดงเฉพาะ Conversation List พร้อมเว้นระยะขอบล่างให้เมนูบาร์ */
    .messages-layout:not(.in-chat) .messages-sidebar {
        width: 100%;
        max-width: 100vw;
        height: 100dvh;
        display: flex;
        border-right: none;
        padding-bottom: 70px !important;
        box-sizing: border-box !important;
    }
    .messages-layout:not(.in-chat) .messages-chat-room {
        display: none !important;
    }

    /* เมื่ออยู่ในแชท: ล็อค Chat Room เป็น Native App Viewport Frame เต็มจอ */
    .messages-layout.in-chat .messages-sidebar {
        display: none !important;
    }
    .messages-layout.in-chat .messages-chat-room {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100% !important;
        max-height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        background: #000000 !important;
        overflow: hidden !important;
        z-index: 1000 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .messages-layout.in-chat .chat-room-header {
        flex: 0 0 auto !important;
        height: auto !important;
        z-index: 50 !important;
        padding: 8px 10px !important;
        background: #111418 !important;
        border-bottom: 1px solid var(--border) !important;
        gap: 6px !important;
    }

    .mobile-chat-back-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        font-size: 18px;
        margin-right: 2px;
    }

    .chat-header-actions-group {
        gap: 4px !important;
    }

    .btn-chat-call-action {
        width: 32px !important;
        height: 32px !important;
        border-radius: 9px !important;
        font-size: 13px !important;
    }

    .btn-chat-profile-pill {
        width: 32px !important;
        height: 32px !important;
        border-radius: 9px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .btn-chat-profile-pill .btn-chat-profile-text {
        display: none !important;
    }

    .messages-layout.in-chat .chat-bubble-stream {
        flex: 1 1 0% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 12px 14px 8px 14px !important;
    }

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

    .messages-layout.in-chat .chat-input-bar {
        flex: 0 0 auto !important;
        position: relative !important;
        bottom: auto !important;
        width: 100% !important;
        max-width: 100vw !important;
        background: rgba(13, 17, 23, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        border-top: 1px solid var(--border) !important;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)) 8px !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        box-sizing: border-box !important;
        z-index: 1001 !important;
    }

    .chat-input-pill {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        padding: 8px 14px !important;
        font-size: 16px !important;
        height: 40px !important;
        box-sizing: border-box !important;
        touch-action: manipulation !important;
        -webkit-text-size-adjust: 100% !important;
    }

    .chat-send-btn {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        font-size: 16px !important;
        flex-shrink: 0 !important;
        touch-action: manipulation !important;
    }

    .chat-input-bar .action-btn {
        font-size: 18px !important;
        padding: 2px !important;
        width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        touch-action: manipulation !important;
    }
}

/* Extra Small Mobile Devices (<= 375px, 320px) */
@media (max-width: 375px) {
    .chat-input-bar {
        padding: 6px 8px max(8px, env(safe-area-inset-bottom)) 8px !important;
        gap: 4px !important;
    }

    .chat-input-pill {
        padding: 6px 12px !important;
        font-size: 16px !important;
        height: 38px !important;
        touch-action: manipulation !important;
        -webkit-text-size-adjust: 100% !important;
    }

    .chat-send-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        font-size: 15px !important;
        touch-action: manipulation !important;
    }

    .chat-input-bar .action-btn {
        font-size: 16px !important;
        padding: 2px !important;
        width: 28px !important;
        height: 28px !important;
    }
}

/* --- Global Live Search Dropdown --- */
.global-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow: hidden;
    max-height: 380px;
    overflow-y: auto;
}

.search-dropdown-header {
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(29, 155, 240, 0.06);
    border-bottom: 1px solid var(--border);
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease;
    text-decoration: none;
    color: var(--text-main);
}

.search-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.search-dropdown-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.search-dropdown-main-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    background: rgba(29, 155, 240, 0.08);
    color: var(--accent);
    font-weight: bold;
    font-size: 13px;
    border-top: 1px solid var(--border);
}

.search-dropdown-main-action:hover {
    background: rgba(29, 155, 240, 0.16);
}

/* --- Chat Search In-Flow Redesign --- */
.chat-search-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease;
}

.chat-search-user-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chat-search-user-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-search-start-pill {
    background: rgba(29, 155, 240, 0.15);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    transition: 0.15s;
}

.chat-search-user-item:hover .chat-search-start-pill {
    background: var(--accent);
    color: #fff;
}

/* ==========================================================================
   EXPLORE & REELS VIDEO FEED STYLES
   ========================================================================== */
.reels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

@media (max-width: 600px) {
    .reels-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 360px) {
    .reels-grid {
        grid-template-columns: 1fr;
    }
}

.reel-card {
    background: #16181c;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.reel-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
    border-color: rgba(29, 155, 240, 0.4);
}

.reel-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 400px;
    background: #000;
    overflow: hidden;
}

.reel-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.reel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.85) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    box-sizing: border-box;
}

.reel-top-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.reel-multi-badge,
.reel-views-badge {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reel-bottom-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reel-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reel-author-av {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #fff;
}

.reel-author-name {
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reel-caption {
    color: #e6edf3;
    font-size: 12px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reel-stats {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: bold;
}

.trend-row-item {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.15s;
}

.trend-row-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.creator-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
}

.creator-row-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.creator-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ======================================================== */
/* 🌟 DISPLAY NAME & @USERNAME TYPOGRAPHY (X/TWITTER STYLE) */
/* ======================================================== */
.post-author {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.author-display-name {
    font-weight: 700;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
}

.author-display-name:hover {
    text-decoration: underline;
}

.author-handle {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
}

.author-handle:hover {
    color: #cfd9de;
}

.post-dot {
    color: var(--text-muted);
    font-size: 13px;
}

.sidebar-display-name {
    font-weight: 700;
    color: #ffffff;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-top: 4px;
    cursor: pointer;
}

.sidebar-display-name:hover {
    text-decoration: underline;
}

/* ======================================================== */
/* 👤 PROFILE HEADER & UNIFIED EDIT PROFILE MODAL STYLES    */
/* ======================================================== */
.profile-banner-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #16181c;
}

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

.profile-banner-default {
    width: 100%;
    height: 100%;
    background: #000000 url('../images/default_banner.jpg') center/cover no-repeat;
}

.profile-header-box {
    padding: 12px 20px 18px 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.profile-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: -65px;
    margin-bottom: 14px;
}

.profile-avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #000000;
    background: #000000;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.profile-main-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-actions-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 5px;
}

.btn-edit-profile {
    background: transparent;
    color: #ffffff;
    border: 1px solid #536471;
    border-radius: 24px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-edit-profile:hover {
    background: rgba(239, 243, 244, 0.1);
    border-color: #ffffff;
}

.profile-user-meta {
    margin-bottom: 10px;
}

.profile-name-main {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.profile-username-sub {
    font-size: 14px;
    color: var(--text-muted);
}

.profile-bio-box {
    font-size: 14px;
    line-height: 1.5;
    color: #e7e9ea;
    margin: 12px 0;
    word-break: break-word;
}

.profile-stats-row {
    display: flex;
    gap: 22px;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 10px;
}

.profile-stats-row span {
    cursor: pointer;
    transition: color 0.15s;
}

.profile-stats-row span:hover {
    text-decoration: underline;
}

.profile-stats-row strong {
    color: #ffffff;
}

.profile-alert-success {
    background: rgba(0, 186, 124, 0.15);
    border: 1px solid #00ba7c;
    color: #00ba7c;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin: 10px 0;
}

/* ======================================================== */
/* 🛠️ EDIT PROFILE MODAL DIALOG                            */
/* ======================================================== */
.edit-profile-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.edit-profile-modal-container {
    background: #000000;
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-save-profile {
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 20px;
    padding: 7px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-save-profile:hover {
    background: #e6e6e6;
}

.edit-modal-body {
    padding: 0 0 20px 0;
}

.edit-banner-box {
    position: relative;
    width: 100%;
    height: 160px;
    background: #16181c;
}

.banner-preview-wrapper {
    width: 100%;
    height: 100%;
}

.banner-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-controls-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.btn-cam-overlay {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 20, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.btn-cam-overlay:hover {
    background: rgba(15, 20, 25, 0.98);
    transform: scale(1.08);
}

.btn-del-banner:hover {
    background: rgba(249, 24, 128, 0.85);
    border-color: rgba(249, 24, 128, 0.9);
}

.edit-avatar-box {
    padding: 0 20px;
    margin-top: -45px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.avatar-preview-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid #000000;
    overflow: hidden;
    cursor: pointer;
    background: #000000;
}

.avatar-preview-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-cam-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.avatar-preview-wrapper:hover .avatar-cam-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.65);
}

.edit-field-group {
    padding: 0 20px;
    margin-bottom: 18px;
}

.edit-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.edit-field-header label {
    font-size: 13px;
    font-weight: 600;
    color: #cfd9de;
}

.char-counter {
    font-size: 12px;
    color: var(--text-muted);
}

.edit-profile-input {
    width: 100%;
    padding: 12px 16px;
    background: #090a0d;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.edit-profile-input:focus {
    border-color: var(--accent);
    background: #0d1117;
}

.edit-profile-textarea {
    width: 100%;
    padding: 12px 16px;
    background: #090a0d;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    resize: vertical;
    line-height: 1.4;
    transition: border-color 0.15s;
}

.edit-profile-textarea:focus {
    border-color: var(--accent);
    background: #0d1117;
}

/* --- Direct Image Drag & Reposition Styles --- */
.drag-reposition-area {
    position: relative;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.drag-reposition-area.is-dragging {
    cursor: grabbing;
}

.banner-preview-wrapper.is-dragging {
    box-shadow: inset 0 0 25px rgba(0, 242, 254, 0.45);
    outline: 2px dashed rgba(0, 242, 254, 0.8);
    outline-offset: -2px;
}

.avatar-preview-wrapper.is-dragging {
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.85) !important;
    border-color: #00f2fe !important;
}

.draggable-img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.banner-drag-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.35);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    pointer-events: none;
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    transition: opacity 0.2s, transform 0.2s;
    z-index: 4;
}

.banner-drag-hint.dragging-active {
    opacity: 0.2;
}

.avatar-edit-container {
    position: relative;
    display: inline-block;
}

.avatar-drag-tip {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-avatar-cam-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #00f2fe;
    color: #000000;
    border: 3px solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    z-index: 6;
    box-shadow: 0 2px 10px rgba(0, 242, 254, 0.4);
    transition: all 0.2s ease;
}

.btn-avatar-cam-badge:hover {
    background: #ffffff;
    transform: scale(1.1);
}

/* ======================================================== */
/* 🔁 REPOST (RETWEET) HEADER BADGE STYLING                 */
/* ======================================================== */
.repost-header-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    cursor: pointer;
    line-height: 1;
}

.repost-badge-icon {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
    flex-shrink: 0;
    transition: fill 0.15s;
}

.repost-header-badge:hover .repost-badge-icon {
    fill: #00ba7c;
}

.repost-badge-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.repost-badge-name {
    color: #e7e9ea;
    font-weight: 700;
}

.repost-header-badge:hover .repost-badge-name {
    text-decoration: underline;
}

.repost-avatar-mini {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.repost-header-badge:hover .repost-avatar-mini {
    transform: scale(1.15);
    border-color: #00ba7c;
}

/* ======================================================== */
/* 📢 SYSTEM ANNOUNCEMENT BANNER (RESPONSIVE & GLOWING)    */
/* ======================================================== */
.system-announcement-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.12) 0%, rgba(13, 27, 42, 0.65) 100%);
    border-bottom: 1px solid rgba(29, 155, 240, 0.25);
    border-left: 3.5px solid var(--accent);
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.system-announcement-icon-box {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 12px;
    background: rgba(29, 155, 240, 0.15);
    border: 1px solid rgba(29, 155, 240, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(29, 155, 240, 0.2);
}

.system-announcement-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.system-announcement-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.system-announcement-badge {
    background: rgba(29, 155, 240, 0.2);
    color: var(--accent);
    border: 1px solid rgba(29, 155, 240, 0.35);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.system-announcement-text {
    font-size: 13.5px;
    color: #e7e9ea;
    line-height: 1.55;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    margin: 0;
}

.system-announcement-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    line-height: 1;
}

.system-announcement-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* ======================================================== */
/* 👑 ROLE BADGES & ✔️ VERIFIED CHECKMARK BADGES           */
/* ======================================================== */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 3px;
    margin-right: 2px;
    user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.role-badge:hover {
    transform: scale(1.04);
}

.role-badge-icon {
    font-size: 11px;
}

.role-badge-text {
    font-size: 10px;
    font-weight: 800;
}

/* 👑 Master Admin Badge - Metallic Gold Glow */
.role-badge-master {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.28) 0%, rgba(212, 175, 55, 0.15) 100%);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.55);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.4);
}

/* 🛡️ Sub-Admin Badge - Cyber Blue/Cyan Shield */
.role-badge-subadmin {
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.28) 0%, rgba(0, 186, 124, 0.15) 100%);
    color: #1d9bf0;
    border: 1px solid rgba(29, 155, 240, 0.5);
    box-shadow: 0 0 10px rgba(29, 155, 240, 0.25);
    text-shadow: 0 0 4px rgba(29, 155, 240, 0.4);
}

/* ✔️ Twitter/X Style Verified Checkmark Badges */
.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    min-width: 17px;
    vertical-align: middle;
    margin-left: 2px;
    margin-right: 3px;
    cursor: default;
    user-select: none;
    transition: transform 0.15s ease;
}

.verified-badge:hover {
    transform: scale(1.15);
}

.verified-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.verified-badge-blue .verified-svg {
    fill: #1d9bf0;
    filter: drop-shadow(0 0 4px rgba(29, 155, 240, 0.4));
}

.verified-badge-gold .verified-svg {
    fill: #ffd700;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
}

/* ======================================================== */
/* ✈️ SHARE POST TO DIRECT MESSAGE MODAL                    */
/* ======================================================== */
.share-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000005;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.2s ease-out;
}

.share-modal-card {
    background: #12151d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 242, 254, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: scaleUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUpModal {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.share-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.share-modal-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #8b949e;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.share-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.share-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.share-search-box {
    width: 100%;
    background: #080a0f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
    color: #fff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.share-search-box:focus {
    border-color: #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

.share-note-input {
    width: 100%;
    background: #080a0f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    resize: none;
}

.share-users-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
}

.share-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s;
}

.share-user-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.share-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.share-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.share-user-names {
    min-width: 0;
    flex: 1;
}

.share-user-disp {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.share-user-uname {
    font-size: 12px;
    color: #8b949e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-send-share {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #000;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-send-share:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
    transform: scale(1.04);
}

.btn-send-share.sent {
    background: rgba(255, 255, 255, 0.1);
    color: #8b949e;
    cursor: default;
    box-shadow: none;
    transform: none;
}

/* ======================================================== */
/* 📩 DIRECT MESSAGE READ RECEIPTS (✓ / ✓✓ SEEN)           */
/* ======================================================== */
.msg-receipt-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #8b949e;
    margin-left: 4px;
    vertical-align: middle;
    user-select: none;
}

.msg-receipt-badge.seen {
    color: #00f2fe;
}

.msg-receipt-badge svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 🖼️ Seamless Bubble Wrapper for Shared Posts (Sender & Receiver) */
.chat-bubble:has(.chat-shared-post-card),
.chat-bubble.has-shared-card {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* 🖼️ Rich Social Post Card in Chat (Standalone Clean Card) */
.chat-shared-post-card {
    background: #0d1117;
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 16px;
    margin-top: 4px;
    margin-bottom: 2px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 320px;
    width: 100%;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.chat-shared-post-card:hover {
    border-color: #00f2fe;
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.3);
    transform: translateY(-2px);
}

.chat-shared-post-url-bar {
    background: #161b22;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
    font-size: 11.5px;
    font-weight: 700;
    color: #00f2fe;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.2px;
}

.chat-shared-post-media-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 📱 Multi-Media Grid (1 to 4+ Images & Videos) */
.chat-shared-media-grid {
    display: grid;
    gap: 2px;
    width: 100%;
    max-height: 220px;
    overflow: hidden;
    background: #000;
    position: relative;
}

.chat-shared-media-grid.grid-1 {
    grid-template-columns: 1fr;
    height: 180px;
}

.chat-shared-media-grid.grid-2 {
    grid-template-columns: 1fr 1fr;
    height: 160px;
}

.chat-shared-media-grid.grid-3 {
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 180px;
}
.chat-shared-media-grid.grid-3 .chat-shared-media-item:first-child {
    grid-row: span 2;
}

.chat-shared-media-grid.grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 180px;
}

.chat-shared-media-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    background: #05070a;
}

.chat-shared-media-item img,
.chat-shared-media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.chat-shared-media-item:hover img,
.chat-shared-media-item:hover video {
    transform: scale(1.05);
}

.chat-shared-media-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    transition: background 0.2s;
}

.chat-shared-media-item:hover .chat-shared-media-more {
    background: rgba(0, 0, 0, 0.5);
}

.chat-shared-media-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: auto;
}

.chat-shared-post-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.chat-shared-post-card:hover .chat-shared-post-thumb {
    transform: scale(1.04);
}

.chat-shared-post-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 242, 254, 0.4);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 10;
}

.chat-shared-post-play-overlay svg {
    width: 22px;
    height: 22px;
    fill: #ffffff;
    margin-left: 3px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
}

.chat-shared-media-item:hover .chat-shared-post-play-overlay {
    transform: translate(-50%, -50%) scale(1.18);
    background: rgba(0, 242, 254, 0.95);
    border-color: #00f2fe;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.8);
}

.chat-shared-media-item:hover .chat-shared-post-play-overlay svg {
    fill: #000000;
}

.chat-shared-post-footer {
    padding: 10px 12px 12px 12px;
    background: #0c1017;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-shared-post-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-shared-post-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-shared-post-author {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-shared-post-body {
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.4;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ======================================================== */
/* 🛡️ 2-STEP REGISTRATION WITH 6-DIGIT OTP VERIFICATION     */
/* ======================================================== */
.otp-card-wrap {
    animation: scaleUpModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.otp-box-digit {
    width: 46px;
    height: 54px;
    background: #080a0f;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    color: #00f2fe;
    outline: none;
    transition: all 0.2s ease;
}

.otp-box-digit:focus {
    border-color: #00f2fe;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.3);
    background: rgba(0, 242, 254, 0.03);
}

.otp-timer-text {
    font-size: 13px;
    color: #8b949e;
    margin-top: 15px;
    text-align: center;
}

.otp-resend-link {
    color: #00f2fe;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.otp-resend-link.disabled {
    color: #565d68;
    cursor: not-allowed;
    pointer-events: none;
}

/* ======================================================== */
/* 🖤 TOTAL ICON COHESION - LINE-ART VECTOR SVGS            */
/* ======================================================== */
.post-option-btn {
    background: transparent;
    border: none;
    color: #8b949e;
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    vertical-align: middle;
}

.post-option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: scale(1.12);
}

.post-option-btn.report-btn:hover {
    color: #f91880 !important;
    background: rgba(249, 24, 128, 0.12) !important;
}

.post-option-btn.pin-btn.pinned {
    color: #00f2fe;
}

.post-option-btn.delete-btn:hover {
    color: #f91880 !important;
    background: rgba(249, 24, 128, 0.12) !important;
}

.form-tool-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #8b949e;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.form-tool-btn:hover {
    background: rgba(0, 242, 254, 0.08);
    border-color: rgba(0, 242, 254, 0.3);
    color: #00f2fe;
    transform: translateY(-1px);
}

.form-tool-btn svg {
    stroke: currentColor;
    transition: stroke 0.2s ease;
}

/* Explore Page Cohesive Tabs */
.explore-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    color: #8b949e;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.explore-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

.explore-tab-btn.active {
    color: #00f2fe;
    border-bottom-color: #00f2fe;
}

.explore-tab-btn svg {
    stroke: currentColor;
}

/* ======================================================== */
/* 🎬 KANLOOP SHORTS & REELS FULL-SCREEN IMMERSIVE PLAYER    */
/* ======================================================== */
.reels-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 5, 8, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.22s ease-out;
}

.reels-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.reels-container {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.reels-container::-webkit-scrollbar {
    display: none;
}

.reels-snap-item {
    position: relative;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000000;
    overflow: hidden;
}

.reels-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    cursor: pointer;
}

/* Floating Action Bar (Right Side) */
.reels-actions-bar {
    position: absolute;
    right: 14px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 10;
}

.reels-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(18, 21, 29, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.reels-action-btn:hover {
    transform: scale(1.15);
    border-color: #00f2fe;
    color: #00f2fe;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

.reels-action-btn.liked {
    color: #f91880 !important;
    border-color: #f91880 !important;
    background: rgba(249, 24, 128, 0.25) !important;
    box-shadow: 0 0 16px rgba(249, 24, 128, 0.5) !important;
}

.reels-action-btn.reposted {
    color: #00ba7c !important;
    border-color: #00ba7c !important;
    background: rgba(0, 186, 124, 0.25) !important;
    box-shadow: 0 0 16px rgba(0, 186, 124, 0.5) !important;
}

.reels-action-btn.bookmarked {
    color: #00f2fe !important;
    border-color: #00f2fe !important;
    background: rgba(0, 242, 254, 0.25) !important;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.5) !important;
}

.reels-action-count {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    margin-top: 2px;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

/* Bottom Info Overlay (Left Side) */
.reels-bottom-overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 70px;
    padding: 20px 16px 24px 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    z-index: 9;
    pointer-events: auto;
}

.reels-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.reels-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.reels-author-name {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
}

.reels-author-uname {
    font-size: 12px;
    color: #8b949e;
}

.reels-follow-btn {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #000000;
    font-size: 11px;
    font-weight: 800;
    border: none;
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reels-follow-btn:hover {
    filter: brightness(1.15);
    transform: scale(1.05);
}

.reels-caption-text {
    font-size: 13.5px;
    color: #ffffff;
    line-height: 1.4;
    max-height: 60px;
    overflow-y: auto;
    word-break: break-word;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Top Floating Controls */
.reels-top-controls {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.reels-control-btn {
    background: rgba(18, 21, 29, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reels-control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #00f2fe;
    color: #00f2fe;
    transform: scale(1.1);
}

/* Double Tap Flying Heart */
.reels-floating-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #f91880;
    pointer-events: none;
    z-index: 20;
    animation: heartFlyPop 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heartFlyPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; filter: drop-shadow(0 0 25px rgba(249, 24, 128, 0.9)); }
    100% { transform: translate(-50%, -80%) scale(1); opacity: 0; }
}

/* Video Progress Scrubber */
.reels-progress-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 15;
    cursor: pointer;
    transition: height 0.2s ease;
}

.reels-progress-wrap:hover {
    height: 6px;
}

.reels-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00f2fe 0%, #4facfe 100%);
    box-shadow: 0 0 8px #00f2fe;
}

/* Slide-up Comments Drawer */
.reels-comments-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 65%;
    height: 65%;
    background: rgba(14, 17, 23, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px 20px 0 0;
    z-index: 30;
    display: none;
    flex-direction: column;
    animation: slideUpDrawer 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
}

@keyframes slideUpDrawer {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.reels-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reels-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px;
}

.reels-comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.reels-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.reels-comment-body {
    flex: 1;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px 12px;
}

.reels-comment-input-bar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #080a0f;
}

.reels-comment-input {
    flex: 1;
    background: #12151d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 14px;
    color: #ffffff;
    font-size: 13px;
    outline: none;
}

.reels-comment-send-btn {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #000000;
    font-weight: 800;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
}

/* ==========================================================================
   CYBER NOTIFICATION HUB & MODAL STYLES (NEXT-GEN)
   ========================================================================== */
.cyber-notif-modal-card {
    background: rgba(10, 14, 23, 0.95);
    -webkit-backdrop-filter: blur(28px);
    backdrop-filter: blur(28px);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 24px;
    width: 94%;
    max-width: 580px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 242, 254, 0.12);
    overflow: hidden;
    overscroll-behavior: contain;
    animation: cyberModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@keyframes cyberModalPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cyber-notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 20, 32, 0.6);
}

.cyber-notif-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.cyber-notif-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cyber-notif-unread-pill {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #000000;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.cyber-notif-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-notif-read-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #00f2fe;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-notif-read-all:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: #00f2fe;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.cyber-notif-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #8b949e;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cyber-notif-close-btn:hover {
    background: rgba(249, 24, 128, 0.15);
    border-color: #f91880;
    color: #f91880;
}

/* Tabs */
.cyber-notif-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(8, 11, 18, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.cyber-notif-tabs::-webkit-scrollbar {
    display: none;
}

.notif-tab-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.notif-tab-pill:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.notif-tab-pill.active {
    background: rgba(0, 242, 254, 0.15);
    border-color: #00f2fe;
    color: #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

/* Notification Body & Items */
.cyber-notif-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 242, 254, 0.3) transparent;
}

.cyber-notif-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    margin-bottom: 8px;
    background: rgba(18, 23, 35, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.cyber-notif-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 242, 254, 0.3);
    transform: translateY(-1px);
}

.cyber-notif-card.unread {
    background: rgba(0, 242, 254, 0.06);
    border-left: 3px solid #00f2fe;
    border-color: rgba(0, 242, 254, 0.2);
}

.cyber-notif-av-wrap {
    position: relative;
    flex-shrink: 0;
}

.cyber-notif-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.cyber-notif-type-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #080a0f;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.cyber-notif-content {
    flex: 1;
    min-width: 0;
}

.cyber-notif-user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.cyber-notif-names {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    min-width: 0;
}

.cyber-notif-display {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
}

.cyber-notif-handle {
    font-size: 12px;
    color: var(--text-muted);
}

.cyber-notif-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.cyber-notif-text {
    font-size: 13.5px;
    color: #d1d5db;
    line-height: 1.4;
    word-break: break-word;
}

.cyber-notif-snippet {
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
    line-height: 1.4;
}

.cyber-notif-right {
    flex-shrink: 0;
    align-self: center;
}

.btn-notif-action {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-notif-action.btn-follow-back {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #000000;
}

.btn-notif-action.btn-follow-back:hover {
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.6);
    transform: scale(1.05);
}

.btn-notif-action.btn-following {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cyber-notif-empty {
    text-align: center;
    padding: 40px 20px;
}

.cyber-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
}

.cyber-spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid rgba(0, 242, 254, 0.2);
    border-top-color: #00f2fe;
    border-radius: 50%;
    animation: cyberSpin 0.7s linear infinite;
}

@keyframes cyberSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .cyber-notif-modal-card {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }

    .cyber-notif-header {
        padding: 12px 16px;
    }

    .cyber-notif-avatar {
        width: 36px;
        height: 36px;
    }

    .cyber-notif-tabs {
        padding: 8px 12px;
    }
}

/* ======================================================== */
/* 📸 STORIES & CYBER MODAL SYSTEM (ระบบสตอรี่ & โมดัล)      */
/* ======================================================== */

.cyber-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.cyber-modal-container {
    background: rgba(10, 14, 23, 0.96);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 242, 254, 0.12);
    animation: cyberModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.cyber-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 20, 32, 0.6);
}

.cyber-modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #8b949e;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cyber-modal-close:hover {
    background: rgba(249, 24, 128, 0.15);
    border-color: #f91880;
    color: #f91880;
}

.cyber-btn-primary {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #000000;
    border: none;
    padding: 9px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cyber-btn-primary:hover:not(:disabled) {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.6);
}

.cyber-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.cyber-btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cfd9de;
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cyber-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.story-create-body {
    padding: 18px 20px;
}

/* --- Stories Tray Header --- */
.stories-tray-section {
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
    overflow: hidden;
    position: relative;
}

.stories-scroll-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 2px;
}

.stories-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.stories-dynamic-list {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.story-circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    width: 68px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-circle-item:hover {
    transform: translateY(-2px);
}

.story-circle-item:active {
    transform: scale(0.95);
}

.story-avatar-ring {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    padding: 2.5px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.story-avatar-ring.unviewed {
    background: linear-gradient(135deg, #00f2fe 0%, #a855f7 50%, #f43f5e 100%);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
    animation: ringPulse 3s infinite ease-in-out;
}

@keyframes ringPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 242, 254, 0.35); }
    50% { box-shadow: 0 0 18px rgba(168, 85, 247, 0.6); }
}

.story-avatar-ring.viewed {
    background: #38444d;
    opacity: 0.75;
}

.story-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-main);
    background: #16181c;
}

.story-add-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: #00f2fe;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    border: 2px solid var(--bg-main);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.6);
}

.story-username-label {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 68px;
}

.story-circle-item:hover .story-username-label {
    color: #fff;
}

/* --- Create Story Dialog --- */
.story-create-dialog {
    max-width: 480px;
    width: 95%;
}

.story-dropzone {
    width: 100%;
    min-height: 220px;
    max-height: 340px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(0, 242, 254, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all 0.2s ease;
}

.story-dropzone:hover {
    background: rgba(0, 242, 254, 0.06);
    border-color: #00f2fe;
}

.story-dropzone-prompt {
    text-align: center;
    padding: 20px;
}

.story-preview-wrap {
    width: 100%;
    height: 100%;
    min-height: 220px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.story-preview-media {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 12px;
}

.story-remove-preview-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: 0.2s;
}

.story-remove-preview-btn:hover {
    background: #f43f5e;
    border-color: #f43f5e;
}

.story-caption-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    color: #fff;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}

.story-caption-textarea:focus {
    border-color: #00f2fe;
}

.story-create-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-top: 14px;
}

/* --- Fullscreen Story Viewer Player --- */
.story-viewer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.story-viewer-close-btn {
    display: none !important;
}

.story-player-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    height: 90vh;
    max-height: 800px;
    background: #090b10;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 242, 254, 0.15);
    cursor: default;
}

.story-progress-segments {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    z-index: 100;
}

.story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    width: 0%;
    background: #00f2fe;
    border-radius: 3px;
    box-shadow: 0 0 6px #00f2fe;
}

.story-header-bar {
    position: absolute;
    top: 24px;
    left: 14px;
    right: 14px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.story-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.story-author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #00f2fe;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.5);
}

.story-author-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.story-author-name {
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

.story-time-ago {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

.story-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.story-header-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 700;
}

.story-header-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.08);
}

.story-header-btn.btn-delete-story:hover {
    background: rgba(239, 68, 68, 0.8) !important;
    border-color: #ef4444 !important;
}

.story-header-btn.btn-close-story:hover {
    background: rgba(244, 63, 94, 0.8) !important;
    border-color: #f43f5e !important;
}

.story-media-stage {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.story-active-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.story-caption-overlay {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: 88%;
    padding: 6px 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    z-index: 90;
    word-break: break-word;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Caption Positions */
.story-caption-overlay.pos-top {
    top: 75px;
    bottom: auto;
}

.story-caption-overlay.pos-center {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
}

.story-caption-overlay.pos-bottom {
    bottom: 80px;
    top: auto;
}

/* Caption Styles */
.story-caption-overlay.style-transparent {
    background: transparent;
    border: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 3px rgba(0, 0, 0, 0.8);
}

.story-caption-overlay.style-glass {
    background: rgba(10, 14, 23, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
}

.story-caption-overlay.style-neon {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    text-shadow: 0 0 8px currentColor, 0 0 16px currentColor;
    border: 1px solid currentColor;
}

.story-tap-zone {
    position: absolute;
    top: 60px;
    bottom: 60px;
    z-index: 80;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.story-tap-zone.left {
    left: 0;
    width: 35%;
}

.story-tap-zone.right {
    right: 0;
    width: 65%;
}

.story-footer-bar {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-viewers-pill {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: #00f2fe;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.story-viewers-pill:hover {
    background: rgba(0, 242, 254, 0.15);
    transform: translateY(-1px);
}

.story-viewers-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: rgba(13, 17, 23, 0.96);
    backdrop-filter: blur(15px);
    border-radius: 20px 20px 0 0;
    z-index: 120;
    padding: 16px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(0, 242, 254, 0.3);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
    animation: drawerSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawerSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.story-viewers-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.story-viewers-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
}

.story-viewers-list {
    flex: 1;
    overflow-y: auto;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.story-viewer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 10px;
    transition: background 0.15s;
}

.story-viewer-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.story-viewer-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

@media (max-width: 480px) {
    .story-player-card {
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
}

/* ======================================================== */
/* 🎵 STORY MUSIC & SOUNDTRACK ENGINE CSS                   */
/* ======================================================== */

.btn-story-select-music {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: #00f2fe;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-story-select-music:hover {
    background: rgba(0, 242, 254, 0.2);
    border-color: #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
    transform: translateY(-1px);
}

.story-music-selected-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.4);
    padding: 5px 12px 5px 6px;
    border-radius: 24px;
    max-width: 260px;
    backdrop-filter: blur(8px);
}

.story-music-pill-art {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #00f2fe;
}

.story-music-pill-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.2;
}

.story-music-pill-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-music-pill-artist {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-music-pill-remove {
    background: none;
    border: none;
    color: #f91880;
    font-size: 14px;
    cursor: pointer;
    padding: 0 0 0 4px;
    transition: transform 0.2s ease;
}

.story-music-pill-remove:hover {
    transform: scale(1.2);
}

/* Music Picker Dialog */
#storyMusicPickerModal {
    z-index: 100005 !important;
}

.music-picker-dialog {
    max-width: 480px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.music-picker-body {
    padding: 16px;
    overflow-y: auto;
    max-height: 65vh;
}

.music-search-box-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.music-search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.music-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 10px 16px 10px 42px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.music-search-input:focus {
    border-color: #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
    background: rgba(0, 0, 0, 0.4);
}

.music-genre-tags {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 10px;
    scrollbar-width: none;
}

.music-genre-tags::-webkit-scrollbar {
    display: none;
}

.music-tag-pill {
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.music-tag-pill:hover,
.music-tag-pill.active {
    background: rgba(0, 242, 254, 0.15);
    border-color: #00f2fe;
    color: #00f2fe;
    font-weight: 700;
}

.story-music-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.story-music-track-card,
.story-music-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    gap: 12px;
}

.story-music-track-card:hover,
.story-music-item:hover {
    background: rgba(0, 242, 254, 0.08);
    border-color: rgba(0, 242, 254, 0.35);
    transform: translateX(4px);
}

.story-music-track-left,
.story-music-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.story-music-art-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.story-music-art-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-music-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.story-music-art-wrap:hover .story-music-play-overlay {
    background: rgba(0, 242, 254, 0.7);
    color: #000;
}

.story-music-track-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}

.story-music-track-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-music-track-artist {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-select-track {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #000;
    border: none;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 242, 254, 0.3);
}

.btn-select-track:hover {
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.7);
}

/* Floating Music Sticker on Story Viewer & Canvas */
.story-floating-music-sticker {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 14, 23, 0.7);
    border: 1px solid rgba(0, 242, 254, 0.35);
    padding: 6px 14px 6px 6px;
    border-radius: 28px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 242, 254, 0.2);
    z-index: 85;
    cursor: pointer;
    max-width: 80%;
    animation: stickerFloatIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.25s ease;
}

/* Music Sticker Styles */
.story-floating-music-sticker.style-compact {
    background: rgba(10, 14, 23, 0.75);
    border: 1px solid rgba(0, 242, 254, 0.4);
    border-radius: 30px;
}

.story-floating-music-sticker.style-card {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 8px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.story-floating-music-sticker.style-card .story-music-disc-wrap {
    border-radius: 8px;
}

.story-floating-music-sticker.style-card .story-music-disc-art {
    border-radius: 8px;
    animation: none;
}

.story-floating-music-sticker.style-card .story-music-disc-center {
    display: none;
}

.story-floating-music-sticker.style-minimal {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 22px;
    padding: 4px 12px 4px 6px;
    backdrop-filter: blur(10px);
}

.story-floating-music-sticker.style-minimal .story-music-disc-center {
    display: none;
}

.story-floating-music-sticker.style-minimal .story-music-sticker-artist {
    display: none;
}

/* Music Sticker Sizes */
.story-floating-music-sticker.size-small {
    padding: 4px 10px 4px 5px !important;
    gap: 6px !important;
}

.story-floating-music-sticker.size-small .story-music-disc-wrap {
    width: 26px !important;
    height: 26px !important;
}

.story-floating-music-sticker.size-small .story-music-title-row {
    font-size: 11px !important;
}

.story-floating-music-sticker.size-small .story-music-sticker-artist {
    font-size: 9px !important;
}

.story-floating-music-sticker.size-medium {
    padding: 6px 14px 6px 6px;
    gap: 8px;
}

.story-floating-music-sticker.size-medium .story-music-disc-wrap {
    width: 36px;
    height: 36px;
}

.story-floating-music-sticker.size-medium .story-music-title-row {
    font-size: 13px;
}

.story-floating-music-sticker.size-medium .story-music-sticker-artist {
    font-size: 11px;
}

.story-floating-music-sticker.size-large {
    padding: 8px 18px 8px 8px !important;
    gap: 10px !important;
}

.story-floating-music-sticker.size-large .story-music-disc-wrap {
    width: 48px !important;
    height: 48px !important;
}

.story-floating-music-sticker.size-large .story-music-title-row {
    font-size: 15px !important;
}

.story-floating-music-sticker.size-large .story-music-sticker-artist {
    font-size: 12px !important;
}

/* Story Customizer Panel in Create Modal */
.story-customizer-panel {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.story-color-palette-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.story-color-dots-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.story-color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.story-color-dot:hover {
    transform: scale(1.15);
}

.story-color-dot.active {
    border-color: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.story-customizer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.story-opt-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.story-opt-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.story-pill-toggle-wrap {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.story-pill-opt {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.story-pill-opt:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.story-pill-opt.active {
    background: rgba(0, 242, 254, 0.15);
    border-color: #00f2fe;
    color: #00f2fe;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

/* Interactive Drag & Drop Stickers on Story Canvas */
.story-drag-item {
    cursor: grab;
    user-select: none;
    touch-action: none;
    pointer-events: auto !important;
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 100;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.story-drag-item:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.04);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.7) !important;
    outline: 1.5px dashed #00f2fe;
}

/* Caption Font Sizes */
.story-caption-overlay.font-small {
    font-size: 13px !important;
    padding: 4px 10px !important;
}

.story-caption-overlay.font-medium {
    font-size: 16px !important;
    padding: 6px 14px !important;
}

.story-caption-overlay.font-large {
    font-size: 22px !important;
    padding: 8px 18px !important;
}

.story-caption-overlay.font-xlarge {
    font-size: 28px !important;
    padding: 10px 22px !important;
}

.story-drag-grip-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    opacity: 0.55;
    margin-left: 6px;
    color: currentColor;
    user-select: none;
    vertical-align: middle;
}

@keyframes stickerFloatIn {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.story-music-disc-wrap {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid #00f2fe;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.5);
    flex-shrink: 0;
}

.story-music-disc-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.story-music-disc-art.rotating {
    animation: rotateVinyl 4s linear infinite;
}

@keyframes rotateVinyl {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.story-music-disc-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #0b0e14;
    border-radius: 50%;
    border: 1px solid #00f2fe;
}

.story-music-sticker-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.story-music-title-row {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-music-sticker-artist {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dancing Audio Wave Bars */
.story-music-wave-bars {
    display: flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 14px;
    margin-left: 6px;
    flex-shrink: 0;
}

.story-music-wave-bars span {
    width: 3px;
    background: #00f2fe;
    border-radius: 2px;
    animation: waveDance 1.2s ease-in-out infinite alternate;
}

.story-music-wave-bars span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.story-music-wave-bars span:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.story-music-wave-bars span:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.story-music-wave-bars span:nth-child(4) { height: 4px; animation-delay: 0.4s; }

@keyframes waveDance {
    0% { height: 3px; }
    100% { height: 14px; }
}

/* ======================================================== */
/* 👻 2. GHOST / ANONYMOUS MODE CSS                         */
/* ======================================================== */

.post-ghost-card {
    border-left: 3px solid #c084fc !important;
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.04) 0%, rgba(0, 0, 0, 0) 100%) !important;
}

.ghost-avatar-box {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.15);
    border: 1.5px solid #a855f7;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
    flex-shrink: 0;
}

.ghost-name {
    color: #e9d5ff !important;
    font-style: italic;
}

.ghost-badge-tag {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.ghost-owner-badge {
    color: #00f2fe;
    font-size: 11.5px;
    font-weight: 700;
    margin-left: 4px;
}

.ghost-mode-active-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #ffffff;
}

.btn-ghost-action {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-ghost-action:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: #c084fc;
}

.btn-ghost-action.btn-ghost-close:hover {
    background: rgba(249, 24, 128, 0.2);
    border-color: #f91880;
    color: #f91880;
}

.btn-upload-custom.btn-ghost-mode.active {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
    color: #c084fc;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

/* ======================================================== */
/* ⏱️ 3. CYBER TIME-CAPSULE VAULT CSS                       */
/* ======================================================== */

.cyber-capsule-vault {
    position: relative;
    background: radial-gradient(circle at center, rgba(13, 22, 38, 0.95) 0%, rgba(8, 11, 18, 0.98) 100%);
    border: 1.5px solid rgba(0, 242, 254, 0.35);
    border-radius: 18px;
    padding: 24px 20px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 242, 254, 0.08);
    overflow: hidden;
    text-align: center;
}

.vault-glow-shield {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.05) 0%, transparent 60%);
    animation: rotateShield 10s linear infinite;
    pointer-events: none;
}

@keyframes rotateShield {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.vault-inner-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.vault-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
}

.vault-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.vault-desc {
    font-size: 13px;
    color: #9ca3af;
    max-width: 380px;
    line-height: 1.4;
}

.vault-countdown-badge {
    margin-top: 8px;
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid #00f2fe;
    color: #00f2fe;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vault-progress-container {
    width: 100%;
    max-width: 380px;
    margin-top: 10px;
}

.vault-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #cfd9de;
    margin-bottom: 6px;
}

.vault-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.vault-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f43f5e 0%, #00f2fe 100%);
    border-radius: 8px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
}

.capsule-author-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 242, 254, 0.1);
    border: 1px dashed rgba(0, 242, 254, 0.4);
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #9ca3af;
}

.capsule-author-tag {
    font-weight: 800;
    color: #00f2fe;
}

/* Capsule Form Settings Box */
.capsule-settings-box {
    background: rgba(0, 242, 254, 0.05);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 14px;
    padding: 14px;
    margin-top: 12px;
}

.capsule-type-tabs {
    display: flex;
    gap: 8px;
}

.capsule-type-btn {
    flex: 1;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.capsule-type-btn.active {
    background: rgba(0, 242, 254, 0.15);
    border-color: #00f2fe;
    color: #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.capsule-pills-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.cap-pill {
    padding: 5px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cfd9de;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.cap-pill:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cap-pill.active {
    background: #00f2fe;
    color: #000000;
    border-color: #00f2fe;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.btn-upload-custom.btn-capsule-mode.active {
    background: rgba(0, 242, 254, 0.2);
    border-color: #00f2fe;
    color: #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

/* ==========================================================================
   🚀 POST MODE STATUS PILLS & BANNERS (Ghost & Time-Capsule)
   ========================================================================== */
.post-mode-status-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 6px 0 10px 0;
}

.mode-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(8px);
}

.mode-status-pill .pill-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.mode-status-pill .pill-title {
    font-weight: 700;
}

.mode-status-pill .pill-note {
    font-size: 11.5px;
    opacity: 0.85;
    font-weight: normal;
}

.mode-status-pill .pill-detail {
    font-size: 12px;
}

/* 👻 Ghost Mode Pill */
.ghost-mode-pill {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(192, 132, 252, 0.08));
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #e9d5ff;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
}

.ghost-mode-pill .pill-title {
    color: #c084fc;
}

/* ⏱️ Capsule Time Lock Pill */
.capsule-time-pill {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(79, 172, 254, 0.06));
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: #cffafe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
}

.capsule-time-pill .pill-title {
    color: #00f2fe;
}

/* ❤️ Capsule Likes Lock Pill */
.capsule-likes-pill {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(244, 63, 94, 0.08));
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ffe4e6;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

.capsule-likes-pill .pill-title {
    color: #fb7185;
}

/* 🔓 Capsule Unlocked Pill */
.capsule-unlocked-pill {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #a7f3d0;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.capsule-unlocked-pill .pill-title {
    color: #34d399;
}

/* ========================================================
   🚨 CYBER REPORT POST MODAL
======================================================== */
.cyber-report-modal-box {
    background: linear-gradient(145deg, #10141d 0%, #090c12 100%);
    border: 1.5px solid rgba(249, 24, 128, 0.35);
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.95),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 45px rgba(249, 24, 128, 0.15);
    animation: reportModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    color: #ffffff;
    position: relative;
}

@keyframes reportModalPop {
    from { opacity: 0; transform: scale(0.9) translateY(20px); filter: blur(6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.cyber-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(16, 20, 30, 0.6);
}

.report-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.report-shield-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(249, 24, 128, 0.12);
    border: 1.5px solid rgba(249, 24, 128, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 0 16px rgba(249, 24, 128, 0.3);
    flex-shrink: 0;
}

.report-badge-tag {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #f91880;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.report-title-text {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.cyber-report-body {
    padding: 20px 24px;
    overflow-y: auto;
}

.report-section-label {
    font-size: 13px;
    font-weight: 700;
    color: #cfd9de;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.report-reasons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .report-reasons-grid { grid-template-columns: 1fr; }
}

.report-reason-card {
    position: relative;
    background: rgba(18, 22, 32, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 4px;
    user-select: none;
}

.report-reason-card:hover {
    background: rgba(24, 30, 44, 0.9);
    border-color: rgba(0, 210, 255, 0.3);
    transform: translateY(-2px);
}

.report-reason-card.selected {
    background: rgba(249, 24, 128, 0.12);
    border-color: #f91880;
    box-shadow: 0 0 16px rgba(249, 24, 128, 0.25), inset 0 0 12px rgba(249, 24, 128, 0.1);
}

.reason-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reason-icon-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.reason-check-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.report-reason-card.selected .reason-check-dot {
    border-color: #f91880;
    background: #f91880;
    box-shadow: 0 0 8px #f91880;
}

.reason-check-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.report-reason-card.selected .reason-check-dot::after { opacity: 1; }

.reason-desc {
    font-size: 11px;
    color: #71767b;
    line-height: 1.35;
}

.report-textarea-wrap {
    position: relative;
    margin-bottom: 20px;
}

.report-textarea {
    width: 100%;
    box-sizing: border-box;
    background: #080a0e;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #ffffff;
    padding: 12px 14px;
    font-size: 13px;
    outline: none;
    resize: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.report-textarea:focus {
    border-color: #00d2ff;
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15);
    background: #0c1017;
}

.report-char-count {
    font-size: 11px;
    color: #71767b;
    text-align: right;
    margin-top: 4px;
}

.cyber-report-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(16, 20, 30, 0.5);
}

.btn-report-submit {
    background: linear-gradient(135deg, #f91880 0%, #b05bf7 100%);
    color: #ffffff;
    border: none;
    padding: 11px 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(249, 24, 128, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-report-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 26px rgba(249, 24, 128, 0.6);
}
.btn-report-submit:active { transform: translateY(1px); }
.btn-report-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ========================================================
   📢 FLOATING CYBER AD WIDGET (โฆษณาลอยมุมบนขวา)
======================================================== */
.floating-cyber-ad-widget {
    position: fixed;
    top: 76px;
    right: 24px;
    z-index: 9998;
    width: 310px;
    max-width: calc(100vw - 32px);
    background: rgba(10, 14, 23, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 18px;
    padding: 14px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    overflow: hidden;
}

@keyframes adSlideIn {
    0%   { opacity: 0; transform: translateX(50px) scale(0.9); filter: blur(5px); }
    100% { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

@keyframes adDismissed {
    0%   { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
    100% { opacity: 0; transform: scale(0.7) translateY(-20px); filter: blur(8px); }
}

@keyframes adWarpDissolve {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: brightness(1) drop-shadow(0 0 10px rgba(0, 242, 254, 0.4));
    }
    18% {
        opacity: 1;
        transform: scale(1.08) rotate(-1.5deg);
        filter: brightness(3.5) contrast(1.4) drop-shadow(0 0 40px #00f2fe) drop-shadow(0 0 80px #f91880);
    }
    38% {
        opacity: 0.95;
        transform: scale(1.02) rotate(1.5deg);
        filter: brightness(7) drop-shadow(0 0 60px #ffffff);
    }
    60% {
        opacity: 0.7;
        transform: scale(0.55) rotate(-5deg);
        filter: brightness(9) blur(6px);
    }
    100% {
        opacity: 0;
        transform: scale(0.01) rotate(25deg);
        filter: brightness(20) blur(22px);
    }
}

.floating-cyber-ad-widget.ad-slide-in {
    animation: adSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-cyber-ad-widget.ad-dismissed {
    animation: adDismissed 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-cyber-ad-widget.ad-warp-dissolving {
    animation: adWarpDissolve 0.55s cubic-bezier(0.1, 0.9, 0.2, 1) forwards !important;
    pointer-events: none !important;
}

/* Header & Close */
.cyber-ad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 2px;
}

.cyber-ad-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.ad-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: adPulse 1.5s infinite;
}

@keyframes adPulse {
    0%   { transform: scale(0.9); opacity: 0.7; }
    50%  { transform: scale(1.4); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.cyber-ad-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #8b949e;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.cyber-ad-close-btn:hover {
    background: rgba(249, 24, 128, 0.2);
    border-color: #f91880;
    color: #f91880;
    transform: rotate(90deg) scale(1.1);
}

/* Content Area */
.cyber-ad-content {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cyber-ad-image-wrap {
    width: 100%;
    height: 125px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    position: relative;
}

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

.cyber-ad-content:hover .cyber-ad-image {
    transform: scale(1.04);
}

.cyber-ad-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cyber-ad-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.cyber-ad-desc {
    margin: 0;
    font-size: 11px;
    color: #8b949e;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cyber-ad-action {
    margin-top: 4px;
}

/* Carousel Slide & Multi-Ad Navigation */
.cyber-ad-counter {
    font-size: 10px;
    font-weight: 700;
    color: #8b949e;
    font-family: monospace;
    letter-spacing: 0.5px;
}

.cyber-ad-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cfd9de;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.cyber-ad-nav-btn:hover {
    background: rgba(0, 242, 254, 0.2);
    border-color: #00f2fe;
    color: #00f2fe;
    transform: scale(1.1);
}

.cyber-ad-slides-wrapper {
    position: relative;
    width: 100%;
}

.cyber-ad-slide {
    display: none;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    opacity: 0;
    transform: translateX(15px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyber-ad-slide.active {
    display: flex;
    opacity: 1;
    transform: translateX(0);
}

.cyber-ad-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-top: 2px;
}

.cyber-ad-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyber-ad-dot.active {
    width: 16px;
    border-radius: 4px;
    background: #00f2fe;
    box-shadow: 0 0 8px #00f2fe;
}

.floating-cyber-ad-widget.theme-magenta .cyber-ad-dot.active { background: #f91880; box-shadow: 0 0 8px #f91880; }
.floating-cyber-ad-widget.theme-gold .cyber-ad-dot.active { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }
.floating-cyber-ad-widget.theme-emerald .cyber-ad-dot.active { background: #34d399; box-shadow: 0 0 8px #34d399; }
.floating-cyber-ad-widget.theme-purple .cyber-ad-dot.active { background: #c084fc; box-shadow: 0 0 8px #c084fc; }

.cyber-ad-cta-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.cyber-ad-cta-btn:hover {
    transform: translateY(-1px);
}

/* Color Themes */
/* 1. Theme Cyan */
.floating-cyber-ad-widget.theme-cyan {
    border: 1.5px solid rgba(0, 242, 254, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 242, 254, 0.15);
}
.floating-cyber-ad-widget.theme-cyan .cyber-ad-badge {
    background: rgba(0, 242, 254, 0.15);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.3);
}
.floating-cyber-ad-widget.theme-cyan .ad-pulse-dot { background: #00f2fe; box-shadow: 0 0 6px #00f2fe; }
.floating-cyber-ad-widget.theme-cyan .cyber-ad-content:hover .cyber-ad-title { color: #00f2fe; }
.floating-cyber-ad-widget.theme-cyan .cyber-ad-cta-btn {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #000000;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

/* 2. Theme Magenta */
.floating-cyber-ad-widget.theme-magenta {
    border: 1.5px solid rgba(249, 24, 128, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(249, 24, 128, 0.15);
}
.floating-cyber-ad-widget.theme-magenta .cyber-ad-badge {
    background: rgba(249, 24, 128, 0.15);
    color: #f91880;
    border: 1px solid rgba(249, 24, 128, 0.3);
}
.floating-cyber-ad-widget.theme-magenta .ad-pulse-dot { background: #f91880; box-shadow: 0 0 6px #f91880; }
.floating-cyber-ad-widget.theme-magenta .cyber-ad-content:hover .cyber-ad-title { color: #f91880; }
.floating-cyber-ad-widget.theme-magenta .cyber-ad-cta-btn {
    background: linear-gradient(135deg, #f91880 0%, #b05bf7 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(249, 24, 128, 0.3);
}

/* 3. Theme Gold */
.floating-cyber-ad-widget.theme-gold {
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(245, 158, 11, 0.15);
}
.floating-cyber-ad-widget.theme-gold .cyber-ad-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.floating-cyber-ad-widget.theme-gold .ad-pulse-dot { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
.floating-cyber-ad-widget.theme-gold .cyber-ad-content:hover .cyber-ad-title { color: #fbbf24; }
.floating-cyber-ad-widget.theme-gold .cyber-ad-cta-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000000;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* 4. Theme Emerald */
.floating-cyber-ad-widget.theme-emerald {
    border: 1.5px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(16, 185, 129, 0.15);
}
.floating-cyber-ad-widget.theme-emerald .cyber-ad-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.floating-cyber-ad-widget.theme-emerald .ad-pulse-dot { background: #34d399; box-shadow: 0 0 6px #34d399; }
.floating-cyber-ad-widget.theme-emerald .cyber-ad-content:hover .cyber-ad-title { color: #34d399; }
.floating-cyber-ad-widget.theme-emerald .cyber-ad-cta-btn {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    color: #000000;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* 5. Theme Purple */
.floating-cyber-ad-widget.theme-purple {
    border: 1.5px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(168, 85, 247, 0.15);
}
.floating-cyber-ad-widget.theme-purple .cyber-ad-badge {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.floating-cyber-ad-widget.theme-purple .ad-pulse-dot { background: #c084fc; box-shadow: 0 0 6px #c084fc; }
.floating-cyber-ad-widget.theme-purple .cyber-ad-content:hover .cyber-ad-title { color: #c084fc; }
.floating-cyber-ad-widget.theme-purple .cyber-ad-cta-btn {
    background: linear-gradient(135deg, #c084fc 0%, #9333ea 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .floating-cyber-ad-widget {
        top: auto;
        bottom: 65px;
        right: 14px;
        width: 270px;
        padding: 10px 12px;
    }
    .cyber-ad-image-wrap {
        height: 105px;
    }
}

/* ========================================================
   👑 MASTERKAN CONTACT HUB & WIDGETS
======================================================== */

/* Sidebar Right Mini Card Widget */
.sidebar-master-card {
    position: relative;
    margin-top: 16px;
    background: linear-gradient(135deg, rgba(20, 26, 38, 0.9) 0%, rgba(10, 14, 23, 0.95) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    border-radius: 18px;
    padding: 12px 14px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(245, 158, 11, 0.1);
}
.sidebar-master-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.25);
}
.sidebar-master-card .master-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}
.master-card-avatar-wrap {
    position: relative;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}
.master-card-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f59e0b;
}
.master-card-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 11px;
    height: 11px;
    background: #10b981;
    border: 2px solid #000;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}
.master-card-info {
    flex: 1;
    min-width: 0;
}
.master-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 4px;
}
.master-card-sub {
    font-size: 11px;
    color: #fbbf24;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.master-card-arrow {
    color: #fbbf24;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}
.sidebar-master-card:hover .master-card-arrow {
    transform: translateX(3px);
}

/* Master Contact Hero (on contact_master.php) */
.contact-master-hero {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 32, 46, 0.8) 0%, rgba(13, 17, 26, 0.95) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 158, 11, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    overflow: hidden;
}
.master-hero-top {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
@media (max-width: 600px) {
    .master-hero-top { flex-direction: column; align-items: center; text-align: center; }
}
.master-hero-avatar-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}
.master-hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}
.master-hero-online-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #10b981;
    border: 3px solid #0a0e17;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
}
.master-hero-info {
    flex: 1;
    min-width: 0;
}
.master-hero-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
@media (max-width: 600px) {
    .master-hero-title-row { justify-content: center; }
}
.master-hero-name {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
}
.master-role-badge {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.3) 100%);
    border: 1px solid #f59e0b;
    color: #fbbf24;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}
.master-hero-username {
    font-size: 14px;
    color: #8b949e;
    margin-top: 2px;
}
.master-hero-bio {
    margin: 10px 0 12px 0;
    font-size: 13px;
    color: #cfd9de;
    line-height: 1.5;
}
.master-hero-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #cfd9de;
}
.hero-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.hero-status-dot.online { background: #10b981; box-shadow: 0 0 8px #10b981; }
.hero-status-dot.offline { background: #6b7280; }

.master-hero-welcome {
    margin-top: 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #e5e7eb;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 14px;
}
.master-hero-welcome svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #fbbf24;
}

/* Contact Channels Grid */
.contact-channels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 700px) {
    .contact-channels-grid { grid-template-columns: 1fr; }
}

.contact-card {
    background: rgba(15, 20, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.contact-card:hover {
    transform: translateY(-3px);
}

.channel-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
}
.channel-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.channel-meta {
    flex: 1;
    min-width: 0;
}
.channel-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}
.channel-sub {
    display: block;
    font-size: 12px;
    color: #8b949e;
    margin-top: 3px;
}

.contact-quick-textarea {
    width: 100%;
    box-sizing: border-box;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #fff;
    padding: 10px 12px;
    font-size: 13px;
    resize: none;
    font-family: inherit;
}
.contact-quick-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.channel-btn-action {
    margin-top: 16px;
    padding: 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

/* 1. DM Card */
.contact-card.channel-dm {
    grid-column: 1 / -1;
    border-color: rgba(29, 155, 240, 0.3);
}
.contact-card.channel-dm:hover {
    border-color: rgba(29, 155, 240, 0.7);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(29, 155, 240, 0.2);
}
.icon-dm { background: rgba(29, 155, 240, 0.15); color: #1d9bf0; border: 1px solid rgba(29, 155, 240, 0.3); }

/* 2. LINE Card */
.contact-card.channel-line {
    border-color: rgba(6, 199, 85, 0.3);
}
.contact-card.channel-line:hover {
    border-color: rgba(6, 199, 85, 0.8);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 25px rgba(6, 199, 85, 0.25);
}
.icon-line { background: rgba(6, 199, 85, 0.15); color: #06c755; border: 1px solid rgba(6, 199, 85, 0.3); }
.contact-card.channel-line .channel-btn-action {
    background: linear-gradient(135deg, #06c755 0%, #00b900 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(6, 199, 85, 0.3);
}

/* 3. Facebook Card */
.contact-card.channel-fb {
    border-color: rgba(24, 119, 242, 0.3);
}
.contact-card.channel-fb:hover {
    border-color: rgba(24, 119, 242, 0.8);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 25px rgba(24, 119, 242, 0.25);
}
.icon-fb { background: rgba(24, 119, 242, 0.15); color: #1877f2; border: 1px solid rgba(24, 119, 242, 0.3); }
.contact-card.channel-fb .channel-btn-action {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.3);
}

/* 4. Email Card */
.contact-card.channel-email {
    border-color: rgba(168, 85, 247, 0.3);
}
.contact-card.channel-email:hover {
    border-color: rgba(168, 85, 247, 0.8);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 25px rgba(168, 85, 247, 0.25);
}
.icon-email { background: rgba(168, 85, 247, 0.15); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.3); }

/* ==========================================================================
   🌌 CYBER HUD POST CARD & SCI-FI FEED UPGRADE
   ========================================================================== */

.post-item {
    position: relative;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: background 0.25s, border-color 0.25s, transform 0.2s, box-shadow 0.25s;
    background: rgba(10, 14, 23, 0.4);
}

.post-item:hover {
    background: rgba(0, 242, 254, 0.025);
    border-bottom-color: rgba(0, 242, 254, 0.25);
}

.cyber-card-corner {
    position: absolute;
    width: 8px;
    height: 8px;
    pointer-events: none;
    opacity: 0.35;
    transition: opacity 0.25s, width 0.25s, height 0.25s, filter 0.25s;
}

.cyber-card-corner.top-left {
    top: 0;
    left: 0;
    border-top: 2px solid #00f2fe;
    border-left: 2px solid #00f2fe;
}

.cyber-card-corner.bottom-right {
    bottom: 0;
    right: 0;
    border-bottom: 2px solid #f91880;
    border-right: 2px solid #f91880;
}

.post-item:hover .cyber-card-corner {
    opacity: 1;
    width: 14px;
    height: 14px;
    filter: drop-shadow(0 0 5px currentColor);
}

.cyber-node-tag {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 10px;
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.25);
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.cyber-time-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

/* Cyber Terminal Header for Post Composer */
.cyber-terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 8px;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-dots .dot-red { background: #ef4444; }
.terminal-dots .dot-yellow { background: #eab308; }
.terminal-dots .dot-green { background: #22c55e; }

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #00f2fe;
    letter-spacing: 1px;
    font-weight: 700;
}

.terminal-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00f2fe;
    box-shadow: 0 0 8px #00f2fe;
    animation: cyberPulseDot 1.5s infinite;
}

@keyframes cyberPulseDot {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.3); }
}

@keyframes cyberBeamPrepend {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.96);
        background: rgba(0, 242, 254, 0.25);
        box-shadow: 0 0 30px rgba(0, 242, 254, 0.6);
    }
    60% {
        opacity: 1;
        transform: translateY(0) scale(1.01);
        background: rgba(0, 242, 254, 0.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        background: rgba(10, 14, 23, 0.4);
        box-shadow: none;
    }
}

.post-item.new-post-beam {
    animation: cyberBeamPrepend 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cyberDissolvePost {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1) blur(0);
    }
    30% {
        opacity: 1;
        transform: scale(1.02);
        filter: brightness(3) blur(2px) drop-shadow(0 0 15px #ef4444);
    }
    100% {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-top: 0;
        margin-bottom: 0;
        transform: scale(0.7) translateY(-20px);
        filter: brightness(5) blur(15px);
    }
}

.post-item.post-dissolving {
    animation: cyberDissolvePost 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

/* ==========================================================================
   📱 CYBER MOBILE DRAWER / BOTTOM SHEET
   ========================================================================== */

.cyber-drawer-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 520px;
    margin: 0 auto;
    background: rgba(10, 14, 23, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 242, 254, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px 24px 0 0;
    padding: 12px 20px 30px 20px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 242, 254, 0.15);
    z-index: 10001;
    animation: slideUpSheet 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-height: 85vh;
    overflow-y: auto;
}

@keyframes slideUpSheet {
    0% { transform: translateY(100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.drawer-drag-handle {
    width: 44px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin: 0 auto 15px auto;
    cursor: pointer;
}

.drawer-profile-header {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
}

.drawer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    cursor: pointer;
}

.drawer-display-name {
    font-weight: 700;
    color: #fff;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.drawer-username {
    font-size: 13px;
    color: var(--text-muted);
}

.drawer-stats-row {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.drawer-stats-row strong {
    color: #fff;
}

.drawer-menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    transition: background 0.15s, transform 0.15s;
    cursor: pointer;
    background: transparent;
}

.drawer-menu-item:hover, .drawer-menu-item:active {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.drawer-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.drawer-item-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.drawer-item-title {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.drawer-item-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.drawer-arrow {
    font-size: 18px;
    color: var(--text-muted);
    font-weight: bold;
}

.drawer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 0;
}

/* Cyber Toggle Switch for Drawer */
.cyber-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cyber-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cyber-switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

input:checked + .cyber-switch-slider {
    background: linear-gradient(135deg, #00f2fe, #1d9bf0);
    border-color: #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

input:checked + .cyber-switch-slider:before {
    transform: translateX(20px);
    background-color: #fff;
}

/* Visibility toggles for Desktop vs Mobile */
@media (min-width: 769px) {
    .nav-mobile-only {
        display: none !important;
    }
    .nav-desktop-only {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .nav-mobile-only {
        display: flex !important;
    }
    .nav-desktop-only {
        display: none !important;
    }
}

/* ==========================================================================
   ⚡ ZERO-REFRESH SPA TRANSITIONS
   ========================================================================== */

@keyframes spaFadeIn {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.spa-page-transition {
    animation: spaFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   🍞 CYBER TOAST NOTIFICATIONS & SPINNERS
   ========================================================================== */

.cyber-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999999;
    pointer-events: none;
    max-width: 90vw;
    width: max-content;
}

.cyber-toast {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 30px;
    background: rgba(10, 14, 23, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 242, 254, 0.2);
    pointer-events: auto;
    animation: toastPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s, transform 0.3s;
}

.cyber-toast.cyber-toast-success {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(34, 197, 94, 0.25);
}

.cyber-toast.cyber-toast-error {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(239, 68, 68, 0.3);
}

.cyber-toast.cyber-toast-warning {
    border-color: rgba(234, 179, 8, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(234, 179, 8, 0.25);
}

.cyber-toast.fade-out {
    opacity: 0;
    transform: translateY(-15px) scale(0.9);
}

@keyframes toastPopIn {
    0% { opacity: 0; transform: translateY(-20px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.cyber-spinner-small {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000000;
    border-radius: 50%;
    display: inline-block;
    animation: cyberSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes cyberSpin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   📱 MOBILE AUTO-ZOOM & GESTURE STABILIZER
   ========================================================================== */
html, body {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (max-width: 768px) {
    /* iOS Safari will not auto-zoom on input focus when font-size is at least 16px */
    input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), 
    textarea, 
    select,
    .search-box, 
    .post-textarea, 
    .comment-input, 
    .cyber-input, 
    .music-search-input, 
    .story-caption-textarea,
    .cyber-modal-container input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
    .cyber-modal-container textarea {
        font-size: 16px !important;
    }
}

/* ==========================================================================
   ⚡ CYBER AURA RUNNING BORDER LASER (FEED POST CARDS)
   ========================================================================== */

/* Hide hard corners */
.cyber-card-corner {
    display: none !important;
}

/* ==========================================================================
   🎬 RESPONSIVE VIDEO & AUDIO EMBEDS (YOUTUBE, SPOTIFY)
   ========================================================================== */

.video-embed-container {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    margin: 12px 0 6px 0;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.youtube-embed-wrapper {
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
}

.youtube-embed-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 14px;
}

.spotify-embed-container {
    width: 100%;
    margin: 12px 0 6px 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

/* 🛡️ Modals, Drawers & Dropdown Overscroll Containment (Prevent Scroll Bleed) */
.modal-overlay,
.modal-box,
.modal-body,
.cyber-modal,
.cyber-mecha-modal,
.cyber-notif-modal-card,
.cyber-notif-body,
.cyber-drawer-modal,
.cyber-drawer-content,
#notifList,
#modalUserList,
.global-search-dropdown,
.notification-dropdown,
.notif-dropdown-list,
.dropdown-menu,
.edit-modal-body,
.share-modal-body,
.gif-modal-dialog,
.gif-modal-grid-container,
.emoji-picker-container {
    overscroll-behavior: contain;
}
/* ==========================================================================
   📞/📹 WEBRTC VOICE & VIDEO CALLING STYLES
   ========================================================================== */
.btn-chat-call-action {
    background: rgba(29, 155, 240, 0.12);
    border: 1px solid rgba(29, 155, 240, 0.3);
    color: #1d9bf0;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.btn-chat-call-action:hover {
    background: #1d9bf0;
    color: #fff;
    transform: translateY(-1px);
}
.btn-chat-call-action.video {
    background: rgba(0, 242, 254, 0.12);
    border-color: rgba(0, 242, 254, 0.3);
    color: #00f2fe;
}
.btn-chat-call-action.video:hover {
    background: #00f2fe;
    color: #000;
}

.call-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.92) 0%, rgba(5, 7, 12, 0.98) 100%);
    backdrop-filter: blur(25px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease-out;
}

.call-card {
    background: rgba(18, 24, 38, 0.88);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 28px;
    width: 90%;
    max-width: 440px;
    padding: 34px 26px;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 242, 254, 0.12);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.call-card.video-mode {
    width: 95vw;
    max-width: 960px;
    height: 86vh;
    max-height: 680px;
    padding: 0;
    background: #05070d;
    border-radius: 24px;
    box-shadow: 0 25px 90px rgba(0, 0, 0, 0.95), 0 0 45px rgba(0, 242, 254, 0.2);
}

.call-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;
    background: #05070d;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 100% Full-Frame Non-Zooming Video */
.call-remote-video {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    background: #05070d;
}

.call-local-video {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 130px;
    height: 175px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid #00f2fe;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85), 0 0 20px rgba(0, 242, 254, 0.35);
    z-index: 25;
    background: #0d1117;
    transition: transform 0.2s;
}
.call-local-video:hover {
    transform: scale(1.04);
}

.call-user-info {
    transition: opacity 0.3s ease;
    z-index: 10;
}

.call-card.video-mode .call-user-info {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.call-card.video-mode .call-user-info .call-avatar-wrap {
    width: 38px;
    height: 38px;
    margin: 0;
}

.call-card.video-mode .call-user-info .call-partner-name {
    font-size: 14px;
    margin-bottom: 2px;
}

.call-card.video-mode .call-user-info .call-status-label {
    font-size: 11px;
    margin-bottom: 0;
}

.call-avatar-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 16px auto;
    border-radius: 50%;
}

.call-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #00f2fe;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

.call-avatar-wrap.pulsing::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid #00f2fe;
    animation: callPulse 1.5s infinite;
}

@keyframes callPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 0.3; }
    100% { transform: scale(1.3); opacity: 0; }
}

.call-partner-name {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.call-status-label {
    font-size: 14px;
    color: #8b949e;
    margin-bottom: 12px;
}

.call-timer {
    display: inline-block;
    font-size: 14px;
    font-weight: 800;
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.25);
    padding: 3px 12px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
}

.call-card.video-mode .call-timer {
    margin-bottom: 0;
    font-size: 12px;
    padding: 2px 8px;
}

/* Floating Cyber Dock for Controls */
.call-controls-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
    width: 100%;
    z-index: 30;
}

.call-card.video-mode .call-controls-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 242, 254, 0.25);
    padding: 10px 20px;
    border-radius: 40px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75), 0 0 20px rgba(0, 242, 254, 0.15);
}

.call-btn-control {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.call-btn-control:hover {
    background: rgba(0, 242, 254, 0.2);
    border-color: #00f2fe;
    transform: scale(1.08);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.35);
}
.call-btn-control.active {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.35);
}

.call-btn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

/* ==========================================================================
   Cyberpunk Glassmorphism Device Settings Modal
   ========================================================================== */
.call-device-selector {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
    max-width: 92vw;
    background: rgba(10, 14, 28, 0.95);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(0, 242, 254, 0.45);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.92), 0 0 35px rgba(0, 242, 254, 0.3);
    border-radius: 20px;
    padding: 20px 22px;
    z-index: 100;
    color: #fff;
    animation: zoomInPulse 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomInPulse {
    from {
        opacity: 0;
        transform: translate(-50%, -46%) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.device-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 242, 254, 0.18);
}

.device-modal-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #00f2fe;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.btn-device-close-icon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-device-close-icon:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.1);
}

.call-device-selector .device-select-group {
    margin-bottom: 16px;
    text-align: left;
}

.call-device-selector label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.call-device-selector select {
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 10px;
    color: #f8fafc;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.call-device-selector select:focus {
    border-color: #00f2fe;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.45);
}

.call-device-selector select option {
    background: #0b101e;
    color: #fff;
    padding: 8px;
}

.device-modal-footer {
    margin-top: 18px;
}

.call-device-selector .btn-close-device-settings {
    width: 100%;
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    border: none;
    border-radius: 12px;
    color: #050b14;
    font-weight: 800;
    font-size: 14px;
    padding: 11px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.call-device-selector .btn-close-device-settings:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.6);
}

.call-btn-accept {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.45);
}
.call-btn-accept:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.7);
}

.call-btn-reject, .call-btn-end {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.45);
}
.call-btn-reject:hover, .call-btn-end:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.7);
}

/* ==========================================================================
   🎙️ VOICE NOTES RECORDER & CUSTOM AUDIO PLAYER
   ========================================================================== */
.chat-voice-recording-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #16181c;
    border-top: 1px solid var(--border);
    border-radius: 24px;
    margin: 8px 12px;
}

.voice-rec-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-rec-blink {
    animation: blinkRec 1s infinite;
}
@keyframes blinkRec {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

.voice-rec-timer {
    font-size: 13px;
    font-weight: bold;
    color: #f4212e;
    min-width: 35px;
}

.voice-rec-canvas {
    border-radius: 6px;
    background: rgba(29, 155, 240, 0.08);
}

.voice-rec-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-rec-btn-cancel {
    background: none;
    border: 1px solid rgba(244, 33, 46, 0.4);
    color: #f4212e;
    border-radius: 16px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.voice-rec-btn-cancel:hover {
    background: rgba(244, 33, 46, 0.15);
}

.voice-rec-btn-stop {
    background: #2a3447;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #00f2fe;
    border-radius: 16px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}
.voice-rec-btn-stop:hover {
    background: #37445c;
}

.voice-rec-btn-send {
    background: linear-gradient(135deg, #1d9bf0, #0077ff);
    border: none;
    color: #fff;
    border-radius: 16px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}
.voice-rec-btn-send:hover {
    opacity: 0.9;
    transform: scale(1.03);
}

.voice-preview-play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1d9bf0;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}
.voice-preview-play-btn:hover {
    background: #00f2fe;
    color: #000;
}

.voice-note-player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px;
    min-width: 190px;
    max-width: 260px;
}

.voice-play-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1d9bf0;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.voice-play-btn:hover {
    transform: scale(1.08);
}

.voice-waveform-track {
    flex: 1;
    height: 20px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0 4px;
    overflow: hidden;
}

.voice-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(29, 155, 240, 0.3);
    pointer-events: none;
}

.voice-waveform-bars {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 14px;
    z-index: 2;
}

.vbar {
    width: 3px;
    background: #1d9bf0;
    border-radius: 2px;
}

.voice-time-text {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 28px;
}

/* ==========================================================================
   ↩️ QUOTED REPLIES & HIGHLIGHTS
   ========================================================================== */
.chat-reply-preview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #16181c;
    border-top: 1px solid var(--border);
    border-left: 3px solid #1d9bf0;
}

.chat-reply-close-btn {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    padding: 2px 6px;
}
.chat-reply-close-btn:hover {
    color: #f4212e;
}

.chat-quoted-reply-box {
    background: rgba(0, 0, 0, 0.25);
    border-left: 3px solid #1d9bf0;
    padding: 6px 10px;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 12px;
}
.chat-quoted-author {
    font-weight: bold;
    color: #1d9bf0;
    margin-bottom: 2px;
}
.chat-quoted-text {
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-bubble-highlight {
    animation: flashBubble 1.5s ease-out;
}
@keyframes flashBubble {
    0%, 100% { background: transparent; }
    30% { background: rgba(29, 155, 240, 0.25); border-radius: 16px; }
}

/* ==========================================================================
   ❤️ MESSAGE REACTIONS & BUBBLE ACTIONS
   ========================================================================== */
.chat-bubble-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    max-width: 100%;
    width: fit-content;
}

.chat-bubble-group.mine .chat-bubble-wrapper {
    flex-direction: row-reverse;
}

.chat-bubble-group.theirs .chat-bubble-wrapper {
    flex-direction: row;
}

.chat-bubble-actions {
    position: absolute;
    bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(18, 20, 24, 0.96);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 3px 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55), 0 0 10px rgba(0, 242, 254, 0.15);
    z-index: 15;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(2px) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    transition-delay: 0.45s; /* หน่วงเวลา 0.45 วิ ไม่ให้ปุ่มหายไวตอนขยับเมาส์ไปกด */
}

/* สร้างสะพานเชื่อมพื้นที่สัมผัสระหว่างฟองข้อความกับปุ่ม (Invisible Hit Bridge) */
.chat-bubble-actions::before {
    content: '';
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: -15px;
    right: -15px;
    z-index: -1;
}

/* ผู้ส่ง (Mine) -> แถบปุ่มอยู่ด้านซ้ายล่าง */
.chat-bubble-group.mine .chat-bubble-actions {
    right: calc(100% + 8px);
    left: auto;
}

/* ผู้รับ (Theirs) -> แถบปุ่มอยู่ด้านขวาล่าง */
.chat-bubble-group.theirs .chat-bubble-actions {
    left: calc(100% + 8px);
    right: auto;
}

/* เมื่อ Hover บนข้อความ หรือ กำลัง Hover อยู่บนแถบปุ่ม หรือกดค้าง/คลิกเปิด */
.chat-bubble-wrapper:hover .chat-bubble-actions,
.chat-bubble-group:hover .chat-bubble-actions,
.chat-bubble-wrapper.actions-open .chat-bubble-actions,
.chat-bubble-actions:hover,
.chat-bubble-actions.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
    transition-delay: 0s !important;
}

.bubble-act-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 10px;
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bubble-act-btn:hover {
    transform: scale(1.15);
    background: rgba(0, 242, 254, 0.15);
    border-color: #00f2fe;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}
.bubble-act-btn.bubble-act-del:hover {
    background: rgba(255, 42, 109, 0.25) !important;
    border-color: #ff2a6d !important;
    color: #ff2a6d !important;
    box-shadow: 0 0 12px rgba(255, 42, 109, 0.6) !important;
}

.conv-item-quick-purge {
    display: none;
    background: rgba(255, 42, 109, 0.15);
    border: 1px solid rgba(255, 42, 109, 0.35);
    color: #ff2a6d;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
    margin-left: 6px;
}
.conv-item:hover .conv-item-quick-purge {
    display: inline-flex;
}
.conv-item-quick-purge:hover {
    background: #ff2a6d;
    color: #fff;
    transform: scale(1.18);
    box-shadow: 0 0 10px rgba(255, 42, 109, 0.6);
}

/* ======================================================== */
/* 💥 CYBER CONVERSATION LONG PRESS & PURGE MODAL          */
/* ======================================================== */
.conv-item {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    transition: background 0.2s, transform 0.15s;
    overflow: hidden;
}
.conv-item.holding {
    background: rgba(255, 42, 109, 0.14) !important;
    transform: scale(0.985);
    box-shadow: inset 0 0 0 1px rgba(255, 42, 109, 0.55);
}
.conv-item.holding::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff2a6d, #00f2fe);
    width: 0%;
    animation: holdProgressBar 2s linear forwards;
    z-index: 5;
}
@keyframes holdProgressBar {
    from { width: 0%; }
    to { width: 100%; }
}

.cyber-purge-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 10, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    padding: 16px;
}
.cyber-purge-modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}
.cyber-purge-card {
    background: #0d1117;
    border: 1px solid rgba(255, 42, 109, 0.4);
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    padding: 24px 22px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 42, 109, 0.25);
    text-align: center;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cyber-purge-modal-backdrop.open .cyber-purge-card {
    transform: scale(1) translateY(0);
}
.cyber-purge-icon-wrap {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(255, 42, 109, 0.12);
    border: 2px solid #ff2a6d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #ff2a6d;
    box-shadow: 0 0 20px rgba(255, 42, 109, 0.5);
    animation: cyberPulseGlow 2s infinite ease-in-out;
}
@keyframes cyberPulseGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 42, 109, 0.4); }
    50% { box-shadow: 0 0 30px rgba(255, 42, 109, 0.8); }
}
.cyber-purge-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.cyber-purge-desc {
    font-size: 13.5px;
    color: #8b949e;
    line-height: 1.55;
    margin-bottom: 22px;
}
.cyber-purge-actions-row {
    display: flex;
    gap: 10px;
}
.btn-cyber-cancel {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-cyber-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.btn-cyber-purge-confirm {
    flex: 1.2;
    background: linear-gradient(135deg, #ff2a6d 0%, #ff0055 100%);
    border: none;
    color: #fff;
    border-radius: 14px;
    padding: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(255, 42, 109, 0.45);
    transition: all 0.2s;
}
.btn-cyber-purge-confirm:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 25px rgba(255, 42, 109, 0.75);
    transform: scale(1.02);
}

/* ======================================================== */
/* ⚡ CYBER CHAT HEADER ACTION BUTTONS                      */
/* ======================================================== */
.btn-chat-call-action {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: #00f2fe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-chat-call-action:hover {
    transform: scale(1.1);
    background: rgba(0, 242, 254, 0.2);
    border-color: #00f2fe;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.5);
    color: #fff;
}
.btn-chat-call-action.video {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.35);
    color: #10b981;
}
.btn-chat-call-action.video:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
    color: #fff;
}
.btn-chat-call-action.purge-btn {
    background: rgba(255, 42, 109, 0.08);
    border-color: rgba(255, 42, 109, 0.35);
    color: #ff2a6d;
}
.btn-chat-call-action.purge-btn:hover {
    background: rgba(255, 42, 109, 0.22);
    border-color: #ff2a6d;
    box-shadow: 0 0 16px rgba(255, 42, 109, 0.6);
    color: #fff;
}
.btn-chat-profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 700;
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.06);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 20px;
    padding: 7px 14px;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-chat-profile-pill:hover {
    background: rgba(0, 242, 254, 0.18);
    border-color: #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
    color: #fff;
    transform: scale(1.03);
}

.chat-reaction-picker {
    position: absolute;
    z-index: 99999;
    background: #1e2228;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 4px 8px;
    display: flex;
    gap: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    animation: popIn 0.15s ease-out;
}
@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.rx-emoji-btn {
    font-size: 18px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 50%;
    transition: transform 0.12s;
}
.rx-emoji-btn:hover {
    transform: scale(1.3);
}

.chat-reaction-pills-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
    margin-bottom: 4px;
}

.chat-reaction-pill {
    background: #1c1f24;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    transition: all 0.15s;
}
.chat-reaction-pill.reacted {
    background: rgba(29, 155, 240, 0.2);
    border-color: #1d9bf0;
}
.chat-reaction-pill:hover {
    transform: scale(1.08);
}

/* ==========================================================================
   ✍️ TYPING INDICATOR
   ========================================================================== */
.chat-typing-indicator-bar {
    display: flex;
    align-items: center;
    padding: 6px 18px;
    margin: 4px 0;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1d9bf0;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   ✨ AI SMART ASSISTANT STYLES
   ========================================================================== */
.ai-fab-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #1d9bf0 0%, #a855f7 100%);
    color: #fff;
    border-radius: 30px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.4);
    z-index: 9999;
    transition: all 0.25s;
}
.ai-fab-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 12px 35px rgba(168, 85, 247, 0.6);
}

.ai-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-modal-card {
    background: #111418;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 520px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.ai-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(168, 85, 247, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
}

.ai-modal-body {
    padding: 20px;
}

.ai-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.ai-tab-btn {
    background: #1c1f24;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border-radius: 16px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}
.ai-tab-btn.active {
    background: #a855f7;
    border-color: #a855f7;
    color: #fff;
}

.ai-textarea {
    width: 100%;
    background: #1c1f24;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    padding: 12px;
    font-size: 13px;
    resize: vertical;
    outline: none;
}
.ai-textarea:focus {
    border-color: #a855f7;
}

.ai-tone-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.ai-chip {
    font-size: 12px;
    background: #1c1f24;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    color: #fff;
}

.ai-btn-generate {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1d9bf0 0%, #a855f7 100%);
    color: #fff;
    border: none;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s;
}
.ai-btn-generate:hover {
    transform: translateY(-1px);
}

.ai-result-box {
    margin-top: 16px;
    background: #181b20;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 14px;
    padding: 14px;
}

.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    color: #c084fc;
    margin-bottom: 8px;
}

.ai-copy-btn, .ai-insert-btn {
    background: #252a32;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
}
.ai-insert-btn {
    background: #1d9bf0;
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    font-weight: bold;
    font-size: 12px;
}

.ai-result-text {
    font-size: 13px;
    line-height: 1.6;
    color: #f0f6fc;
    white-space: pre-wrap;
}

/* ======================================================== */
/* 📱 TABLET & MOBILE 120Hz GPU ACCELERATION OPTIMIZATION  */
/* ======================================================== */
html, body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.main-feed, .stories-scroll-wrapper, .cyber-drawer-sheet, #chatMessagesStream {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

@media (max-width: 1024px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Disable GPU-heavy keyframe shadow animations on tablets & mobile */
    .story-avatar-ring.unviewed,
    .vault-glow-shield,
    .story-music-disc-art.rotating {
        animation: none !important;
    }

    .story-avatar-ring.unviewed {
        box-shadow: 0 0 8px rgba(0, 242, 254, 0.5) !important;
    }

    /* Optimize heavy backdrop-filters on 2.5K high-res tablet screens */
    .header-top,
    .bottom-nav,
    .cyber-notif-modal-card,
    .modal-content,
    .cyber-drawer-sheet,
    .post-options-dropdown {
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        background-color: rgba(10, 14, 23, 0.94) !important;
    }

    .post-item {
        transform: translateZ(0);
        will-change: auto;
    }

    .header-top, .bottom-nav {
        transform: translateZ(0);
        will-change: transform;
    }
}

/* ==========================================================================
   👥 CYBER SECRET & PRIVATE GROUPS STYLING (MODERN GLASSMORPHISM & NEON)
   ========================================================================== */

.cyber-create-group-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #000000;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 18px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.35);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    text-decoration: none;
}

.cyber-create-group-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.55);
    filter: brightness(1.1);
}

.cyber-create-group-btn:active {
    transform: translateY(0) scale(0.98);
}

.groups-nav-tabs {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 2px;
}

.group-tab-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted, #71767b);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.group-tab-item:hover {
    color: #ffffff;
}

.group-tab-item.active {
    color: #00f2fe;
    border-bottom: 2px solid #00f2fe;
}

.group-tab-count {
    background: rgba(0, 242, 254, 0.15);
    color: #00f2fe;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid rgba(0, 242, 254, 0.3);
}

/* Group Search Bar */
.cyber-group-search-bar-wrap {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px 16px;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.cyber-group-search-bar-wrap:focus-within {
    border-color: rgba(0, 242, 254, 0.4);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
    background: rgba(0, 242, 254, 0.02);
}

.cyber-group-search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    padding: 10px 40px 10px 42px;
    color: #ffffff;
    font-size: 13.5px;
    outline: none;
    transition: all 0.25s ease;
}

.cyber-group-search-input:focus {
    border-color: #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.cyber-group-search-input::placeholder {
    color: var(--text-muted, #71767b);
}

.cyber-btn-search-group {
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    color: #000000;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 20px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 242, 254, 0.3);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cyber-btn-search-group:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(0, 242, 254, 0.5);
    filter: brightness(1.1);
}

.cyber-btn-search-group:active {
    transform: translateY(0);
}

/* Groups Grid */
.cyber-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.cyber-group-card {
    background: var(--bg-card, #16181c);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cyber-group-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 242, 254, 0.35);
    box-shadow: 0 10px 30px rgba(0, 242, 254, 0.15);
}

.group-card-banner {
    height: 100px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #1e2638;
}

.group-badge-privacy {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.group-badge-privacy.secret {
    background: rgba(168, 85, 247, 0.3);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.5);
}

.group-badge-privacy.private {
    background: rgba(0, 242, 254, 0.25);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.5);
}

.group-card-body {
    padding: 0 16px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 5;
}

.group-card-avatar-wrap {
    margin-top: -36px;
    margin-bottom: 10px;
    position: relative;
    z-index: 10;
    width: fit-content;
}

.group-card-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-card, #16181c);
    background: #000000;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.45);
    display: block;
    position: relative;
    z-index: 10;
}

.group-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.group-card-name {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-role-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.group-role-badge.owner {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.group-role-badge.admin {
    background: rgba(0, 242, 254, 0.2);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.4);
}

.group-role-badge.member {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.group-card-stats {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.group-card-desc {
    font-size: 13px;
    color: #a0a6ad;
    line-height: 1.4;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.group-card-footer {
    margin-top: auto;
}

.cyber-btn-enter-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(0, 242, 254, 0.12);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.3);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.cyber-btn-enter-group:hover {
    background: #00f2fe;
    color: #000000;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.5);
}

.cyber-btn-join-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00ba7c 0%, #00f2fe 100%);
    color: #000000;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cyber-btn-join-group:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.cyber-btn-pending {
    width: 100%;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    font-size: 13px;
    font-weight: 700;
    cursor: not-allowed;
}

.empty-groups-box {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-groups-icon {
    margin-bottom: 16px;
}

.empty-groups-box h3, .empty-groups-box h2 {
    color: #ffffff;
    margin: 0 0 8px 0;
}

.empty-groups-box p {
    font-size: 14px;
    max-width: 420px;
    margin: 0 auto 20px auto;
    line-height: 1.5;
}

/* Group Room Hero */
/* Group Room Hero Card (Cyber Glassmorphism) */
.group-hero-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card, #16181c);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.group-hero-cover {
    height: 180px;
    width: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: #111418;
}

.group-hero-cover.no-cover {
    background: linear-gradient(135deg, #09131d 0%, #11283a 50%, #0d1e2e 100%);
}

.group-hero-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(22, 24, 28, 0.95) 100%);
    pointer-events: none;
}

.group-hero-top-actions {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-group-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff !important;
    background: rgba(15, 20, 25, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-group-action-pill:hover {
    background: rgba(0, 242, 254, 0.2);
    border-color: #00f2fe;
    color: #00f2fe !important;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.35);
    transform: translateY(-1px);
}

.group-hero-body {
    padding: 0 20px 20px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.group-hero-avatar-wrap {
    margin-top: -50px;
    margin-bottom: 12px;
    position: relative;
    z-index: 5;
    display: inline-block;
    width: fit-content;
}

.group-hero-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-card, #16181c);
    background: #000000;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
    display: block;
}

.group-hero-text {
    display: flex;
    flex-direction: column;
}

.group-hero-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.group-hero-name {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.group-role-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.group-role-badge.owner {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(245, 158, 11, 0.2));
    border: 1px solid rgba(234, 179, 8, 0.45);
    color: #facc15;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.2);
}

.group-role-badge.admin {
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.4);
    color: #00f2fe;
}

.group-role-badge.member {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
}

.group-hero-desc {
    font-size: 14px;
    color: #c4c9ce;
    margin: 0 0 12px 0;
    line-height: 1.5;
    word-break: break-word;
}

.group-hero-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.group-hero-action-box {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.group-privacy-pill {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
}

.group-privacy-pill.secret {
    background: rgba(168, 85, 247, 0.25);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.group-privacy-pill.private {
    background: rgba(0, 242, 254, 0.2);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.4);
}

.cyber-btn-leave {
    padding: 7px 16px;
    border-radius: 20px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cyber-btn-leave:hover {
    background: #ef4444;
    color: #ffffff;
}

.group-status-alert {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}

.group-status-alert.banned {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.group-status-alert.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

/* ======================================================== */
/* 🛡️ CYBER PRIVACY SHIELD VAULT (พื้นที่ส่วนตัวเฉพาะสมาชิก) */
/* ======================================================== */
.cyber-shield-vault-card {
    position: relative;
    background: linear-gradient(180deg, rgba(22, 24, 28, 0.95) 0%, rgba(13, 17, 23, 0.98) 100%);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 20px;
    padding: 45px 24px;
    text-align: center;
    overflow: hidden;
    margin: 15px 0 25px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 242, 254, 0.12);
    backdrop-filter: blur(20px);
}

.cyber-vault-background-glow {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.18) 0%, rgba(168, 85, 247, 0.1) 50%, transparent 80%);
    filter: blur(30px);
    pointer-events: none;
}

.cyber-shield-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cyber-shield-pulse-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(0, 242, 254, 0.4);
    animation: cyberPulseRing 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    pointer-events: none;
}

.cyber-shield-pulse-ring.delay {
    animation-delay: 1.25s;
    border-color: rgba(168, 85, 247, 0.4);
}

@keyframes cyberPulseRing {
    0% { transform: scale(0.85); opacity: 0.8; }
    50% { transform: scale(1.25); opacity: 0; }
    100% { transform: scale(1.4); opacity: 0; }
}

.cyber-shield-icon-badge {
    position: relative;
    z-index: 2;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(168, 85, 247, 0.2));
    border: 2px solid #00f2fe;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.5), inset 0 0 15px rgba(0, 242, 254, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00f2fe;
}

.cyber-shield-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #00f2fe;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

.cyber-shield-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00f2fe;
    box-shadow: 0 0 8px #00f2fe;
    animation: cyberDotBlink 1.5s ease-in-out infinite alternate;
}

@keyframes cyberDotBlink {
    0% { opacity: 0.4; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}

.cyber-shield-heading {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px 0;
    letter-spacing: 0.2px;
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
}

.cyber-shield-description {
    font-size: 14px;
    color: #a0aec0;
    max-width: 520px;
    margin: 0 auto 24px auto;
    line-height: 1.6;
}

.cyber-shield-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    max-width: 580px;
    margin: 0 auto 28px auto;
}

.cyber-shield-feature-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: all 0.2s ease;
}

.cyber-shield-feature-item:hover {
    background: rgba(0, 242, 254, 0.05);
    border-color: rgba(0, 242, 254, 0.2);
}

.cyber-shield-feature-item .feature-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.cyber-shield-feature-item .feature-text strong {
    display: block;
    font-size: 13px;
    color: #ffffff;
}

.cyber-shield-feature-item .feature-text span {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.cyber-shield-action-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cyber-vault-join-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 800;
    color: #000000;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.45);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyber-vault-join-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 242, 254, 0.7);
}

.cyber-vault-join-btn:active {
    transform: translateY(0) scale(0.98);
}

.cyber-shield-alert {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cyber-shield-alert.pending {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.cyber-shield-alert.banned {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
}

/* Group Tabs Bar */
.group-nav-bar {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    background: #000000 !important;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

/* ======================================================== */
/* 🌟 CYBER READ-ONLY PREVIEW BANNER & STICKY JOIN BAR      */
/* ======================================================== */
.cyber-guest-preview-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    border: 1px solid rgba(0, 242, 254, 0.35);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 242, 254, 0.08);
    position: relative;
    overflow: hidden;
}

.cyber-guest-preview-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #00f2fe, #a855f7);
}

.preview-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preview-banner-content {
    flex: 1;
    min-width: 0;
}

.preview-banner-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #00f2fe;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-banner-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.45;
}

.preview-banner-action {
    flex-shrink: 0;
}

.preview-banner-action .cyber-create-group-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 🚀 Floating Sticky Join CTA Bar at bottom */
.cyber-floating-join-bar {
    position: fixed;
    bottom: 68px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 680px;
    background: rgba(12, 16, 22, 0.94);
    border: 1.5px solid rgba(0, 242, 254, 0.5);
    border-radius: 50px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 999;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 242, 254, 0.35);
    backdrop-filter: blur(16px);
    animation: slideUpFloatingBar 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpFloatingBar {
    from { transform: translate(-50%, 40px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.floating-join-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.floating-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00f2fe;
    box-shadow: 0 0 10px #00f2fe;
    flex-shrink: 0;
    animation: cyberDotBlink 1.2s infinite alternate;
}

.floating-join-btn-wrap {
    flex-shrink: 0;
}

.floating-join-btn-wrap .cyber-create-group-btn {
    padding: 8px 18px !important;
    font-size: 13px !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 30px !important;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cyber-guest-preview-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }
    .preview-banner-action {
        width: 100%;
    }
    .preview-banner-action .cyber-create-group-btn {
        width: 100%;
        justify-content: center;
    }
    .cyber-floating-join-bar {
        bottom: 70px;
        width: calc(100% - 24px);
        padding: 8px 12px;
        border-radius: 16px;
    }
    .floating-join-info {
        font-size: 12px;
    }
    .floating-join-info span:not(.floating-pulse-dot) {
        max-width: 170px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .floating-join-btn-wrap .cyber-create-group-btn {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
}

.group-nav-tab {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap !important;
    min-height: 48px;
    box-sizing: border-box;
}

.group-nav-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.group-nav-tab.active {
    color: #00f2fe;
    border-bottom-color: #00f2fe;
}

.group-pending-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 999px;
}

@media (max-width: 600px) {
    .group-nav-tab {
        font-size: 13px;
        padding: 12px 4px;
        gap: 4px;
    }
}

/* Media Grid */
.cyber-media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.cyber-media-thumb {
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #111418;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cyber-media-thumb img, .cyber-media-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.cyber-media-thumb:hover img, .cyber-media-thumb:hover video {
    transform: scale(1.05);
}

.video-play-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    backdrop-filter: blur(4px);
}

/* Members View */
.group-members-view-card {
    background: var(--bg-card, #16181c);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.member-section-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
}

.member-list-items {
    display: flex;
    flex-direction: column;
}

.member-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 10px;
}

.member-row-item:last-child {
    border-bottom: none;
}

.member-info-left {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.member-avatar-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.member-name-text {
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-sub-text {
    font-size: 12px;
    color: var(--text-muted);
}

.member-actions-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Member Management Action Buttons (Cyber Glow Pills) */
.btn-promote-sm, .btn-demote-sm, .btn-kick-sm, .btn-ban-sm, .btn-approve-sm, .btn-reject-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
    outline: none;
    text-decoration: none;
    line-height: 1.2;
}

/* 🛡️ แต่งตั้งแอดมิน (Cyan Glow Pill) */
.btn-promote-sm {
    background: rgba(0, 242, 254, 0.12);
    color: #00f2fe;
    border-color: rgba(0, 242, 254, 0.35);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}
.btn-promote-sm:hover {
    background: #00f2fe;
    color: #000000;
    border-color: #00f2fe;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.5);
    transform: translateY(-1px);
}

/* 👤 ปลดแอดมิน (Amber Glow Pill) */
.btn-demote-sm {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}
.btn-demote-sm:hover {
    background: #f59e0b;
    color: #000000;
    border-color: #f59e0b;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

/* 🚪 เตะออกจากกลุ่ม (Red/Orange Glow Pill) */
.btn-kick-sm {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}
.btn-kick-sm:hover {
    background: rgba(239, 68, 68, 0.9);
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

/* 🚫 แบนจากกลุ่ม (Crimson Neon Pill) */
.btn-ban-sm {
    background: rgba(220, 38, 38, 0.2);
    color: #ff4d4f;
    border-color: rgba(220, 38, 38, 0.45);
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.15);
}
.btn-ban-sm:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    box-shadow: 0 0 18px rgba(220, 38, 38, 0.6);
    transform: translateY(-1px);
}

/* ✅ อนุมัติคำขอ (Emerald Glow Pill) */
.btn-approve-sm {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}
.btn-approve-sm:hover {
    background: #10b981;
    color: #000000;
    border-color: #10b981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

/* ❌ ปฏิเสธคำขอ (Muted Red Pill) */
.btn-reject-sm {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}
.btn-reject-sm:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

/* Modal Form Styles */
.cyber-form-group {
    margin-bottom: 16px;
}

.cyber-form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #e7e9ea;
    margin-bottom: 6px;
}

.cyber-form-input, .cyber-form-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.cyber-form-input:focus, .cyber-form-textarea:focus {
    border-color: #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.privacy-select-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.privacy-option-card {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.privacy-option-card:has(input:checked) {
    background: rgba(0, 242, 254, 0.08);
    border-color: #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

.privacy-option-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.privacy-option-sub {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

.group-toggles-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 10px;
}

.group-toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px;
    cursor: pointer;
}

.toggle-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    display: block;
}

.toggle-sub {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}

.cyber-switch {
    width: 20px;
    height: 20px;
    accent-color: #00f2fe;
    cursor: pointer;
}

.cyber-file-input {
    font-size: 12px;
    color: var(--text-muted);
    width: 100%;
}

.group-media-preview-box {
    margin-top: 6px;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.btn-danger-link {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.btn-danger-link:hover {
    background: rgba(239, 68, 68, 0.15);
}

@media (max-width: 768px) {
    .cyber-groups-grid {
        grid-template-columns: 1fr;
    }
    .privacy-select-grid {
        grid-template-columns: 1fr;
    }
    .btn-text-hide-mobile {
        display: none;
    }
    .group-hero-cover, .group-hero-banner {
        height: 130px;
    }
    .group-hero-avatar-wrap {
        margin-top: -38px;
    }
    .group-hero-avatar {
        width: 76px;
        height: 76px;
    }
    .group-hero-name {
        font-size: 18px;
    }
    .btn-group-action-pill {
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* ==========================================================================
   ✨ CYBER MODAL BUTTONS (Cancel & Action Buttons)
   ========================================================================== */
.btn-cancel {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 8px 18px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    backdrop-filter: blur(8px) !important;
    text-decoration: none !important;
}

.btn-cancel:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.3) !important;
    transform: translateY(-1px) !important;
}

.btn-cancel:active {
    transform: translateY(1px) !important;
}

@keyframes cyberStorySpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   💬 CYBER GROUP LIVE CHAT ROOM (ห้องแชทสดกลุ่มลับ)
   ========================================================================== */
.cyber-group-chat-card {
    background: rgba(18, 22, 30, 0.95);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 680px;
    max-height: calc(100vh - 220px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 254, 0.08);
    backdrop-filter: blur(16px);
    margin-bottom: 25px;
}

.group-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.group-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-status-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00f2fe;
    box-shadow: 0 0 12px #00f2fe;
    animation: cyberDotBlink 1.4s infinite alternate;
}

.chat-header-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #ffffff;
}

.chat-header-sub {
    font-size: 11.5px;
    color: var(--text-muted);
}

.chat-header-badge {
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid #00f2fe;
    color: #00f2fe;
    font-size: 10.5px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.cyber-chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: radial-gradient(circle at top right, rgba(0, 242, 254, 0.03), transparent 70%), #0d1117;
    scroll-behavior: smooth;
}

.chat-loading-placeholder, .chat-empty-state {
    margin: auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.chat-empty-state span {
    font-size: 36px;
}

.chat-msg-row {
    display: flex;
    gap: 10px;
    max-width: 82%;
}

.chat-msg-row.new-fade {
    animation: chatMsgFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chatMsgFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-msg-row.self {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg-row.other {
    align-self: flex-start;
}

.chat-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid rgba(0, 242, 254, 0.3);
}

.chat-msg-bubble-wrap {
    display: flex;
    flex-direction: column;
}

.chat-msg-author {
    font-size: 11.5px;
    font-weight: 700;
    color: #00f2fe;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-role-badge {
    font-size: 9.5px;
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #eab308;
    padding: 1px 6px;
    border-radius: 6px;
}

.chat-msg-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    position: relative;
    word-break: break-word;
    font-size: 13.5px;
    line-height: 1.5;
}

.chat-msg-row.self .chat-msg-bubble {
    background: linear-gradient(135deg, #0284c7 0%, #00f2fe 100%);
    color: #000000;
    font-weight: 500;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.25);
}

.chat-msg-row.other .chat-msg-bubble {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
}

.chat-msg-image-wrap {
    margin-bottom: 6px;
    border-radius: 10px;
    overflow: hidden;
    max-width: 260px;
    cursor: pointer;
}

.chat-msg-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    transition: transform 0.2s;
}

.chat-msg-image-wrap img:hover {
    transform: scale(1.02);
}

.chat-msg-time {
    font-size: 10px;
    margin-top: 4px;
    text-align: right;
    opacity: 0.75;
}

.chat-msg-row.self .chat-msg-time {
    color: rgba(0, 0, 0, 0.7);
}

.chat-msg-row.other .chat-msg-time {
    color: var(--text-muted);
}

.cyber-group-chat-form {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-image-preview-row {
    padding-bottom: 8px;
}

.chat-preview-thumbnail-wrap {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #00f2fe;
}

.chat-preview-thumbnail-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-remove-preview {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-media-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00f2fe;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}

.chat-media-btn:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.chat-text-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 10px 18px;
    color: #ffffff;
    font-size: 13.5px;
    outline: none;
    transition: 0.2s;
}

.chat-text-input:focus {
    border-color: #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
    background: rgba(0, 0, 0, 0.5);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00f2fe 0%, #0284c7 100%);
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.chat-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 22px rgba(0, 242, 254, 0.7);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-locked-notice {
    padding: 14px;
    text-align: center;
    font-size: 13px;
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.05);
    border-top: 1px solid rgba(0, 242, 254, 0.2);
}

/* ==========================================================================
   Chat Multi-Image Preview Dock (Up to 30 Images)
   ========================================================================== */
.chat-multi-img-preview-dock {
    padding: 10px 16px;
    background: rgba(13, 17, 28, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(0, 242, 254, 0.25);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.4);
}

.chat-preview-dock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.chat-preview-dock-title {
    color: #00f2fe;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.btn-clear-chat-imgs {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: 0.2s;
}

.btn-clear-chat-imgs:hover {
    background: rgba(239, 68, 68, 0.15);
}

.chat-preview-thumbnails-list {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 242, 254, 0.3) transparent;
}

.chat-preview-thumbnails-list::-webkit-scrollbar {
    height: 4px;
}

.chat-preview-thumbnails-list::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.3);
    border-radius: 4px;
}

.chat-preview-thumb-card {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(0, 242, 254, 0.3);
    background: #090d16;
}

.chat-preview-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.btn-remove-preview-img {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    transition: transform 0.15s, background 0.15s;
    line-height: 1;
}

.btn-remove-preview-img:hover {
    transform: scale(1.15);
    background: #dc2626;
}

.chat-preview-thumb-num {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: #00f2fe;
    font-size: 9px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1;
}

/* ==========================================================================
   Chat Message Bubble Multi-Image Gallery
   ========================================================================== */
.chat-media-single img {
    max-width: 280px;
    max-height: 280px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s;
}

.chat-media-gallery {
    display: grid;
    gap: 4px;
    max-width: 300px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 4px;
}

.chat-media-gallery.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.chat-media-gallery.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.chat-media-gallery.grid-4 {
    grid-template-columns: repeat(2, 1fr);
}

.chat-media-gallery.grid-multi {
    grid-template-columns: repeat(3, 1fr);
}

.chat-media-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 6px;
    background: #0f172a;
}

.chat-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.chat-media-thumb img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* ⚡ Ultra-Fast Hardware-Accelerated Video Rendering */
.post-video-player,
.x-video-wrapper video,
.reel-video-wrap video,
.chat-shared-media-item video {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    object-fit: cover;
    background: #000;
    contain: strict;
}

/* ⏳ Cyberpunk Neon Hourglass Preview Loader */
.cyber-hourglass-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 20px;
    width: 100%;
    background: rgba(15, 18, 26, 0.7);
    border: 1px dashed rgba(0, 242, 254, 0.4);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    margin: 10px 0;
    animation: cyberGlowPulse 2s ease-in-out infinite;
}

@keyframes cyberGlowPulse {
    0%, 100% { border-color: rgba(0, 242, 254, 0.35); box-shadow: 0 0 10px rgba(0, 242, 254, 0.08); }
    50% { border-color: rgba(0, 242, 254, 0.7); box-shadow: 0 0 20px rgba(0, 242, 254, 0.22); }
}

.cyber-hourglass-icon {
    width: 46px;
    height: 46px;
    color: #00f2fe;
    filter: drop-shadow(0 0 12px rgba(0, 242, 254, 0.75));
    animation: cyberHourglassSpin 1.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes cyberHourglassSpin {
    0% { transform: rotate(0deg) scale(1); }
    45% { transform: rotate(180deg) scale(1.12); }
    55% { transform: rotate(180deg) scale(1.12); }
    100% { transform: rotate(360deg) scale(1); }
}

.cyber-hourglass-text {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cyber-hourglass-counter {
    color: #00f2fe;
    font-weight: 700;
}


