/* Inikisahku 2.0 - Modern Anonymous Social Community Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --header-height: 64px;
    /* LIGHT MODE DESIGN TOKENS */
    --bg: #F7F6F8;
    --surface: #FFFFFF;
    --surface-elevated: #F1EEF2;
    --primary: #B85F80;
    --primary-hover: #9E4D6B;
    --secondary: #7C6793;
    --text-primary: #241E26;
    --text-secondary: #716975;
    --text-muted: #9E95A2;
    --border: #E5DFE7;
    --border-hover: #D0C6D3;
    --text-on-primary: #FFFFFF;

    /* Legacy compatibility aliases */
    --ik-bg: var(--bg);
    --ik-surface: var(--surface);
    --ik-elevated: var(--surface-elevated);
    --ik-primary: var(--primary);
    --ik-secondary: var(--secondary);
    --ik-text-primary: var(--text-primary);
    --ik-text-secondary: var(--text-secondary);
    --ik-border: var(--border);
    --card-bg: var(--surface);
    --card-border: var(--border);
    --accent-primary: var(--primary);
    --accent-secondary: var(--secondary);
    --bg-paper: var(--surface);
}

.dark {
    /* DARK MODE DESIGN TOKENS */
    --bg: #111014;
    --surface: #1B191E;
    --surface-elevated: #242128;
    --primary: #DFA0B7;
    --primary-hover: #EBABC1;
    --secondary: #B9A6CB;
    --text-primary: #F5F1F4;
    --text-secondary: #B5ABB5;
    --text-muted: #807682;
    --border: #353039;
    --border-hover: #4D4653;
    --text-on-primary: #100F12;

    /* Legacy compatibility aliases */
    --ik-bg: var(--bg);
    --ik-surface: var(--surface);
    --ik-elevated: var(--surface-elevated);
    --ik-primary: var(--primary);
    --ik-secondary: var(--secondary);
    --ik-text-primary: var(--text-primary);
    --ik-text-secondary: var(--text-secondary);
    --ik-border: var(--border);
    --card-bg: var(--surface);
    --card-border: var(--border);
    --accent-primary: var(--primary);
    --accent-secondary: var(--secondary);
    --bg-paper: var(--surface);
}

/* Base Body */
body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    overflow-x: clip; /* clip prevents horizontal scroll without breaking position: sticky */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* Responsive Standard Layout Container (1320px Balanced Max Width) */
.ik-layout-container {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .ik-layout-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Sticky App Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* ========================================================
   GLOBAL TOP NAVBAR COMPONENT
   ======================================================== */
.nav-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-center {
    display: none;
}

@media (min-width: 768px) {
    .nav-center {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1 1 0%;
        max-width: 580px;
        margin: 0 16px;
        min-width: 0;
    }
}

.nav-search-form {
    position: relative;
    flex: 1 1 0%;
    min-width: 0;
}

.nav-search-input {
    width: 100%;
    padding: 8px 32px 8px 36px;
    border-radius: 12px;
    background-color: var(--surface-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

.nav-search-input:focus {
    border-color: var(--primary);
}

.nav-category-dropdown {
    position: relative;
    flex-shrink: 0;
}

.nav-category-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background-color: var(--surface-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-category-btn.active {
    background-color: var(--primary);
    color: var(--text-on-primary);
    font-weight: 700;
    border-color: transparent;
}

.nav-category-btn:hover:not(.active) {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.nav-category-popup {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 224px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    padding: 8px;
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-guest-btns {
    display: none;
}

@media (min-width: 640px) {
    .nav-guest-btns {
        display: flex;
        align-items: center;
        gap: 8px;
    }
}

.nav-mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 12px;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
}

@media (min-width: 768px) {
    .nav-mobile-btn {
        display: none !important;
    }
}

/* 3-Column Persistent Social App Layout */
.ik-grid-3col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    align-items: start;
}

.left-sidebar,
.ik-sidebar-left {
    display: none;
}

.main-content,
.ik-main-feed {
    width: 100%;
    min-width: 0;
}

.right-sidebar,
.ik-sidebar-right {
    display: none;
}

/* Tablet Layout (768px - 1023px): 2 Columns (Compact Left Sidebar + Main Content) */
@media (min-width: 768px) and (max-width: 1023px) {
    .ik-grid-3col {
        grid-template-columns: 200px minmax(0, 1fr);
        gap: 20px;
    }

    .left-sidebar,
    .ik-sidebar-left {
        display: block !important;
        position: sticky;
        top: calc(var(--header-height) + 16px);
        align-self: flex-start;
        height: auto;
        max-height: calc(100vh - var(--header-height) - 32px);
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .left-sidebar::-webkit-scrollbar,
    .ik-sidebar-left::-webkit-scrollbar {
        display: none;
    }

    .right-sidebar,
    .ik-sidebar-right {
        display: none !important;
    }
}

/* Desktop Layout (1024px+): 3 Columns (Left 200px, Center Flexible, Right 260px) */
@media (min-width: 1024px) {
    .ik-grid-3col {
        grid-template-columns: 200px minmax(0, 1fr) 260px;
        gap: 24px;
    }

    .left-sidebar,
    .ik-sidebar-left {
        display: block !important;
        position: sticky;
        top: calc(var(--header-height) + 16px);
        align-self: flex-start;
        height: auto;
        max-height: calc(100vh - var(--header-height) - 32px);
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .left-sidebar::-webkit-scrollbar,
    .ik-sidebar-left::-webkit-scrollbar {
        display: none;
    }

    .main-content,
    .ik-main-feed {
        min-width: 0;
    }

    .right-sidebar,
    .ik-sidebar-right {
        display: block !important;
        position: sticky;
        top: calc(var(--header-height) + 16px);
        align-self: flex-start;
        height: auto;
        max-height: calc(100vh - var(--header-height) - 32px);
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .right-sidebar::-webkit-scrollbar,
    .ik-sidebar-right::-webkit-scrollbar {
        display: none;
    }
}

/* Modern Card Component */
.ik-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text-primary);
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.ik-card:hover {
    border-color: var(--border-hover);
}

/* Story Card Social Feed */
.story-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: block;
}

.story-card:hover {
    border-color: var(--primary);
    background-color: var(--surface-elevated);
    transform: translateY(-1px);
}

/* Quill Editor Dark & Light Theme Harmonization */
.ql-toolbar.ql-snow {
    background-color: var(--surface-elevated) !important;
    border: 1px solid var(--border) !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

.ql-toolbar.ql-snow .ql-stroke {
    stroke: var(--text-secondary) !important;
}

.ql-toolbar.ql-snow .ql-fill {
    fill: var(--text-secondary) !important;
}

.ql-toolbar.ql-snow .ql-picker {
    color: var(--text-secondary) !important;
}

.ql-toolbar.ql-snow .ql-picker-options {
    background-color: var(--surface) !important;
    border: 1px solid var(--border) !important;
}

.ql-container.ql-snow {
    background-color: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-top: none !important;
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
    color: var(--text-primary) !important;
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
}

.ql-editor.ql-blank::before {
    color: var(--text-muted) !important;
    font-style: normal !important;
}

/* Shimmer Skeleton Loading */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes ik-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton, .ik-skeleton {
    background: linear-gradient(90deg, var(--surface-elevated) 25%, var(--border) 50%, var(--surface-elevated) 75%);
    background-size: 200% 100%;
    animation: ik-shimmer 1.5s infinite linear;
    border-radius: 8px;
    display: block;
}

.skeleton-avatar {
    border-radius: 9999px !important;
}

.skeleton-pill {
    border-radius: 9999px !important;
}

.skeleton-btn {
    border-radius: 14px !important;
}

/* Global Top Progress / Navigation Shimmer Bar */
#global-page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}
#global-page-loader.active {
    opacity: 1;
}
#global-page-loader .bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: ik-shimmer 1.2s infinite linear;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--ik-border);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--ik-primary);
}

/* Toast Container */
#ik-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.ik-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Navigation Links */
.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: none;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

.dark .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(163, 92, 122, 0.1);
    /* Soft warm rose tint */
    font-weight: 600;
}

/* Buttons */
.btn-primary,
.btn-ik-primary {
    background: var(--primary);
    color: var(--text-on-primary);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dark .btn-primary,
.dark .btn-ik-primary {
    background: var(--primary);
    color: var(--text-on-primary);
}

.btn-primary:hover,
.btn-ik-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    background: var(--primary-hover);
    color: var(--text-on-primary);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: none;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    background: var(--bg-paper);
}

/* Input Fields */
.input-field {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    width: 100%;
    color: var(--text-primary);
    transition: none;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(163, 92, 122, 0.15);
}

.input-field::placeholder {
    color: var(--text-secondary);
}

/* Textarea */
.textarea-field {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    width: 100%;
    color: var(--text-primary);
    resize: vertical;
    min-height: 100px;
    transition: none;
}

.textarea-field:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(163, 92, 122, 0.15);
}

/* Quill Editor Customization */
.ql-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0 0 0.75rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
}

.ql-toolbar {
    background: var(--bg-paper);
    /* Slightly different to distinguish toolbar */
    border: 1px solid var(--card-border);
    border-radius: 0.75rem 0.75rem 0 0;
}

.ql-editor {
    min-height: 300px;
    color: var(--text-primary);
}

.ql-editor.ql-blank::before {
    color: var(--text-secondary);
}

.dark .ql-snow .ql-stroke {
    stroke: #A3A3A3;
}

.dark .ql-snow .ql-fill {
    fill: #A3A3A3;
}

.dark .ql-snow .ql-picker-label {
    color: #A3A3A3;
}

/* Vote Button */
.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: none;
}

.vote-btn:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    transform: scale(1.02);
    /* No gradient background on hover, just elegant text color change */
}

.vote-btn.voted {
    background: rgba(236, 72, 153, 0.1);
    /* Soft Pink Tint */
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

/* Bookmark Button */
.bookmark-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bookmark-btn:hover {
    border-color: #fbbf24;
    color: #fbbf24;
    transform: scale(1.02);
}

.bookmark-btn.bookmarked {
    background: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
    color: #fbbf24;
}

.bookmark-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Relate Button (NEW) */
.relate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.relate-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: scale(1.02);
}

.relate-btn.related {
    background: rgba(163, 92, 122, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.relate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Share Buttons */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    color: white;
}

.share-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}

.share-btn.facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.share-btn.twitter:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
}

/* Comment Card */
.comment-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: none;
    /* Flat inside container */
}

/* Tabs */
.tab-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: none;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

.tab-btn.active {
    color: var(--text-on-primary);
    background: var(--primary);
    /* Solid active state */
}

.dark .tab-btn.active {
    background: var(--primary);
    color: var(--text-on-primary);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    text-decoration: none;
    transition: none;
}

.pagination a:hover {
    background: var(--text-primary);
    color: var(--bg-paper);
    border-color: var(--text-primary);
}

.pagination .active {
    background: var(--text-primary);
    color: var(--bg-paper);
    border-color: var(--text-primary);
    font-weight: bold;
}

.dark .pagination a:hover,
.dark .pagination .active {
    background: #EAEAEA;
    color: #1A1918;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #DCFCE7;
    border: 1px solid #86EFAC;
    color: #14532D;
}

.dark .alert-success {
    background: #064E3B;
    border-color: #065F46;
    color: #A7F3D0;
}

.alert-error {
    background: #FEE2E2;
    border: 1px solid #FCA5A5;
    color: #7F1D1D;
}

.dark .alert-error {
    background: #7F1D1D;
    border-color: #991B1B;
    color: #FECACA;
}

.alert-info {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1E3A8A;
}

.dark .alert-info {
    background: #1E3A8A;
    border-color: #1E40AF;
    color: #BFDBFE;
}

/* Loading Spinner */
.spinner {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--text-primary);
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Smooth Animations */
.fade-in {
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Typography */
@media (max-width: 768px) {
    .story-card {
        padding: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Story Content Styling */
.story-content {
    color: var(--text-primary);
    line-height: 1.9;
    /* Improved readability for Editorial */
    font-family: 'Georgia', serif;
    /* Serif for reading content */
    font-size: 1.125rem;
}

.story-content p {
    margin-bottom: 1.5rem;
}

.story-content h1,
.story-content h2,
.story-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

.story-content ul,
.story-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.story-content blockquote {
    border-left: 3px solid var(--accent-primary);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.02);
    /* Very subtle background for quotes */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.story-content a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.story-content a:hover {
    color: var(--accent-secondary);
}

/* Category Pills */
.category-pill {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--card-border);
    transition: none;
    cursor: pointer;
}

.category-pill:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    transform: translateY(-1px);
}

.category-pill.active {
    color: var(--text-on-primary);
    background: var(--primary);
    border-color: var(--primary);
}

.dark .category-pill.active {
    background: var(--primary);
    color: var(--text-on-primary);
    border-color: var(--primary);
}

/* Category Badge (for story cards) */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark .category-badge {
    background: #374151;
    border-color: #4B5563;
    color: #D1D5DB;
}

/* Line Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CAPTCHA Widgets (Turnstile & hCaptcha) */
.cf-turnstile,
.h-captcha {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 65px !important;
    width: 300px !important;
    margin: 0 auto;
}

.cf-turnstile iframe,
.h-captcha iframe {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    border: none !important;
}

/* Text Gradients override (just in case) - Commented out to support premium modern HSL gradients */
/*
.bg-clip-text {
    background-image: none !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}
*/