/* 
 * Gestory NEE V8 - Unified Modern Design System
 * Optimization: Mobile-First, Container Queries, Fluid Typography
 * Standards: W3C, Google Web Vitals, Modern CSS
 */

:root {
    /* Brand Colors - Unified */
    --gestory-primary: #1d9bf0;
    --gestory-secondary: #0ea5e9;
    --gestory-accent: #8b5cf6;
    --gestory-success: #10b981;
    --gestory-danger: #ef4444;
    --gestory-warning: #f59e0b;
    --gestory-bg: #f8fafc;
    --gestory-surface: #ffffff;
    --gestory-text: #0f1419;
    --gestory-text-secondary: #64748b;
    --gestory-border: #f1f5f9;

    /* Z-Index Scale (Normalized) */
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-fixed-header: 1000;
    --z-overlay: 2000;
    --z-modal-bg: 5000;
    --z-modal: 5001;
    --z-tooltip: 6000;
    --z-notification: 7000;
    --z-toast: 8000;
    --z-popover: 9000;
    --z-floater: 9999;

    /* Spacing & Sizing (Fluid) */
    --f-gap: clamp(12px, 3vw, 24px);
    --f-padding: clamp(16px, 4vw, 24px);

    /* Border Radii */
    --gestory-radius-sm: 8px;
    --gestory-radius-md: 12px;
    --gestory-radius-lg: 16px;

    /* Typography (Fluid) */
    --fs-base: clamp(14px, 1.5vw, 16px);
    --fs-h1: clamp(20px, 4vw, 32px);
    --fs-h2: clamp(18px, 3.5vw, 24px);
    --fs-h3: clamp(16px, 2.5vw, 18px);
    --fs-sm: clamp(12px, 1vw, 14px);

    /* Shadows & Effects */
    --gestory-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --gestory-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --gestory-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --gestory-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Container Config */
    --container-width: 1400px;
}

/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== SCROLLBAR STYLING (Unified) ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
    background-clip: padding-box;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--gestory-bg);
    color: var(--gestory-text);
    margin: 0;
    line-height: 1.6;
    font-size: var(--fs-base);
    min-height: 100vh;
    overflow-x: clip;
}

/* ========== LAYOUT SYSTEM (Intrisic & Mobile-First) ========== */
.gestory-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.gestory-container {
    width: min(100%, var(--container-width));
    margin-inline: auto;
    padding-inline: var(--f-gap);
    container-type: inline-size;
}

.gestory-layout {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile default */
    gap: var(--f-padding);
    padding-block: var(--f-padding);
    width: 100%;
}

/* Responsive Layout Progression */
@media (min-width: 769px) {
    .gestory-layout {
        grid-template-columns: 80px 1fr;
    }
}

@media (min-width: 1200px) {
    .gestory-layout {
        grid-template-columns: 280px 1fr 340px;
    }
}

.gestory-feed {
    min-width: 0;
    /* Prevents grid blowout */
    display: flex;
    flex-direction: column;
    gap: var(--f-padding);
}

/* Sidebar behavior (Sticky but accessible) */
.gestory-sidebar {
    display: none;
    /* Hidden on mobile by default, replaced by mobile-nav */
}

@media (min-width: 769px) {
    .gestory-sidebar {
        display: block;
        position: sticky;
        top: var(--f-padding);
        height: min(100vh - 2*var(--f-padding), 100%);
        overflow-y: auto;
        scrollbar-width: thin;
    }
}

.gestory-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--gestory-radius-md);
    color: var(--gestory-text);
    text-decoration: none;
    font-weight: 600;
    transition: var(--gestory-transition);
    margin-bottom: 4px;
}

.gestory-sidebar-nav a:hover,
.gestory-sidebar-nav a.active {
    background: var(--gestory-surface);
    color: var(--gestory-primary);
    box-shadow: var(--gestory-shadow-sm);
}

.gestory-widget {
    background: var(--gestory-surface);
    border-radius: var(--gestory-radius-lg);
    padding: var(--f-padding);
    margin-bottom: var(--f-padding);
    border: 1px solid var(--gestory-border);
    box-shadow: var(--gestory-shadow-sm);
}

.gestory-widget h3 {
    font-size: var(--fs-h3);
    font-weight: 800;
    margin: 0 0 16px 0;
}

/* ========== MOBILE NAVIGATION SYSTEM ========== */
.gestory-mobile-header {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--gestory-surface);
    box-shadow: var(--gestory-shadow-sm);
    height: 60px;
}

@media (min-width: 769px) {
    .gestory-mobile-header {
        display: none;
    }
}

.gestory-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.gestory-hamburger span {
    width: 100%;
    height: 2px;
    background: var(--gestory-text);
    border-radius: 2px;
    transition: var(--gestory-transition);
}

.gestory-mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 25, 0.4);
    backdrop-filter: blur(4px);
    z-index: 4999;
    opacity: 0;
    pointer-events: none;
    transition: var(--gestory-transition);
}

.gestory-mobile-sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.gestory-mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--gestory-surface);
    z-index: 4999;
    transition: var(--gestory-transition);
    box-shadow: var(--gestory-shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    outline: none;
}

.gestory-mobile-sidebar.active {
    left: 0;
}

/* Mobile Sidebar Refined Styles */
.gestory-mobile-sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--gestory-border);
    background: linear-gradient(to bottom, var(--gestory-surface), var(--gestory-bg));
    flex-shrink: 0;
}

/* Guest Wall Header - Sticky only for non-logged users */
.gestory-mobile-sidebar-header:has(.gestory-mobile-guest-wall) {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--gestory-surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Scrollable Content Wrapper for Sidebar */
.gestory-mobile-sidebar-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

.gestory-mobile-sidebar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gestory-mobile-sidebar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gestory-mobile-sidebar-user strong {
    display: block;
    font-size: 15px;
    color: var(--gestory-text);
}

.gestory-mobile-sidebar-user p {
    margin: 0;
    font-size: 12px;
    color: var(--gestory-text-secondary);
}

.gestory-mobile-guest-wall {
    text-align: center;
    padding: 20px 0;
}

.gestory-mobile-guest-wall p {
    margin: 0 0 15px 0;
    color: var(--gestory-text-secondary);
    font-size: 14px;
}

.guest-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px;
}

.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    background: white;
    color: #1f2937;
    padding: 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.v8-login-btn-premium {
    background: white;
    border: 1px solid var(--gestory-border);
    color: var(--gestory-text) !important;
    padding: 12px 24px !important;
    border-radius: 16px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.v8-login-btn-premium:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    background: white;
    border-color: var(--gestory-primary);
}

.v8-login-btn-premium i {
    color: var(--gestory-primary);
    transition: all 0.3s ease;
}

.v8-login-btn-premium:hover i {
    transform: rotate(15deg) scale(1.1);
}

.google-login-btn img {
    width: 18px;
}

.google-login-btn:hover {
    background: #f9fafb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.gestory-mobile-sidebar-stats {
    padding: 20px;
    border-bottom: 1px solid var(--gestory-border);
    background: #f8fafc;
}

.gestory-stats-title {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gestory-motivator-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.gestory-motivator-item:last-child {
    margin-bottom: 0;
}

.gestory-motivator-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.gestory-motivator-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.gestory-motivator-rank {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    border: 1.5px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gestory-motivator-user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--gestory-text);
    line-height: 1.2;
}

.gestory-motivator-user-meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--gestory-text-secondary);
}

/* Sidebar Navigation - Now inside scrollable wrapper */
.gestory-mobile-sidebar-nav {
    flex: 1;
    display: block;
    padding-bottom: 60px;
    /* Safe area for bottom navigation or space */
}

.mobile-nav-title {
    padding: 20px 20px 10px;
    font-size: 12px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gestory-mobile-trending-topics {
    padding: 0 16px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gestory-topic-chip {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--gestory-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--gestory-text-secondary);
    background: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--gestory-transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.gestory-topic-chip:hover {
    border-color: var(--gestory-primary);
    color: var(--gestory-primary);
    transform: translateY(-1px);
}

.gestory-topic-chip.active {
    background: var(--gestory-primary) !important;
    color: white !important;
    border-color: var(--gestory-primary) !important;
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.2);
}

.gestory-topic-chip.active span {
    color: white !important;
}

.gestory-mobile-sidebar-nav hr {
    margin: 10px 0;
    border: none;
    border-top: 1px solid var(--gestory-border);
}

.gestory-mobile-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gestory-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--gestory-transition);
}

.gestory-mobile-sidebar-nav a:hover {
    background: var(--gestory-bg);
    color: var(--gestory-primary);
}

.gestory-mobile-sidebar-nav a i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.gestory-mobile-sidebar-nav .logout-link {
    margin-top: 20px;
    color: #e11d48 !important;
    font-weight: 700;
    border-top: 1px solid var(--gestory-border);
}

.lock-icon {
    margin-left: auto;
    font-size: 14px;
    color: #f59e0b;
}

.gestory-category-item .pro-badge-v8 {
    font-size: 9px;
    background: #fffbeb;
    color: #b45309;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 800;
    margin-left: 6px;
    border: 1px solid #fde68a;
}

/* ========== NOTIFICATIONS & SEARCH PANELS ========== */
.gestory-notifications-panel {
    position: fixed;
    inset: var(--f-padding);
    background: var(--gestory-surface);
    border-radius: var(--gestory-radius-lg);
    box-shadow: var(--gestory-shadow-lg);
    z-index: 11000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 769px) {
    .gestory-notifications-panel {
        inset: auto;
        right: var(--f-padding);
        top: 80px;
        width: 380px;
        max-height: 80vh;
    }
}

.gestory-notifications-panel.active {
    display: flex;
}

/* ========== COMPONENTS: CHIPS & BADGES ========== */
.gestory-topic-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--gestory-border);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--gestory-text-secondary);
    background: var(--gestory-surface);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--gestory-transition);
    white-space: nowrap;
}

.gestory-topic-chip.active {
    background: var(--gestory-primary);
    color: white;
    border-color: var(--gestory-primary);
}

.gestory-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========== COMPOSER (Unified & Premium) ========== */
.gestory-composer {
    background: var(--gestory-surface);
    border: 1px solid var(--gestory-border);
    border-radius: var(--gestory-radius-lg);
    padding: var(--f-padding);
    box-shadow: var(--gestory-shadow-sm);
    transition: var(--gestory-transition);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gestory-composer:focus-within {
    border-color: var(--gestory-primary);
    box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.1);
}

.gestory-composer-inner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.gestory-composer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gestory-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-weight: 700;
}

.gestory-composer-form {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gestory-composer-textarea {
    width: 100%;
    border: none;
    font-size: var(--fs-base);
    outline: none;
    resize: none;
    min-height: 80px;
    background: transparent;
    color: var(--gestory-text);
}

/* Composer Toolbar */
.gestory-composer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gestory-border);
    flex-wrap: wrap;
}

.gestory-composer-tools {
    display: flex;
    gap: 8px;
}

.gestory-tool-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--gestory-border);
    background: var(--gestory-surface);
    color: var(--gestory-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--gestory-transition);
}

.gestory-tool-btn:hover {
    border-color: var(--gestory-primary);
    color: var(--gestory-primary);
    background: #f0f9ff;
}

.gestory-btn-publish {
    background: linear-gradient(135deg, var(--gestory-primary), var(--gestory-secondary));
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--gestory-transition);
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.2);
}

.gestory-btn-publish:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(29, 155, 240, 0.3);
}

.gestory-btn-publish:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #cbd5e1;
}

/* ========== POST CARDS (Premium Responsive) ========== */
.gestory-post {
    background: var(--gestory-surface);
    border: 1px solid var(--gestory-border);
    border-radius: var(--gestory-radius-lg);
    padding: var(--f-padding);
    box-shadow: var(--gestory-shadow-sm);
    transition: var(--gestory-transition);
    position: relative;
    width: 100%;
}

@container (max-width: 400px) {
    .gestory-post-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gestory-post-header-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-start;
    }
}

.gestory-post:hover {
    transform: translateY(-2px);
    box-shadow: var(--gestory-shadow-md);
}

/* Full width logic for ultra-mobile */
@media (max-width: 768px) {
    .full-width-mobile {
        margin-left: calc(-1 * var(--f-gap));
        width: calc(100% + 2 * var(--f-gap));
        border-radius: 0;
        border-inline: none;
    }
}

.gestory-post:hover {
    transform: translateY(-2px);
    /* Subtler lift */
    box-shadow: var(--gestory-shadow-md);
}

.gestory-post.featured {
    border: 2px solid var(--gestory-warning);
    background: linear-gradient(135deg, #fffbeb 0%, var(--gestory-surface) 100%);
}

@media (min-width: 769px) {

    /* Reset full-width logic for desktop */
    .gestory-post.full-width-mobile {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: var(--gestory-radius-lg);
        border: 1px solid var(--gestory-border);
    }
}

/* ========== COMPONENTS: POST CARDS (Unified) ========== */
.gestory-post {
    background: var(--gestory-surface);
    border: 1px solid var(--gestory-border);
    border-radius: var(--gestory-radius-lg);
    padding: var(--f-padding);
    margin-bottom: var(--f-padding);
    box-shadow: var(--gestory-shadow-sm);
    transition: var(--gestory-transition);
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gestory-post:hover {
    transform: translateY(-2px);
    box-shadow: var(--gestory-shadow-md);
}

.gestory-post.featured {
    border: 2px solid var(--gestory-warning);
    background: linear-gradient(135deg, #fffbeb, var(--gestory-surface));
}

/* Post Header */
.gestory-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.gestory-post-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.gestory-post-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--gestory-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1em;
    flex-shrink: 0;
}

.gestory-post-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gestory-post-author {
    margin: 0;
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--gestory-text);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.gestory-post-time-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: var(--fs-sm);
    color: var(--gestory-text-secondary);
}

/* Post Content */
.gestory-post-content {
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--gestory-text);
    word-break: break-word;
    overflow-wrap: break-word;
}

.gestory-post-content p {
    margin: 0 0 12px 0;
}

.gestory-post-content p:last-child {
    margin-bottom: 0;
}

/* Media Container */
.gestory-media-container {
    margin-top: 8px;
    border-radius: var(--gestory-radius-md);
    overflow: hidden;
    background: var(--gestory-bg);
}

.gestory-media-container img,
.gestory-media-container video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
}

/* Post Actions */
.gestory-post-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    /* Tighter for mobile by default */
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--gestory-border);
    flex-wrap: wrap;
}

@media (min-width: 480px) {
    .gestory-post-actions {
        gap: 8px;
    }
}

.gestory-post-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 20px;
    background: var(--gestory-bg);
    color: var(--gestory-text-secondary);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--gestory-transition);
    border: none;
}

.gestory-post-action:hover {
    background: var(--gestory-border);
    color: var(--gestory-primary);
}

.gestory-post-action.reacted {
    background: rgba(29, 155, 240, 0.1);
    color: var(--gestory-primary);
}

/* Ensure actions don't overflow on small screens */
@media (max-width: 360px) {
    .gestory-post-actions {
        justify-content: space-between;
    }
}

.gestory-post-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    height: 40px;
    /* Touch friendly height */
    border-radius: 20px;
    border: none;
    background: var(--gestory-bg);
    color: var(--gestory-text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--gestory-transition);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.gestory-post-action:hover {
    background: var(--gestory-border);
    color: var(--gestory-primary);
    transform: translateY(-1px);
}

.gestory-post-action.reacted,
.gestory-post-action.saved {
    background: #f0f9ff;
    color: var(--gestory-primary);
}

/* Reactions Wrapper & Popup */
.gestory-reactions-wrapper {
    position: relative;
    display: inline-block;
}

.gestory-reaction-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.gestory-reaction-trigger.reacted {
    color: var(--gestory-primary);
    background: rgba(var(--gestory-primary-rgb), 0.1);
}

.gestory-reaction-trigger.reacted .user-reaction-emoji {
    font-size: 1.2em;
    margin-right: 4px;
}

/* Ensure popup fits within screen */
.gestory-reactions-popup {
    min-width: 250px;
    max-width: 90vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 480px) {
    .gestory-reactions-popup {
        left: 0;
        right: auto;
        transform: none;
    }
}

/* Comments Section */
.gestory-comments-area {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gestory-border);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gestory-comment-form {
    display: flex;
    gap: 12px;
}

.gestory-comment-textarea {
    flex: 1;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--gestory-border);
    border-radius: var(--gestory-radius-md);
    font-size: var(--fs-base);
    background: var(--gestory-bg);
    outline: none;
    transition: var(--gestory-transition);
}

.gestory-comment-textarea:focus {
    border-color: var(--gestory-primary);
    background: var(--gestory-surface);
}

.gestory-btn-comment-submit {
    height: 44px;
    padding-inline: 20px;
    background: var(--gestory-primary);
    color: white;
    border-radius: var(--gestory-radius-md);
    font-weight: 700;
    border: none;
    cursor: pointer;
}

/* Guest CTA */
.gestory-guest-comment-cta {
    text-align: center;
    padding: 24px 20px;
    background: var(--gestory-bg);
    border-radius: 12px;
    border: 1px dashed var(--gestory-border);
}

.gestory-guest-comment-cta i {
    font-size: 32px;
    color: var(--gestory-primary);
    margin-bottom: 10px;
    display: block;
}

.gestory-guest-comment-cta p {
    margin: 0 0 16px 0;
    color: var(--gestory-text-secondary);
    font-size: 14px;
}

.google-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--gestory-border);
    border-radius: 8px;
    font-weight: 600;
    color: var(--gestory-text);
    text-decoration: none;
    transition: var(--gestory-transition);
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.google-login-btn:hover {
    box-shadow: var(--gestory-shadow-sm);
    border-color: #cbd5e1;
}

/* Loading Spinner */
.gestory-loading-spinner {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.gestory-spin {
    animation: spin 1s linear infinite;
    font-size: 24px;
    color: var(--gestory-primary);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== TOASTS & NOTIFICATIONS ========== */
.gestory-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.95);
    /* Better contrast */
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    max-width: 90%;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(8px);
}

.gestory-toast.show {
    transform: translateX(-50%) translateY(0);
}

.gestory-toast.success {
    border-left: 4px solid var(--gestory-success);
}

.gestory-toast.error {
    border-left: 4px solid var(--gestory-danger);
}

.gestory-toast.warning {
    border-left: 4px solid var(--gestory-warning);
}

/* ========== PRO MESSAGE ========== */
.v8-pro-tab-msg {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(150px);
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 100000;
    transition: var(--gestory-transition);
    max-width: 90%;
}

.v8-pro-tab-msg.active {
    transform: translateX(-50%) translateY(0);
}

.v8-pro-tab-msg i {
    color: var(--gestory-warning);
    font-size: 20px;
}

.pro-link {
    color: var(--gestory-primary);
    text-decoration: underline;
    font-weight: 700;
    cursor: pointer;
}

.gestory-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gestory-primary);
    z-index: 100000;
    transition: width 0.3s;
}

/* ========== RESPONSIVE SYSTEM (Unified Progression) ========== */
/* Already handled in .gestory-layout and components. 
   Additional specific overrides below. */

@media (max-width: 768px) {
    .gestory-sidebar {
        display: none;
    }

    .gestory-mobile-header {
        display: block;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: var(--gestory-surface);
        border-bottom: 1px solid var(--gestory-border);
    }
}

.gestory-notifications-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: min(400px, 100vw);
    height: 100vh;
    background: var(--gestory-surface);
    box-shadow: var(--gestory-shadow-lg);
    z-index: 2000;
    transform: translateX(100%);
    transition: var(--gestory-transition);
}

.gestory-notifications-panel.active {
    transform: translateX(0);
}

/* ========== ANIMATIONS ========== */
@keyframes gestoryPopInLeft {
    from {
        opacity: 0;
        transform: translateX(-15px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes gestoryPopInRight {
    from {
        opacity: 0;
        transform: translateX(15px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes gestoryPopInCenter {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Emoji Support */
img.emoji {
    height: 1.2em;
    width: 1.2em;
    vertical-align: middle;
}

/* ========== FILTER TABS ========== */
.gestory-filter-tabs-wrapper {
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding-bottom: 5px;
}

.gestory-filter-tabs {
    display: inline-flex;
    background: var(--gestory-surface);
    padding: 5px;
    border-radius: 12px;
    border: 1px solid var(--gestory-border);
    gap: 5px;
}

.gestory-filter-tab {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--gestory-text-secondary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--gestory-transition);
}

.gestory-filter-tab:hover {
    background: var(--gestory-bg);
    color: var(--gestory-text);
}

.gestory-filter-tab.active {
    background: var(--gestory-primary);
    color: white;
    box-shadow: var(--gestory-shadow-sm);
}

/* ========== CATEGORIES WIDGET ========== */
.gestory-categories-widget {
    background: var(--gestory-surface);
    border-radius: var(--gestory-radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--gestory-border);
    box-shadow: var(--gestory-shadow-sm);
}

.gestory-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--gestory-text);
    transition: var(--gestory-transition);
    margin-bottom: 4px;
}

.gestory-category-item:hover,
.gestory-category-item.active {
    background: var(--gestory-bg);
    transform: translateX(4px);
}

.gestory-category-item.active {
    background: #f0f9ff;
    border-left: 3px solid var(--gestory-primary);
}

.gestory-category-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gestory-category-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.gestory-category-name {
    font-weight: 600;
    font-size: 14px;
}

.gestory-category-count {
    background: var(--gestory-bg);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--gestory-text-secondary);
    font-weight: 600;
}

/* Locked Categories */
.v8-cat-locked {
    opacity: 0.8;
}

.v8-lock-icon {
    font-size: 16px;
    color: var(--gestory-warning);
}

/* ========== PUBLISH HELP ========== */
.gestory-help-trigger {
    background: none;
    border: none;
    color: var(--gestory-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gestory-publish-help-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--gestory-radius-md);
    padding: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #1e3a8a;
}

.gestory-publish-help-card h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gestory-publish-help-card ul {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.gestory-publish-help-card li {
    margin-bottom: 6px;
}

.gestory-publish-help-card .hint {
    margin-top: 10px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.5);
    padding: 8px;
    border-radius: 6px;
}

/* EMPTY: Consolidated into top-level component sections */

/* ========== SECTION CONTAINERS ========== */
.gestory-section-container {
    display: none !important;
    margin: 12px 0 !important;
    padding: 14px !important;
    border-radius: var(--radius-md) !important;
    box-sizing: border-box !important;
    animation: slideDown 0.2s ease-out !important;
}

.gestory-section-container.active {
    display: block !important;
}

.gestory-section-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
    color: #0c4a6e !important;
}

.gestory-section-header i {
    font-size: 16px !important;
    color: var(--color-primary) !important;
}

.required {
    color: #ef4444 !important;
    margin-left: 4px !important;
}

/* ========== TOPIC SELECTOR ========== */
#gestory-topic-selector-container {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, #f8fafc 100%) !important;
    border-left: 4px solid var(--color-primary) !important;
}

.gestory-topics-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.gestory-topic-btn {
    border: 1.5px solid #cbd5e1 !important;
    background: var(--color-bg) !important;
    border-radius: 20px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--color-text-secondary) !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    touch-action: manipulation !important;
    height: 36px !important;
    box-sizing: border-box !important;
}

.gestory-topic-btn:hover:not(.active) {
    background: var(--color-primary-light) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-primary-dark) !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15) !important;
    transform: translateY(-1px) !important;
}

.gestory-topic-btn:focus {
    outline: 2px solid var(--color-primary) !important;
    outline-offset: 2px !important;
}

.gestory-topic-btn.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
    color: white !important;
    border-color: var(--color-primary-dark) !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35) !important;
}

/* ========== MEDIA INPUT ========== */
#gestory-media-input-box {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, #f8fafc 100%) !important;
    border-left: 4px solid #0284c7 !important;
}

.gestory-media-input-wrapper {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    margin-bottom: 8px !important;
}

/* EMPTY: Consolidated into top-level component sections */

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {

    .gestory-composer,
    .gestory-composer-textarea,
    .gestory-tool-btn,
    .gestory-btn-publish,
    .gestory-composer-select,
    .gestory-section-container,
    .gestory-topic-btn,
    .option-label {
        transition: none !important;
    }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: more) {
    .gestory-composer {
        border-width: 2px;
    }

    .gestory-composer-textarea,
    .gestory-composer-select,
    .gestory-tool-btn {
        border-width: 2px;
    }

    .gestory-btn-publish {
        box-shadow: 0 0 0 2px var(--color-primary) !important;
    }
}

/* ========== UTILITY CLASSES ========== */
.gestory-opacity-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.gestory-success {
    color: var(--color-secondary) !important;
}

.gestory-error {
    color: #ef4444 !important;
}

.gestory-warning {
    color: #f59e0b !important;
}

.gestory-composer-textarea {
    width: 100% !important;
    min-height: 100px !important;
    max-height: 300px !important;
    padding: 12px 14px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    font-family: inherit !important;
    resize: vertical !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    outline: none !important;
    box-sizing: border-box !important;
    background: white !important;
    display: block !important;
    overflow-y: auto !important;
    line-height: 1.5 !important;
}

.gestory-composer-textarea::placeholder {
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

.gestory-composer-textarea:focus {
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1) !important;
    background: #f0f9ff !important;
}

.gestory-composer-textarea:disabled {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* ========== MAIN ACTIONS ROW ========== */
.gestory-composer-main-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

/* ========== TOOLS ========== */
.gestory-composer-tools {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.gestory-tool-btn {
    background: white;
    border: 1.5px solid #e2e8f0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    font-size: 18px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    padding: 0;
}

.gestory-tool-btn:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
    color: #0284c7;
}

.gestory-tool-btn:active {
    background: #e0f2fe;
}

.gestory-tool-btn:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* ========== CATEGORY SELECT ========== */
.gestory-composer-select {
    padding: 10px 14px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: white !important;
    color: #334155 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    flex: 1 1 auto;
    min-width: 140px;
    transition: all 0.2s !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    height: 40px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 20px !important;
    padding-right: 36px !important;
}

.gestory-composer-select:hover:not(:disabled) {
    border-color: #0ea5e9 !important;
    background-color: #f0f9ff !important;
}

.gestory-composer-select:focus {
    outline: none !important;
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1) !important;
}

.gestory-composer-select:disabled {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* ========== PUBLISH BUTTON ========== */
.gestory-btn-publish {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    color: white !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3) !important;
    touch-action: manipulation !important;
    min-width: 120px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 40px !important;
}

.gestory-btn-publish:hover:not(:disabled) {
    background: linear-gradient(135deg, #0095d8 0%, #0073b0 100%) !important;
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.4) !important;
    transform: translateY(-2px) !important;
}

.gestory-btn-publish:active:not(:disabled) {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3) !important;
}

.gestory-btn-publish:focus:not(:disabled) {
    outline: 2px solid #0ea5e9 !important;
    outline-offset: 2px !important;
}

.gestory-btn-publish:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%) !important;
}

/* ========== SECTION CONTAINERS ========== */
.gestory-section-container {
    display: none;
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
    box-sizing: border-box;
    animation: slideDown 0.2s ease-out;
}

.gestory-section-container.active {
    display: block !important;
}

.gestory-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #0c4a6e;
}

.gestory-section-header i {
    font-size: 16px;
    color: var(--gestory-primary);
}

.required {
    color: #ef4444;
    margin-left: 4px;
}

/* ========== TOPIC SELECTOR ========== */
#gestory-topic-selector-container {
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.05) 0%, var(--gestory-bg) 100%);
    border-left: 4px solid var(--gestory-primary);
}

.gestory-topics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gestory-topic-btn {
    border: 1.5px solid #cbd5e1;
    background: white;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    touch-action: manipulation;
    height: 36px;
}

.gestory-topic-btn:hover {
    background: rgba(29, 155, 240, 0.05);
    border-color: var(--gestory-primary);
    color: var(--gestory-secondary);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
}

.gestory-topic-btn:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.gestory-topic-btn.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border-color: #0273b8;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

/* ========== MEDIA INPUT ========== */
#gestory-media-input-box {
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.05) 0%, var(--gestory-bg) 100%);
    border-left: 4px solid var(--gestory-secondary);
}

.gestory-media-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.gestory-media-input {
    flex: 1;
    padding: 10px 12px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    outline: none !important;
    transition: all 0.2s !important;
    background: white !important;
    color: #334155 !important;
}

.gestory-media-input:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1) !important;
}

.gestory-clear-btn {
    background: none !important;
    border: none !important;
    color: #ef4444;
    cursor: pointer;
    padding: 0 !important;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.gestory-clear-btn:hover {
    color: #dc2626;
    transform: scale(1.1);
}

.gestory-media-preview {
    margin-top: 8px;
    min-height: 0;
}

/* ========== CONTACT SELECTOR ========== */
#gestory-contact-selector-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, var(--gestory-bg) 100%);
    border-left: 4px solid var(--gestory-success);
}

.gestory-contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
    gap: 8px;
}

.gestory-contact-option {
    position: relative;
    cursor: pointer;
}

.gestory-contact-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    margin: 0;
}

.gestory-contact-option.disabled input {
    cursor: not-allowed;
}

.gestory-contact-option input:disabled+.option-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 60px;
}

.gestory-contact-option:hover:not(.disabled) .option-label {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.gestory-contact-option input:focus+.option-label {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

.gestory-contact-option input:checked+.option-label {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #059669;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.option-label i {
    font-size: 20px;
}

.option-label span {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

/* ========== ANIMATIONS ========== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(400px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .gestory-composer-main-actions {
        gap: 6px;
    }

    .gestory-composer-select {
        min-width: 130px;
        font-size: 13px;
        padding: 9px 12px !important;
    }

    .gestory-btn-publish {
        padding: 9px 18px !important;
        font-size: 13px !important;
        min-width: 100px !important;
    }

    .gestory-tool-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .gestory-composer-main-actions {
        gap: 4px;
    }

    .gestory-composer-select {
        min-width: 100px;
        font-size: 12px;
        padding: 8px 10px !important;
    }

    .gestory-btn-publish {
        padding: 8px 14px !important;
        font-size: 12px !important;
        min-width: 80px !important;
    }

    .gestory-tool-btn {
        width: 36px;
        height: 36px;
    }

    .gestory-contact-options {
        grid-template-columns: 1fr 1fr;
    }
}

/* ========== SIMPLIFIED PUBLISH BUTTON ========== */
.gestory-btn-publish {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    padding: 11px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    touch-action: manipulation;
    min-width: 130px;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px;
}

.gestory-btn-publish:hover:not(:disabled) {
    background: linear-gradient(135deg, #0095d8 0%, #0073b0 100%);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.4);
    transform: translateY(-2px);
}

.gestory-btn-publish:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.gestory-btn-publish:focus:not(:disabled) {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.gestory-btn-publish:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.publish-text {
    font-weight: 700;
}

@media (max-width: 768px) {
    .gestory-btn-publish {
        padding: 10px 18px;
        font-size: 14px;
        min-width: 110px;
    }
}

@media (max-width: 640px) {
    .gestory-btn-publish {
        padding: 9px 16px;
        font-size: 13px;
        min-width: 90px;
    }
}

/* ========== COMPOSER ACTIONS ROW ========== */
.gestory-composer-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.gestory-actions-main-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.gestory-composer-tools {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.gestory-composer-tool {
    background: white;
    border: 1.5px solid #e2e8f0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    font-size: 18px;
    transition: all 0.2s;
    flex-shrink: 0;
    touch-action: manipulation;
}

.gestory-composer-tool:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
    color: #0284c7;
}

.gestory-composer-tool:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px !important;
}

/* ========== RESPONSIVE - TABLET ========== */
@media (max-width: 768px) {
    .gestory-composer-main-actions {
        gap: 6px !important;
    }

    .gestory-composer-select {
        min-width: 130px !important;
        font-size: 13px !important;
        padding: 9px 12px !important;
    }

    .gestory-btn-publish {
        padding: 9px 18px !important;
        font-size: 13px !important;
        min-width: 100px !important;
    }

    .gestory-tool-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 640px) {
    .gestory-composer-main-actions {
        gap: 4px !important;
    }

    .gestory-composer-select {
        min-width: 100px !important;
        font-size: 12px !important;
        padding: 8px 10px !important;
    }

    .gestory-btn-publish {
        padding: 8px 14px !important;
        font-size: 12px !important;
        min-width: 80px !important;
    }

    .gestory-tool-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }

    .gestory-contact-options {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* ========== FORM FIXES ========== */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

input,
textarea,
select {
    font-size: 16px;
    font-family: inherit;
}

/* Allow emoji to display naturally when typed by user */
.gestory-post-content,
.gestory-comment-text {
    word-break: break-word;
}

/* ========== CONTACT BUTTONS (CARD) ========== */
.gestory-contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gestory-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--gestory-transition);
}

.gestory-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--gestory-shadow-sm);
}

.gestory-contact-btn.whatsapp {
    background: #dcfce7;
    color: #166534;
}

.gestory-contact-btn.whatsapp:hover {
    background: #bbf7d0;
}

.gestory-contact-btn.email {
    background: #eff6ff;
    color: #1e40af;
}

.gestory-contact-btn.email:hover {
    background: #dbeafe;
}

.gestory-contact-btn.web {
    background: #f1f5f9;
    color: #475569;
}

.gestory-contact-btn.web:hover {
    background: #e2e8f0;
}

/* ========== BOOSTERS (POTENCIADORES) ========== */
.gestory-boosters-wrapper {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gestory-border);
}

.gestory-boosters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gestory-text-secondary);
}

.gestory-boosters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gestory-booster-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--gestory-transition);
}

.gestory-booster-btn:hover {
    transform: scale(1.05);
}

.gestory-booster-btn .booster-count-pill {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
}

/* Helper for mobile labels if needed */
.gestory-boosters-list.hide-labels-mobile .booster-label {
    display: none;
}

@media (min-width: 768px) {
    .gestory-boosters-list.hide-labels-mobile .booster-label {
        display: inline;
    }
}

/* ========== TIP CARDS ========== */
.gestory-tip-card {
    background: var(--gestory-surface);
    border-radius: var(--gestory-radius-lg);
    padding: var(--f-padding);
    margin-bottom: var(--f-padding);
    border: 1px solid var(--gestory-border);
    box-shadow: var(--gestory-shadow-sm);
    position: relative;
    overflow: hidden;
    transition: var(--gestory-transition);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gestory-tip-card.premium-tip {
    background: linear-gradient(135deg, #fffbeb 0%, var(--gestory-surface) 50%);
}

.gestory-tip-card.tip-highlighted {
    border: 2px solid var(--gestory-primary);
    box-shadow: 0 0 20px rgba(29, 155, 240, 0.15);
}

.gestory-tip-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--gestory-shadow-md);
}

.gestory-tip-card .tip-glare {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    pointer-events: none;
    transition: left 0.5s ease;
}

.gestory-tip-card:hover .tip-glare {
    left: 100%;
}

.gestory-tip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.gestory-tip-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--tip-color, var(--gestory-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    position: relative;
    flex-shrink: 0;
}

.gestory-tip-badge .pulse-ring {
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    border: 2px solid var(--tip-color, var(--gestory-primary));
    opacity: 0.3;
    animation: pulseRing 2s infinite;
}

@keyframes pulseRing {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
}

.gestory-tip-label-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gestory-tip-label-group .tip-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--tip-color, var(--gestory-primary));
}

.gestory-tip-label-group .tip-category {
    font-size: 14px;
    font-weight: 600;
    color: var(--gestory-text);
}

.gestory-tip-card .tip-menu {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gestory-text-secondary);
    cursor: pointer;
    transition: var(--gestory-transition);
}

.gestory-tip-card .tip-menu:hover {
    background: var(--gestory-bg);
}

.gestory-tip-body {
    margin-bottom: 20px;
}

.gestory-tip-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gestory-text);
    margin: 0 0 12px 0;
}

.gestory-tip-text {
    position: relative;
    padding-left: 30px;
}

.gestory-tip-text .quote-icon {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 24px;
    color: var(--tip-color, var(--gestory-primary));
    opacity: 0.5;
}

.gestory-tip-text p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--gestory-text-secondary);
}

.gestory-tip-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gestory-tip-author-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gestory-tip-author-box .author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.gestory-tip-author-box .author-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--gestory-text);
}

.gestory-tip-actions-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tip-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    border: none;
    background: var(--gestory-bg);
    color: var(--gestory-text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--gestory-transition);
}

.tip-action-btn:hover {
    background: var(--gestory-border);
    color: var(--gestory-primary);
}

.tip-action-btn.like.active {
    background: #fef2f2;
    color: #ef4444;
}

.tip-action-btn.like.active i {
    color: #ef4444;
}

.tip-action-btn .count {
    font-size: 13px;
}

.gestory-tip-reactions-section {
    padding: 12px 0;
    border-top: 1px solid var(--gestory-border);
}

.tip-reactions-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 5px;
    -webkit-overflow-scrolling: touch;
}

/* ========== TOPIC TAGS (COMPOSER) ========== */
.gestory-topic-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--gestory-bg);
    border: 1.5px solid var(--gestory-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--gestory-text-secondary);
    cursor: pointer;
    transition: var(--gestory-transition);
}

.gestory-topic-tag:hover {
    border-color: var(--topic-color, var(--gestory-primary));
    color: var(--topic-color, var(--gestory-primary));
    background: #f0f9ff;
}

.gestory-topic-tag.selected,
.gestory-topic-tag.active {
    background: var(--topic-color, var(--gestory-primary));
    color: white;
    border-color: var(--topic-color, var(--gestory-primary));
}

/* ========== BANNER ========== */
.gestory-banner {
    background: linear-gradient(135deg, var(--gestory-primary) 0%, #0ea5e9 100%);
    color: white;
    padding: 20px 24px;
    border-radius: var(--gestory-radius-lg);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: var(--gestory-shadow-md);
}

.gestory-banner-content {
    flex: 1;
}

.gestory-banner-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.gestory-banner-text {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.gestory-banner-action {
    background: white;
    color: var(--gestory-primary);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--gestory-transition);
    white-space: nowrap;
}

.gestory-banner-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
    .gestory-banner {
        flex-direction: column;
        text-align: center;
    }

    .gestory-banner-action {
        width: 100%;
        justify-content: center;
    }
}

/* ========== NOTIFICATIONS PANEL ENHANCED ========== */
.gestory-notifications-panel {
    position: fixed;
    right: 20px;
    top: 80px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: var(--gestory-surface);
    border-radius: var(--gestory-radius-lg);
    box-shadow: var(--gestory-shadow-lg);
    border: 1px solid var(--gestory-border);
    z-index: 10050;
    max-height: 80vh;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.gestory-notifications-panel.active {
    display: flex !important;
    animation: slideInNotif 0.3s ease;
}

@keyframes slideInNotif {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gestory-notifications-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gestory-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gestory-surface);
}

.gestory-notifications-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.gestory-notifications-list {
    overflow-y: auto;
    flex: 1;
}

.gestory-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gestory-border);
    cursor: pointer;
    transition: var(--gestory-transition);
}

.gestory-notification-item:hover {
    background: var(--gestory-bg);
}

.gestory-notification-item.unread {
    background: #f0f9ff;
}

.gestory-notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gestory-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.gestory-notification-content {
    flex: 1;
    min-width: 0;
}

.gestory-notification-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--gestory-text);
    margin: 0 0 4px 0;
}

.gestory-notification-time {
    font-size: 12px;
    color: var(--gestory-text-secondary);
}

.gestory-notifications-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--gestory-text-secondary);
}

.gestory-notifications-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ========== IMPROVED LOADER ========== */
.gestory-generating-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

.gestory-generating-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--gestory-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.gestory-generating-text {
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.gestory-loading-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--gestory-text-secondary);
}

.gestory-loading-inline i {
    font-size: 24px;
}

/* ========== EMOJI PICKER ========== */
.gestory-emoji-picker {
    background: var(--gestory-surface);
    border: 1px solid var(--gestory-border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--gestory-shadow-lg);
    max-width: 280px;
}

.gestory-emoji-picker .emoji-list {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.gestory-emoji-picker .emoji-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: var(--gestory-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gestory-emoji-picker .emoji-btn:hover {
    background: var(--gestory-bg);
    transform: scale(1.2);
}

/* ========== RESPONSIVE IMPROVEMENTS ========== */
@media (max-width: 768px) {
    .gestory-tip-card {
        padding: 18px;
        margin-left: 0;
        margin-right: 0;
        border-radius: var(--gestory-radius-lg);
        border-left: 1px solid var(--gestory-border);
        border-right: 1px solid var(--gestory-border);
    }

    .gestory-tip-header {
        gap: 10px;
    }

    .gestory-tip-badge {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .gestory-tip-title {
        font-size: 16px;
    }

    .gestory-tip-text {
        padding-left: 0;
    }

    .gestory-tip-text .quote-icon {
        display: none;
    }

    .gestory-tip-actions-group {
        justify-content: space-around;
    }

    .tip-action-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .gestory-notifications-panel {
        position: fixed;
        inset: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        top: 0;
        right: 0;
    }
}

/* Generating Overlay Styles */
.gestory-generating-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    animation: fadeIn 0.3s ease;
}

.gestory-generating-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--gestory-primary, #3b82f6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.gestory-generating-text {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    animation: pulse 2s infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}


/* Shadow Utility Classes */
.shadow-none {
    box-shadow: none !important;
}

.shadow-small {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
}

.shadow-medium {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
}

.shadow-large {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}

/* =========================================
   TOP MOTIVATORS WIDGET (Premium Design)
   ========================================= */
.gestory-top-motivators-pro {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    /* Premium Shadow */
    overflow: hidden;
    position: relative;
    font-family: 'Inter', sans-serif;
}

.top-motivators-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon-box {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.header-title-group h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.current-week-badge {
    display: inline-block;
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 3px;
}


.gestory-guide-toggle-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.gestory-guide-toggle-btn i {
    font-size: 16px;
    color: #f59e0b;
    /* Accent color */
}

.gestory-guide-toggle-btn:hover,
.gestory-guide-toggle-btn.active {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #b45309;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for Top Motivators */
@media (max-width: 768px) {
    .gestory-top-motivators-pro {
        padding: 15px !important;
    }

    .gestory-podium-stage {
        min-height: auto;
        padding-bottom: 0;
        gap: 4px;
    }

    .podium-column .podium-user-name {
        font-size: 11px;
        max-width: 60px;
    }

    .place-1 .podium-avatar-container {
        width: 50px;
        height: 50px;
    }

    .place-1 .podium-stand {
        height: 90px;
    }

    .top-motivators-header {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Consolidated Components Logic */
.v10-select-wrapper .v10-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 18px;
}

.gestory-composer-select {
    width: 100% !important;
    padding-left: 36px !important;
    padding-right: 36px !important;
    height: 44px !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

.v10-tool-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.v10-tool-btn:hover {
    background: #f1f5f9;
    color: var(--gestory-primary);
    border-color: var(--gestory-primary);
}

.v10-publish-btn {
    height: 44px;
    padding: 0 24px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(14, 165, 233, 0.25);
    transition: all 0.3s;
}

.v10-publish-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
}

.v10-publish-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

/* 3. TOP MOTIVADORES WIDGET V10 (Avoid Overflow) */
.top-motivators-header-v10 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.header-v10-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-v10-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
}

.header-v10-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.v10-badge-live {
    font-size: 9px;
    font-weight: 900;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 2px 6px;
    border-radius: 5px;
    letter-spacing: 0.5px;
}

.v10-guide-button {
    background: white;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.v10-guide-button:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
}

.v10-guide-button i {
    color: #f59e0b;
    font-size: 14px;
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .gestory-composer-v10-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .v10-actions-left {
        width: 100%;
        gap: 8px;
    }

    .v10-select-wrapper {
        min-width: 0;
    }

    .v10-publish-btn {
        width: 100%;
        justify-content: center;
    }

    .gestory-composer-inner {
        padding: 16px !important;
    }
}

/* ========== FLOATING REACTIONS POPUP ========== */
.gestory-reactions-popup {
    position: fixed !important;
    z-index: 1000 !important;
    transition: opacity 0.25s, transform 0.25s !important;
    user-select: none !important;
    display: none !important;
    min-width: 250px;
    max-width: 90vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: white !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    padding: 10px !important;
}

.gestory-reactions-popup.show {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
}

@keyframes popUpFade {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(5px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Animations moved to top of file */

/* Grid Layout for reactions */
.gestory-reactions-grid {
    display: grid !important;
    width: 100% !important;
    gap: inherit !important;
}

.gestory-reaction-option {
    position: relative !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    border-radius: 12px !important;
    padding: 0 !important;
}

.gestory-reaction-option:hover {
    background: var(--r-bg, rgba(0, 0, 0, 0.04)) !important;
    transform: scale(1.1) !important;
    border-radius: 12px !important;
}

.gestory-reaction-option.active {
    background: var(--r-bg, rgba(0, 0, 0, 0.08)) !important;
    border-radius: 12px !important;
}

.gestory-reaction-option.active .emoji-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) !important;
}

.gestory-reaction-option .emoji-icon {
    display: block !important;
    line-height: 1 !important;
    transition: transform 0.2s !important;
    pointer-events: none !important;
    margin-bottom: 2px !important;
    order: 1 !important;
}

.gestory-reaction-option:hover .emoji-icon {
    transform: scale(1.15) !important;
}

.gestory-reaction-label {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    color: #334155 !important;
    visibility: visible !important;
    opacity: 1 !important;
    order: 2 !important;
    word-break: break-word !important;
    white-space: normal !important;
    width: 100% !important;
}

.gestory-reaction-option .count {
    position: absolute !important;
    top: 0px !important;
    right: 0px !important;
    background: var(--r-color, #1d9bf0) !important;
    color: white !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    min-width: 18px !important;
    height: 18px !important;
    border-radius: 9px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    z-index: 5 !important;
    border: 2px solid white !important;
}

@media (max-width: 768px) {
    .gestory-reactions-popup {
        padding: 8px !important;
        min-width: auto !important;
        max-width: calc(100vw - 24px) !important;
        background: white !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 10px !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
        position: fixed !important;
        will-change: transform !important;
    }

    .gestory-reaction-option {
        padding: 8px 6px !important;
        min-width: 50px !important;
        flex: 0 1 auto !important;
    }

    .gestory-reaction-label {
        font-size: 10px !important;
        line-height: 1.1 !important;
        margin-top: 2px !important;
    }

    .gestory-reaction-option .emoji-icon {
        font-size: 24px !important;
    }
}

@media (max-width: 480px) {
    .gestory-reactions-popup {
        min-width: auto !important;
        max-width: calc(100vw - 20px) !important;
        padding: 8px !important;
        position: fixed !important;
        border-radius: 10px !important;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12) !important;
    }

    .gestory-reaction-option {
        padding: 6px 4px !important;
        min-width: 45px !important;
    }

    .gestory-reaction-label {
        font-size: 9px !important;
        line-height: 1 !important;
    }

    .gestory-reaction-option .emoji-icon {
        font-size: 20px !important;
    }
}

/* ========== MICRO-INTERACTIONS & ENTRY EFFECTS ========== */
.post-entry-animation {
    animation: gestoryPostEnter 0.5s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes gestoryPostEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Elastic Pop for Buttons */
.gestory-post-action:active i,
.tip-action-btn:active i {
    transform: scale(0.8);
}

.gestory-post-action.active i,
.tip-action-btn.active i {
    animation: gestoryPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes gestoryPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

/* Floating Hearts effect when liking */
.gestory-like-heart-anim {
    position: absolute;
    pointer-events: none;
    color: #f43f5e;
    animation: gestoryHeartFly 0.8s ease-out forwards;
    z-index: 1000;
}

@keyframes gestoryHeartFly {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -150%) scale(1.5);
        opacity: 0;
    }
}

/* Tab indicator smoothness */
.gestory-filter-tab {
    position: relative;
    overflow: hidden;
}

.gestory-filter-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: white;
    border-radius: 10px 10px 0 0;
    animation: indicatorIn 0.3s ease;
}

@keyframes indicatorIn {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* ========== SKELETON LOADERS ========== */
.v8-skeleton {
    background: #f1f5f9;
    background: linear-gradient(110deg, #f1f5f9 8%, #f8fafc 18%, #f1f5f9 33%);
    border-radius: 8px;
    background-size: 200% 100%;
    animation: 1.5s v8Skeleton shine linear infinite;
}

@keyframes v8Skeleton {
    to {
        background-position-x: -200%;
    }
}

.gestory-skeleton-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #eff3f4;
}

.sk-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.sk-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.sk-meta {
    flex: 1;
}

.sk-name {
    width: 140px;
    height: 14px;
    margin-bottom: 8px;
}

.sk-date {
    width: 80px;
    height: 10px;
}

.sk-content {
    margin-bottom: 20px;
}

.sk-line {
    width: 100%;
    height: 12px;
    margin-bottom: 10px;
}

.sk-line.short {
    width: 60%;
}

.sk-media {
    width: 100%;
    height: 250px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.sk-footer {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #f8fafc;
}

.sk-btn {
    width: 60px;
    height: 24px;
    border-radius: 20px;
}

/* Optimistic UI Hints */
.gestory-post.is-publishing {
    opacity: 0.7;
    pointer-events: none;
    border-style: dashed;
    border-color: var(--gestory-primary);
    animation: gestoryPulse 2s infinite ease-in-out;
}

@keyframes gestoryPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.995);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
    }
}

/* ========== LAYOUT MORPHING (Step 7) ========== */
.v8-morphing-out {
    opacity: 0 !important;
    transform: translateY(-10px) scale(0.98) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    pointer-events: none;
}

.v8-morphing-in {
    animation: v8MorphIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes v8MorphIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Ensure filter tabs are smooth and sticky */
.gestory-filter-tabs-wrapper {
    position: sticky;
    top: 65px;
    /* Offset for header height */
    z-index: 100 !important;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    margin: -10px -10px 15px -10px;
    padding: 10px;
}

@media (max-width: 768px) {
    .gestory-filter-tabs-wrapper {
        top: 55px;
        /* Mobile header height */
        margin: -15px -15px 15px -15px;
        padding: 12px 15px;
    }
}

/* Fix jumping: Smoother scroll-to-feed target */
.gestory-layout-main {
    scroll-margin-top: 120px;
}

/* Load More v10 Pro Button */
.gestory-btn-load-more-v10 {
    position: relative;
    background: white;
    border: 1px solid var(--gestory-border);
    color: var(--gestory-text);
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    overflow: hidden;
    z-index: 1;
}

.gestory-btn-load-more-v10:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--gestory-primary);
    color: var(--gestory-primary);
}

.gestory-btn-load-more-v10:active {
    transform: translateY(-1px) scale(0.98);
}

.gestory-btn-load-more-v10::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gestory-primary) 0%, var(--gestory-secondary) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s;
}

.gestory-btn-load-more-v10:hover::before {
    opacity: 0.03;
}

.v10-load-more-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.v10-load-more-content i {
    font-size: 18px;
    transition: transform 0.4s;
}

.gestory-btn-load-more-v10:hover .v10-load-more-content i {
    transform: translateY(3px);
}

.v10-load-more-loader {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gestory-btn-load-more-v10.is-loading {
    pointer-events: none;
    background: #f8fafc;
    border-color: transparent;
    color: var(--gestory-text-secondary);
}

.gestory-btn-load-more-v10.is-loading .v10-load-more-content {
    display: none;
}

.gestory-btn-load-more-v10.is-loading .v10-load-more-loader {
    display: flex;
}

/* Infinite Scroll Trigger Indicator (Optional visual feedback) */
#gestory-infinite-trigger {
    opacity: 0.5;
    transition: opacity 0.3s;
}

@media (max-width: 768px) {
    .gestory-btn-load-more-v10 {
        width: 100%;
        max-width: 320px;
    }
}

/* ========== SEARCH RESULT ENHANCEMENTS ========== */
.v10-type-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--gestory-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
    letter-spacing: 0.5px;
}

.v10-search-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.v10-cat-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--gestory-text-secondary);
    opacity: 0.8;
}

.v10-search-item:hover .v10-type-badge {
    background: var(--gestory-secondary);
}
