/* ============================================================
   FACEBOOK-INSPIRED LIGHT MODE GLASSMORPHISM DESIGN SYSTEM
   ============================================================ */

:root {
    /* Primary Text */
    --text-primary: #050505;
    --text-secondary: #65676B;

    /* Facebook Blue Accent */
    --blue: #0866FF;
    --blue-hover: #0755DD;
    --blue-light: rgba(8, 102, 255, 0.08);
    --blue-glow: rgba(8, 102, 255, 0.25);

    /* Glassmorphism Core */
    --glass-bg: rgba(255, 255, 255, 0.70);
    --glass-bg-hover: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-border-strong: rgba(255, 255, 255, 0.85);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
    --glass-shadow-hover: 0 12px 40px 0 rgba(31, 38, 135, 0.10);

    /* Background Tones */
    --bg-page: #F0F2F5;
    --bg-input: rgba(240, 242, 245, 0.6);
    --bg-hover: rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 100px;

    /* Nav Bar */
    --nav-height: 56px;
}


/* ============================================================
   RESET & BASE
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* ============================================================
   ANIMATED AMBIENT MESH GRADIENT BACKGROUND
   ============================================================ */

.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.45;
    animation: meshFloat 20s ease-in-out infinite;
}

.mesh-blob-1 {
    width: 500px;
    height: 500px;
    background: rgba(173, 216, 255, 0.55);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.mesh-blob-2 {
    width: 450px;
    height: 450px;
    background: rgba(200, 180, 255, 0.40);
    top: 40%;
    right: -10%;
    animation-delay: -7s;
}

.mesh-blob-3 {
    width: 400px;
    height: 400px;
    background: rgba(180, 220, 255, 0.40);
    bottom: -10%;
    left: 30%;
    animation-delay: -14s;
}

.mesh-blob-4 {
    width: 350px;
    height: 350px;
    background: rgba(220, 200, 255, 0.35);
    top: 55%;
    left: -8%;
    animation-delay: -3s;
}

@keyframes meshFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.08); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(-35px, -20px) scale(1.05); }
}

/* ============================================================
   TOP NAVIGATION BAR — Sticky Frosted Glass
   ============================================================ */

.fb-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: center;
}

/* Subtle top-to-bottom highlight on nav */
.fb-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    pointer-events: none;
}

.fb-nav-inner {
    width: 100%;
    max-width: 1400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    gap: 1rem;
}

/* Nav Left: Logo + Search */
.fb-nav-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.fb-logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fb-logo:hover {
    transform: scale(1.04);
    filter: brightness(1.05);
}

.fb-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

/* Nav Center: Title */
.fb-nav-center {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.fb-nav-center .fb-nav-title {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: rgba(8, 102, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(8, 102, 255, 0.12);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.fb-nav-center .fb-nav-title:hover {
    background: rgba(8, 102, 255, 0.15);
    border-color: rgba(8, 102, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(8, 102, 255, 0.10);
}

/* ============================================================
   3-COLUMN LAYOUT
   ============================================================ */

.fb-layout {
    position: relative;
    z-index: 1;
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
    gap: 1rem;
    flex: 1;
}

/* ---- Left Sidebar ---- */
.fb-left-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
    align-self: flex-start;
    max-height: calc(100vh - var(--nav-height) - 2rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.12) transparent;
}

.fb-left-sidebar::-webkit-scrollbar {
    width: 6px;
}

.fb-left-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.fb-left-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 3px;
}

.fb-left-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.20);
}

/* ---- Center Feed ---- */
.fb-feed {
    flex: 1;
    max-width: 680px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Feed-level glass card — extra internal padding + tighter gradient */
.fb-feed .feed-card.glass-card {
    border-radius: var(--radius-lg);
}

.fb-feed .feed-card.glass-card::before {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.20) 20%,
        rgba(255, 255, 255, 0.01) 55%,
        rgba(255, 255, 255, 0.10) 100%
    );
}

/* ---- Right Sidebar ---- */
.fb-right-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
    align-self: flex-start;
    max-height: calc(100vh - var(--nav-height) - 2rem);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.12) transparent;
}

.fb-right-sidebar::-webkit-scrollbar {
    width: 6px;
}

.fb-right-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.fb-right-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 3px;
}

.fb-right-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.20);
}

/* ============================================================
   GLASS CARD — Core Reusable Panel
   ============================================================ */

.glass-card {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Top-to-bottom subtle white gradient highlight for 3D glass edge */
.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.50) 0%,
        rgba(255, 255, 255, 0.15) 30%,
        rgba(255, 255, 255, 0.02) 60%,
        rgba(255, 255, 255, 0.12) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* Ensure card content sits above the gradient overlay */
.glass-card > * {
    position: relative;
    z-index: 1;
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    box-shadow: var(--glass-shadow-hover);
    border-color: var(--glass-border-strong);
    transform: translateY(-1px);
}

/* Subtle inner border glow on hover */
.glass-card:hover::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   SIDEBAR CARDS
   ============================================================ */

.sidebar-card {
    padding: 0.75rem;
}

.sidebar-heading {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.5rem 0.75rem 0.5rem;
    margin-bottom: 0.25rem;
}

/* Sidebar Links with Rounded Pill Hover */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-link:hover {
    background: var(--bg-hover);
    transform: translateX(2px);
}

.sidebar-link.active {
    background: var(--blue-light);
    color: var(--blue);
    font-weight: 600;
}

.sidebar-link svg {
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.sidebar-link:hover svg,
.sidebar-link.active svg {
    opacity: 1;
}

.sidebar-link.active svg {
    color: var(--blue);
}

/* Sidebar icon circles (right sidebar) */
.sidebar-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(8, 102, 255, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-link:hover .sidebar-icon-circle {
    background: rgba(8, 102, 255, 0.15);
    box-shadow: 0 4px 12px rgba(8, 102, 255, 0.10);
}

/* Sidebar Divider */
.sidebar-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 0.5rem 0.75rem;
}

/* ============================================================
   META AI SUPPORT ASSISTANT CARD
   ============================================================ */

.meta-ai-card {
    padding: 1rem;
}

.meta-ai-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.25rem 0.75rem;
}

.meta-ai-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    background: linear-gradient(135deg, #F356FF, #4641FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.meta-ai-suggestions {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.meta-ai-suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.meta-ai-suggestion-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.meta-ai-sparkle {
    flex-shrink: 0;
    color: var(--text-secondary);
    opacity: 0.7;
}

.meta-ai-input-row {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-input);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-pill);
    padding: 0.25rem 0.25rem 0.25rem 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.25s ease;
}

.meta-ai-input-row:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-light);
}

.meta-ai-input-wrapper {
    flex: 1;
    min-width: 0;
}

.meta-ai-input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    padding: 0.45rem 0;
}

.meta-ai-input::placeholder {
    color: #8A8D91;
}

.meta-ai-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F356FF, #4641FF);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.meta-ai-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(70, 65, 255, 0.35);
}

.meta-ai-send-btn:active {
    transform: scale(0.95);
}

.meta-ai-terms {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.4;
    padding: 0 0.25rem;
    text-align: center;
}

.meta-ai-terms a {
    color: var(--text-secondary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.meta-ai-terms a:hover {
    color: var(--text-primary);
}

/* ============================================================
   HELP CARD (Right Sidebar)
   ============================================================ */

.help-card {
    padding: 1.25rem;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    padding: 0 0.25rem;
}

.help-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--blue-light);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(8, 102, 255, 0.08);
    transition: all 0.3s ease;
}

.help-link:hover {
    background: rgba(8, 102, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(8, 102, 255, 0.12);
}

/* ============================================================
   FEED CARDS (Center Column)
   ============================================================ */

.feed-card {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.card-header {
    margin-bottom: 1rem;
}

/* ============================================================
   TOKEN GUIDE CARD
   ============================================================ */

.token-guide-card .token-guide-img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 0 auto;
}

.token-steps {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.token-steps li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.4rem;
}

.token-steps li a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

.token-steps li a:hover {
    text-decoration: underline;
}

.token-steps li em {
    font-style: normal;
    font-weight: 600;
    color: var(--text-primary);
}

.token-warning {
    font-size: 0.85rem;
    color: #B86E00;
    font-weight: 500;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin: 0;
}

/* ============================================================
   VIDEO CARD
   ============================================================ */

.video-card .video-wrapper {
    margin-bottom: 1rem;
}

.video-sub-text {
    text-align: center;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.65;
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

/* ============================================================
   CUSTOM VIDEO PLAYER
   ============================================================ */

.custom-video-player {
    position: relative;
    width: 100%;
    max-width: 720px;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.video-wrapper video {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
}

/* Center Play Button */
.center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background: rgba(8, 102, 255, 0.88);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    z-index: 2;
}

.center-play-btn:hover {
    background: var(--blue);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 30px rgba(8, 102, 255, 0.4);
}

.center-play-btn svg {
    width: 36px;
    height: 36px;
    margin-left: 6px;
}

/* Video Controls Overlay */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
    padding: 24px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.custom-video-player:hover .video-controls,
.custom-video-player:focus-within .video-controls {
    opacity: 1;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-container:hover {
    height: 7px;
}

.progress-bar {
    height: 100%;
    background: var(--blue);
    width: 0%;
    border-radius: 3px;
    transition: width 0.1s linear;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--blue);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.progress-container:hover .progress-bar::after {
    opacity: 1;
}

/* Controls Row */
.controls-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

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

.control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
}

.control-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.control-btn svg {
    width: 22px;
    height: 22px;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 70px;
    height: 4px;
    cursor: pointer;
    accent-color: var(--blue);
    border-radius: 2px;
}

.time-display {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

/* ============================================================
   BREADCRUMB TRAIL
   ============================================================ */

.breadcrumb {
    padding: 0.25rem 0;
    margin-bottom: -0.25rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.breadcrumb ol li {
    display: flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 500;
}

.breadcrumb ol li a {
    color: var(--blue);
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.2rem 0.35rem;
    border-radius: 4px;
}

.breadcrumb ol li a:hover {
    background: rgba(8, 102, 255, 0.06);
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #BCC0C4;
    font-size: 1rem;
    line-height: 1;
    user-select: none;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================================
   FORM CARD — Token Submission
   ============================================================ */

.form-card {
    padding: 1.5rem;
}

.form-install-hint {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    margin-top: -0.25rem;
}

.form-install-hint a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

.form-install-hint a:hover {
    text-decoration: underline;
}

.fb-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fb-textarea-container {
    width: 100%;
    position: relative;
}

.fb-textarea-container textarea {
    width: 100%;
    background: var(--bg-input);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    padding-top: 3.4rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    resize: vertical;
    min-height: 140px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.03);
}

.fb-textarea-container textarea::placeholder {
    color: #8A8D91;
}

.fb-textarea-container textarea:focus {
    border-color: var(--blue);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 0 0 3px var(--blue-light), 0 6px 20px rgba(8, 102, 255, 0.08);
}

.fb-textarea-container textarea:focus::placeholder {
    color: #B0B3B8;
}

/* Paste Token button — positioned inside textarea */
.paste-token-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 2;
}

.paste-token-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--blue);
    color: var(--blue);
    box-shadow: 0 2px 10px rgba(8, 102, 255, 0.12);
}

.paste-token-btn:active {
    transform: scale(0.95);
}

.paste-token-btn.copied {
    color: #16A34A;
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.08);
}

/* Security Notice — near submit button */
.security-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 193, 7, 0.06);
    border: 1px solid rgba(255, 193, 7, 0.18);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: #8B6C0E;
    line-height: 1.5;
}

.security-notice svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #B8860B;
}

/* Primary Submit Button — Facebook Blue Pill */
.fb-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(180deg, var(--blue) 0%, #0755DD 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.9rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px var(--blue-glow);
    position: relative;
    overflow: hidden;
}

/* Subtle gloss overlay on button */
.fb-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.22), transparent);
    border-radius: var(--radius-pill) var(--radius-pill) 0 0;
    pointer-events: none;
}

.fb-submit-btn:hover {
    background: linear-gradient(180deg, var(--blue-hover) 0%, #0645CC 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(8, 102, 255, 0.38);
}

.fb-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--blue-glow);
}

/* ============================================================
   WAS THIS HELPFUL? — Thumbs up/down
   ============================================================ */

.helpful-card {
    padding: 1.5rem;
    text-align: center;
}

.helpful-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.helpful-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.helpful-btn:hover {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.helpful-btn:active {
    transform: scale(0.96);
}

.helpful-btn.selected {
    color: #fff;
    border-color: transparent;
    transform: scale(1.05);
}

.thumbs-up.selected {
    background: var(--blue);
    box-shadow: 0 4px 16px var(--blue-glow);
}

.thumbs-down.selected {
    background: #E41E3F;
    box-shadow: 0 4px 16px rgba(228, 30, 63, 0.25);
}

.helpful-feedback {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-height: 1.25rem;
    transition: all 0.3s ease;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */

.toast {
    position: fixed;
    top: calc(var(--nav-height) + 1.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 320px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16A34A;
    flex-shrink: 0;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toast-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.toast-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================================================
   SUCCESS OVERLAY
   ============================================================ */

.success-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.success-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.success-modal {
    text-align: center;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 90%;
    border-radius: var(--radius-xl);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-overlay.show .success-modal {
    transform: translateY(0) scale(1);
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16A34A;
    margin: 0 auto 1.5rem;
}

.success-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.success-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.success-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 2.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--blue);
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px var(--blue-glow);
}

.success-home-btn:hover {
    background: var(--blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(8, 102, 255, 0.35);
}

.success-home-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(8, 102, 255, 0.25);
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--glass-bg-hover);
    box-shadow: var(--glass-shadow-hover);
    color: var(--blue);
    transform: translateY(-3px);
}

/* ============================================================
   FOOTER
   ============================================================ */

.fb-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 -4px 20px rgba(31, 38, 135, 0.03);
    margin-top: auto;
}

.footer-logo {
    height: 1.8em;
    vertical-align: middle;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

/* ============================================================
   SHAKE ANIMATION (Invalid Input)
   ============================================================ */

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* Tablet: Hide right sidebar, shrink left */
@media (max-width: 1100px) {
    .fb-right-sidebar {
        display: none;
    }

    .fb-left-sidebar {
        width: 240px;
    }

    .fb-feed {
        max-width: 600px;
    }
}

/* Small tablet / large phone: Stack to single column */
@media (max-width: 768px) {
    .fb-left-sidebar {
        display: none;
    }

    .fb-feed {
        max-width: 100%;
    }

    .fb-layout {
        padding: 0.5rem;
        gap: 0.75rem;
    }

    .fb-nav-inner {
        padding: 0 0.75rem;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .fb-nav-left {
        flex-shrink: 1;
        min-width: 0;
    }

    .fb-logo-img {
        height: 32px;
    }

    .fb-nav-center .fb-nav-title {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    /* Breadcrumb */
    .breadcrumb {
        padding: 0.1rem 0;
        margin-bottom: -0.1rem;
    }

    .breadcrumb ol {
        gap: 0.15rem;
    }

    .breadcrumb ol li {
        font-size: 0.78rem;
    }

    .breadcrumb-sep {
        font-size: 0.85rem;
    }

    /* Feed cards */
    .feed-card {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }

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

    /* Token guide */
    .token-guide-card .token-guide-img {
        border-radius: var(--radius-sm);
    }

    .token-steps li {
        font-size: 0.87rem;
    }

    .token-warning {
        font-size: 0.82rem;
        padding: 0.6rem 0.85rem;
    }

    /* Video player */
    .center-play-btn {
        width: 52px;
        height: 52px;
    }

    .center-play-btn svg {
        width: 26px;
        height: 26px;
        margin-left: 4px;
    }

    .video-controls {
        opacity: 1;
        padding: 12px 10px 8px;
    }

    .volume-slider {
        display: none;
    }

    .time-display {
        font-size: 0.78rem;
    }

    .video-sub-text {
        font-size: 0.82rem;
        padding: 0.6rem 1rem;
    }

    /* Form */
    .fb-textarea-container textarea {
        font-size: 0.92rem;
        padding: 1rem;
        padding-top: 3.2rem;
        min-height: 130px;
    }

    .paste-token-btn {
        top: 0.55rem;
        right: 0.55rem;
        padding: 0.4rem 0.7rem;
        font-size: 0.78rem;
        border-radius: 7px;
    }

    .fb-submit-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    .form-install-hint {
        font-size: 0.82rem;
    }

    .security-notice {
        font-size: 0.78rem;
        padding: 0.65rem 0.85rem;
    }

    /* Helpful card */
    .helpful-card {
        padding: 1.25rem;
    }

    .helpful-title {
        font-size: 0.95rem;
    }

    .helpful-btn {
        padding: 0.55rem 1.25rem;
        font-size: 0.85rem;
    }

    /* Meta AI card */
    .meta-ai-card {
        padding: 0.85rem;
    }

    .meta-ai-title {
        font-size: 0.88rem;
    }

    .meta-ai-suggestion-item {
        font-size: 0.85rem;
        padding: 0.5rem 0.65rem;
    }

    .meta-ai-input {
        font-size: 0.85rem;
    }

    .meta-ai-terms {
        font-size: 0.68rem;
    }

    /* Help card */
    .help-card {
        padding: 1rem;
    }

    .help-text {
        font-size: 0.82rem;
    }

    /* Toast */
    .toast {
        min-width: auto;
        left: 1rem;
        right: 1rem;
        transform: translateY(-120px);
    }

    .toast.show {
        transform: translateY(0);
    }

    /* Back to top */
    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
    }

    /* Sidebar card */
    .sidebar-card {
        padding: 0.65rem;
    }

    .sidebar-heading {
        font-size: 0.75rem;
    }

    .sidebar-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.65rem;
        gap: 0.6rem;
    }

    .sidebar-icon-circle {
        width: 32px;
        height: 32px;
    }
}

/* Small phone */
@media (max-width: 480px) {
    .fb-nav-inner {
        padding: 0 0.5rem;
        gap: 0.35rem;
    }

    .fb-logo-img {
        height: 28px;
    }

    .fb-nav-center .fb-nav-title {
        font-size: 0.72rem;
        padding: 0.35rem 0.6rem;
        border-radius: 8px;
    }

    .fb-layout {
        padding: 0.35rem;
        gap: 0.6rem;
    }

    .breadcrumb ol li {
        font-size: 0.72rem;
    }

    .feed-card {
        padding: 1rem;
        border-radius: var(--radius-md);
    }

    .card-title {
        font-size: 0.98rem;
    }

    .token-steps li {
        font-size: 0.82rem;
        line-height: 1.6;
    }

    .fb-textarea-container textarea {
        font-size: 0.88rem;
        padding: 0.85rem;
        padding-top: 3rem;
        min-height: 120px;
    }

    .paste-token-btn {
        top: 0.45rem;
        right: 0.45rem;
        padding: 0.35rem 0.6rem;
        font-size: 0.72rem;
    }

    .paste-token-btn span {
        display: none;
    }

    .security-notice {
        font-size: 0.73rem;
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
    }

    .fb-submit-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .helpful-btn {
        padding: 0.5rem 1rem;
        font-size: 0.82rem;
    }

    .helpful-btn svg {
        width: 20px;
        height: 20px;
    }

    .meta-ai-title {
        font-size: 0.82rem;
    }

    .meta-ai-suggestion-item {
        font-size: 0.8rem;
        padding: 0.45rem 0.55rem;
    }

    .meta-ai-send-btn {
        width: 32px;
        height: 32px;
    }

    .meta-ai-input {
        font-size: 0.82rem;
    }

    .sidebar-heading {
        font-size: 0.7rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 38px;
        height: 38px;
    }
}
