/* ============================================================
   FLAVOR PLATFORM - World-Class Design System v2.0
   Inspired by note.com with cutting-edge glassmorphism,
   micro-interactions, and premium typography
   ============================================================ */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    /* Colors - Sophisticated palette */
    --fp-bg: #ffffff;
    --fp-bg-secondary: #f8f9fb;
    --fp-bg-tertiary: #f1f3f7;
    --fp-bg-warm: #faf9f7;
    --fp-surface: #ffffff;
    --fp-surface-hover: #f8f9fb;
    --fp-text: #1a1a2e;
    --fp-text-secondary: #5f6c7b;
    --fp-text-tertiary: #9ca3af;
    --fp-text-inverse: #ffffff;
    --fp-primary: #2563eb;
    --fp-primary-light: #dbeafe;
    --fp-primary-lighter: #eff6ff;
    --fp-primary-dark: #1d4ed8;
    --fp-primary-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --fp-accent: #7c3aed;
    --fp-accent-light: #ede9fe;
    --fp-success: #059669;
    --fp-success-light: #d1fae5;
    --fp-warning: #d97706;
    --fp-warning-light: #fef3c7;
    --fp-danger: #dc2626;
    --fp-danger-light: #fee2e2;
    --fp-border: #e5e7eb;
    --fp-border-light: #f3f4f6;
    --fp-border-focus: #2563eb;

    /* Shadows - Layered depth */
    --fp-shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
    --fp-shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --fp-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
    --fp-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -4px rgba(0,0,0,0.04);
    --fp-shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.03);
    --fp-shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.15);
    --fp-shadow-inner: inset 0 2px 4px rgba(0,0,0,0.04);
    --fp-shadow-glow: 0 0 20px rgba(37,99,235,0.15);
    --fp-shadow-card-hover: 0 8px 30px rgba(0,0,0,0.08);

    /* Radii */
    --fp-radius-sm: 8px;
    --fp-radius: 12px;
    --fp-radius-lg: 16px;
    --fp-radius-xl: 20px;
    --fp-radius-2xl: 24px;
    --fp-radius-full: 9999px;

    /* Transitions */
    --fp-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --fp-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --fp-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --fp-transition: all 0.2s var(--fp-ease);
    --fp-transition-slow: all 0.35s var(--fp-ease);
    --fp-transition-spring: all 0.4s var(--fp-ease-spring);

    /* Typography */
    --fp-font: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fp-font-heading: 'Inter', 'Noto Sans JP', -apple-system, sans-serif;
    --fp-font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Layout */
    --fp-max-width: 1280px;
    --fp-content-width: 720px;
    --fp-sidebar-width: 240px;
    --fp-header-height: 72px;
    --fp-gap: 24px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'palt' 1;
}

body.fp-app {
    font-family: var(--fp-font) !important;
    color: var(--fp-text) !important;
    background: var(--fp-bg) !important;
    background-color: #ffffff !important;
    line-height: 1.75 !important;
    overflow-x: hidden;
    min-height: 100vh;
    font-size: 15px !important;
    letter-spacing: 0.01em;
    margin: 0 !important;
    padding: 0 !important;
}

body.fp-app .fp-main {
    background: var(--fp-bg) !important;
}

a { color: inherit; text-decoration: none; transition: var(--fp-transition); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

::selection {
    background: var(--fp-primary-light);
    color: var(--fp-primary-dark);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ============================================================
   HEADER - Glassmorphism
   ============================================================ */
.fp-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--fp-header-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    z-index: 1000;
    transition: var(--fp-transition-slow);
}

.fp-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.fp-header-inner {
    max-width: var(--fp-max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.fp-header-left {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-shrink: 0;
}

.fp-logo {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    color: var(--fp-text);
    transition: var(--fp-transition);
}

.fp-logo:hover { opacity: 0.8; }

.fp-logo img {
    height: 56px;
    width: auto;
}

.fp-logo-icon {
    height: 30px;
    width: 30px;
    object-fit: contain;
    margin-right: 6px;
    border-radius: 6px;
}

.fp-logo-text {
    background: var(--fp-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fp-logo-full {
    height: 56px;
    width: auto;
    object-fit: contain;
}

.fp-nav-main {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fp-nav-link {
    padding: 6px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--fp-text-secondary);
    border-radius: var(--fp-radius-full);
    transition: var(--fp-transition);
    white-space: nowrap;
    position: relative;
}

.fp-nav-link:hover {
    color: var(--fp-text);
    background: var(--fp-bg-tertiary);
}

.fp-nav-link.active {
    color: var(--fp-text);
    background: var(--fp-bg-tertiary);
    font-weight: 600;
}

/* Header Center - Search */
.fp-header-center {
    flex: 1;
    max-width: 480px;
    margin: 0 auto;
}

.fp-search-bar {
    position: relative;
    width: 100%;
}

.fp-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fp-text-tertiary);
    pointer-events: none;
    transition: var(--fp-transition);
}

.fp-search-bar input {
    width: 100%;
    padding: 9px 16px 9px 42px;
    background: var(--fp-bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--fp-radius-full);
    font-size: 0.875rem;
    color: var(--fp-text);
    outline: none;
    transition: var(--fp-transition);
}

.fp-search-bar input::placeholder {
    color: var(--fp-text-tertiary);
}

.fp-search-bar input:focus {
    background: var(--fp-bg);
    border-color: var(--fp-primary);
    box-shadow: var(--fp-shadow-glow);
}

.fp-search-bar input:focus + .fp-search-icon,
.fp-search-bar input:focus ~ .fp-search-icon {
    color: var(--fp-primary);
}

.fp-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    box-shadow: var(--fp-shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
    animation: fpSlideDown 0.2s var(--fp-ease);
}

.fp-search-dropdown a {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--fp-border-light);
    transition: var(--fp-transition);
}

.fp-search-dropdown a:hover {
    background: var(--fp-bg-secondary);
}

.fp-search-dropdown a:last-child {
    border-bottom: none;
}

/* Header Right */
.fp-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.fp-btn-write {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--fp-primary-gradient);
    color: white;
    border-radius: var(--fp-radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--fp-transition);
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
    white-space: nowrap;
}

.fp-btn-write:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37,99,235,0.35);
}

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

.fp-btn-write svg {
    width: 16px;
    height: 16px;
}

.fp-btn-login {
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--fp-text-secondary);
    border-radius: var(--fp-radius-full);
    transition: var(--fp-transition);
}

.fp-btn-login:hover {
    color: var(--fp-text);
    background: var(--fp-bg-tertiary);
}

.fp-btn-signup {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: var(--fp-text);
    color: var(--fp-text-inverse);
    border-radius: var(--fp-radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--fp-transition);
}

.fp-btn-signup:hover {
    background: #374151;
    transform: translateY(-1px);
}

/* Notification Bell */
.fp-notification-bell {
    position: relative;
    padding: 8px;
    border-radius: var(--fp-radius-full);
    cursor: pointer;
    transition: var(--fp-transition);
    color: var(--fp-text-secondary);
}

.fp-notification-bell:hover {
    background: var(--fp-bg-tertiary);
    color: var(--fp-text);
}

.fp-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--fp-danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: var(--fp-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: fpPulse 2s infinite;
}

/* User Menu */
.fp-user-menu {
    position: relative;
}

.fp-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--fp-radius-full);
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--fp-transition);
    cursor: pointer;
    padding: 0;
}

.fp-avatar-btn:hover {
    border-color: var(--fp-primary-light);
}

.fp-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--fp-radius-full);
}

.fp-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    box-shadow: var(--fp-shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: var(--fp-transition);
    z-index: 1002;
    padding: 6px;
}

.fp-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.fp-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.875rem;
    color: var(--fp-text-secondary);
    border-radius: var(--fp-radius-sm);
    transition: var(--fp-transition);
}

.fp-dropdown-item:hover {
    background: var(--fp-bg-secondary);
    color: var(--fp-text);
}

.fp-dropdown-item svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.fp-dropdown-divider {
    height: 1px;
    background: var(--fp-border-light);
    margin: 4px 0;
}

/* Mobile Toggle */
.fp-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
}

.fp-mobile-toggle span {
    width: 20px;
    height: 2px;
    background: var(--fp-text);
    border-radius: 1px;
    transition: var(--fp-transition);
}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.fp-reading-progress-bar,
.fp-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--fp-primary-gradient);
    z-index: 1001;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.fp-main {
    min-height: calc(100vh - var(--fp-header-height) - 200px);
    padding-top: var(--fp-header-height);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.fp-hero {
    position: relative;
    padding: 80px 24px 60px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, var(--fp-bg-secondary) 0%, var(--fp-bg) 100%);
}

.fp-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(37,99,235,0.04) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(124,58,237,0.03) 0%, transparent 50%);
    animation: fpFloat 20s ease-in-out infinite;
    pointer-events: none;
}

.fp-hero-title {
    font-family: var(--fp-font-heading);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.fp-hero-title .fp-gradient-text {
    background: var(--fp-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fp-hero-subtitle {
    font-size: 1.05rem;
    color: var(--fp-text-secondary);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.fp-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.fp-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--fp-radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--fp-transition);
}

.fp-hero-btn.primary {
    background: var(--fp-primary-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}

.fp-hero-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

.fp-hero-btn.secondary {
    background: var(--fp-surface);
    color: var(--fp-text);
    border: 1px solid var(--fp-border);
}

.fp-hero-btn.secondary:hover {
    background: var(--fp-bg-secondary);
    border-color: var(--fp-text-tertiary);
}

/* ============================================================
   HOME LAYOUT - note.com style with sidebar
   ============================================================ */
.fp-home-layout {
    max-width: var(--fp-max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr var(--fp-sidebar-width);
    gap: 40px;
    align-items: start;
}

/* Sidebar */
.fp-sidebar {
    position: sticky;
    top: calc(var(--fp-header-height) + 24px);
    padding: 24px 0;
}

.fp-sidebar-section {
    margin-bottom: 28px;
}

.fp-sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fp-text-tertiary);
    padding: 0 12px;
    margin-bottom: 8px;
}

.fp-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fp-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--fp-text-secondary);
    border-radius: var(--fp-radius-sm);
    transition: var(--fp-transition);
}

.fp-sidebar-link:hover {
    background: var(--fp-bg-secondary);
    color: var(--fp-text);
}

.fp-sidebar-link.active {
    background: var(--fp-primary-lighter);
    color: var(--fp-primary);
    font-weight: 600;
}

.fp-sidebar-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

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

/* ============================================================
   CONTENT FEED
   ============================================================ */
.fp-feed {
    padding: 24px 0 60px;
}

.fp-feed-section {
    margin-bottom: 48px;
}

.fp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--fp-border-light);
}

.fp-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fp-text);
    letter-spacing: -0.01em;
}

.fp-section-more {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--fp-primary);
    transition: var(--fp-transition);
}

.fp-section-more:hover {
    opacity: 0.7;
}

/* ============================================================
   ARTICLE CARDS - Premium Grid
   ============================================================ */
.fp-article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.fp-article-card {
    background: var(--fp-surface);
    border-radius: var(--fp-radius-lg);
    overflow: hidden;
    transition: var(--fp-transition-slow);
    border: 1px solid var(--fp-border-light);
    position: relative;
}

.fp-article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fp-shadow-card-hover);
    border-color: transparent;
}

.fp-card-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--fp-bg-tertiary);
}

.fp-card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--fp-ease);
}

.fp-article-card:hover .fp-card-thumbnail img {
    transform: scale(1.05);
}

.fp-card-thumbnail .fp-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--fp-radius-full);
    letter-spacing: 0.02em;
}

.fp-card-badge.paid {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.fp-card-body {
    padding: 16px;
}

.fp-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--fp-text);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.fp-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fp-card-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--fp-radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.fp-card-author-info {
    flex: 1;
    min-width: 0;
}

.fp-card-author-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--fp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fp-card-date {
    font-size: 0.7rem;
    color: var(--fp-text-tertiary);
}

.fp-card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--fp-border-light);
}

.fp-card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--fp-text-tertiary);
}

.fp-card-stat svg {
    width: 14px;
    height: 14px;
}

.fp-card-price {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--fp-primary);
}

/* Horizontal Card */
.fp-article-card-h {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--fp-surface);
    border-radius: var(--fp-radius);
    border: 1px solid var(--fp-border-light);
    transition: var(--fp-transition);
}

.fp-article-card-h:hover {
    background: var(--fp-surface-hover);
    border-color: var(--fp-border);
}

.fp-article-card-h .fp-card-thumbnail {
    width: 120px;
    min-width: 120px;
    padding-top: 0;
    height: 80px;
    border-radius: var(--fp-radius-sm);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.fp-empty-state {
    text-align: center;
    padding: 80px 24px;
}

.fp-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--fp-bg-tertiary);
    border-radius: var(--fp-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fp-text-tertiary);
}

.fp-empty-icon svg {
    width: 36px;
    height: 36px;
}

.fp-empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--fp-text);
    margin-bottom: 8px;
}

.fp-empty-desc {
    font-size: 0.9rem;
    color: var(--fp-text-tertiary);
    margin-bottom: 24px;
}

.fp-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--fp-primary-gradient);
    color: white;
    border-radius: var(--fp-radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--fp-transition);
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

.fp-empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37,99,235,0.35);
}

/* ============================================================
   SINGLE ARTICLE
   ============================================================ */
.fp-article-container {
    max-width: var(--fp-content-width);
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.fp-article-cover {
    width: 100%;
    border-radius: var(--fp-radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
    aspect-ratio: 16/9;
}

.fp-article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fp-article-header {
    margin-bottom: 32px;
}

.fp-article-title {
    font-family: var(--fp-font-heading);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--fp-text);
    margin-bottom: 20px;
}

.fp-article-author-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--fp-border-light);
    border-bottom: 1px solid var(--fp-border-light);
}

.fp-article-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--fp-radius-full);
    object-fit: cover;
}

.fp-article-author-info {
    flex: 1;
}

.fp-article-author-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--fp-text);
}

.fp-article-author-name:hover {
    color: var(--fp-primary);
}

.fp-article-date {
    font-size: 0.8rem;
    color: var(--fp-text-tertiary);
}

.fp-follow-btn {
    padding: 7px 20px;
    border-radius: var(--fp-radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--fp-transition);
    border: 1.5px solid var(--fp-primary);
    color: var(--fp-primary);
    background: transparent;
}

.fp-follow-btn:hover {
    background: var(--fp-primary);
    color: white;
}

.fp-follow-btn.following {
    background: var(--fp-bg-tertiary);
    border-color: var(--fp-border);
    color: var(--fp-text-secondary);
}

/* Article Content */
.fp-article-content {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--fp-text);
    word-break: break-word;
}

.fp-article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 48px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--fp-bg-tertiary);
    letter-spacing: -0.01em;
}

.fp-article-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 36px 0 12px;
    letter-spacing: -0.01em;
}

.fp-article-content p {
    margin-bottom: 24px;
}

.fp-article-content blockquote {
    border-left: 3px solid var(--fp-primary);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--fp-primary-lighter);
    border-radius: 0 var(--fp-radius-sm) var(--fp-radius-sm) 0;
    color: var(--fp-text-secondary);
    font-style: italic;
}

.fp-article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: var(--fp-radius);
    overflow-x: auto;
    font-family: var(--fp-font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    margin: 24px 0;
}

.fp-article-content code {
    background: var(--fp-bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--fp-font-mono);
    font-size: 0.875em;
}

.fp-article-content pre code {
    background: none;
    padding: 0;
}

.fp-article-content img {
    border-radius: var(--fp-radius);
    margin: 24px 0;
}

.fp-article-content ul, .fp-article-content ol {
    padding-left: 24px;
    margin-bottom: 24px;
}

.fp-article-content li {
    margin-bottom: 8px;
}

/* Paywall */
.fp-paywall {
    position: relative;
    margin: 40px -24px;
    padding: 48px 24px;
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, var(--fp-bg-secondary) 30%);
}

.fp-paywall::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, transparent, var(--fp-bg));
    pointer-events: none;
}

.fp-paywall-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.fp-paywall-desc {
    font-size: 0.9rem;
    color: var(--fp-text-secondary);
    margin-bottom: 20px;
}

.fp-paywall-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--fp-primary);
    margin-bottom: 20px;
}

.fp-paywall-price small {
    font-size: 0.5em;
    font-weight: 500;
    color: var(--fp-text-tertiary);
}

.fp-purchase-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: var(--fp-primary-gradient);
    color: white;
    border-radius: var(--fp-radius-full);
    font-size: 1rem;
    font-weight: 700;
    transition: var(--fp-transition);
    box-shadow: 0 4px 14px rgba(37,99,235,0.3);
    border: none;
    cursor: pointer;
}

.fp-purchase-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

/* Article Actions */
.fp-article-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 32px 0;
    margin: 32px 0;
    border-top: 1px solid var(--fp-border-light);
    border-bottom: 1px solid var(--fp-border-light);
}

.fp-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: var(--fp-radius);
    transition: var(--fp-transition);
    cursor: pointer;
    color: var(--fp-text-secondary);
    border: none;
    background: none;
}

.fp-action-btn:hover {
    background: var(--fp-bg-secondary);
    color: var(--fp-text);
}

.fp-action-btn.liked {
    color: var(--fp-danger);
}

.fp-action-btn svg {
    width: 24px;
    height: 24px;
}

.fp-action-btn span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Support Button */
.fp-support-section {
    text-align: center;
    padding: 40px;
    background: var(--fp-bg-secondary);
    border-radius: var(--fp-radius-xl);
    margin: 40px 0;
}

.fp-support-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.fp-support-desc {
    font-size: 0.85rem;
    color: var(--fp-text-secondary);
    margin-bottom: 20px;
}

.fp-support-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    border-radius: var(--fp-radius-full);
    font-weight: 600;
    transition: var(--fp-transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(245,158,11,0.3);
}

.fp-support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245,158,11,0.4);
}

.fp-support-amount {
    padding: 10px 20px;
    border: 2px solid var(--fp-border);
    border-radius: var(--fp-radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--fp-transition);
    cursor: pointer;
    background: var(--fp-surface);
}

.fp-support-amount:hover {
    border-color: var(--fp-primary);
    color: var(--fp-primary);
}

.fp-support-amount.selected {
    border-color: var(--fp-primary);
    background: var(--fp-primary-lighter);
    color: var(--fp-primary);
}

/* Comments */
.fp-comments-section {
    margin-top: 48px;
    max-width: var(--fp-content-width);
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
}

.fp-comments-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--fp-bg-tertiary);
}

.fp-comment-form {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.fp-comment-form textarea {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--fp-border);
    border-radius: var(--fp-radius);
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: var(--fp-transition);
    font-size: 0.9rem;
    line-height: 1.6;
}

.fp-comment-form textarea:focus {
    border-color: var(--fp-primary);
    box-shadow: var(--fp-shadow-glow);
}

.fp-comment-submit {
    align-self: flex-end;
    padding: 10px 20px;
    background: var(--fp-primary);
    color: white;
    border-radius: var(--fp-radius);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--fp-transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.fp-comment-submit:hover {
    background: var(--fp-primary-dark);
}

.fp-comment {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--fp-border-light);
}

.fp-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--fp-radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.fp-comment-body {
    flex: 1;
}

.fp-comment-author {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.fp-comment-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--fp-text);
}

.fp-comment-time {
    font-size: 0.75rem;
    color: var(--fp-text-tertiary);
    margin-top: 6px;
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.fp-auth-container {
    max-width: 420px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.fp-auth-card {
    background: var(--fp-surface);
    border: 1px solid var(--fp-border-light);
    border-radius: var(--fp-radius-xl);
    padding: 40px;
    box-shadow: var(--fp-shadow-lg);
}

.fp-auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.fp-auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.fp-auth-subtitle {
    font-size: 0.9rem;
    color: var(--fp-text-secondary);
}

.fp-auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fp-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fp-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fp-text-secondary);
}

.fp-form-input {
    padding: 12px 16px;
    border: 2px solid var(--fp-border);
    border-radius: var(--fp-radius);
    font-size: 0.95rem;
    outline: none;
    transition: var(--fp-transition);
    background: var(--fp-bg);
}

.fp-form-input:focus {
    border-color: var(--fp-primary);
    box-shadow: var(--fp-shadow-glow);
}

.fp-form-input::placeholder {
    color: var(--fp-text-tertiary);
}

.fp-auth-submit {
    width: 100%;
    padding: 13px;
    background: var(--fp-primary-gradient);
    color: white;
    border: none;
    border-radius: var(--fp-radius);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--fp-transition);
    margin-top: 4px;
}

.fp-auth-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.fp-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.fp-auth-error {
    padding: 12px 16px;
    background: var(--fp-danger-light);
    color: var(--fp-danger);
    border-radius: var(--fp-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    display: none;
}

.fp-auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--fp-text-secondary);
}

.fp-auth-footer a {
    color: var(--fp-primary);
    font-weight: 600;
}

.fp-auth-footer a:hover {
    text-decoration: underline;
}

.fp-auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--fp-text-secondary);
}

.fp-auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--fp-primary);
}

/* ============================================================
   EDITOR
   ============================================================ */
.fp-editor-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.fp-editor-cover-area {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--fp-bg-tertiary);
    border-radius: var(--fp-radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
    cursor: pointer;
    transition: var(--fp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--fp-border);
}

.fp-editor-cover-area:hover {
    border-color: var(--fp-primary);
    background: var(--fp-primary-lighter);
}

.fp-editor-cover-area img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fp-cover-placeholder {
    text-align: center;
    color: var(--fp-text-tertiary);
}

.fp-cover-placeholder svg {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.fp-cover-placeholder p {
    font-size: 0.85rem;
}

.fp-editor-title-input {
    width: 100%;
    border: none;
    outline: none;
    font-family: var(--fp-font-heading);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--fp-text);
    margin-bottom: 24px;
    resize: none;
    background: transparent;
}

.fp-editor-title-input::placeholder {
    color: var(--fp-text-tertiary);
}

/* Editor Toolbar */
.fp-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    margin-bottom: 16px;
    flex-wrap: wrap;
    position: sticky;
    top: calc(var(--fp-header-height) + 8px);
    z-index: 10;
    box-shadow: var(--fp-shadow-sm);
}

.fp-toolbar-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--fp-radius-sm);
    transition: var(--fp-transition);
    color: var(--fp-text-secondary);
}

.fp-toolbar-btn:hover {
    background: var(--fp-bg-tertiary);
    color: var(--fp-text);
}

.fp-toolbar-btn.active {
    background: var(--fp-primary-lighter);
    color: var(--fp-primary);
}

.fp-toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--fp-border);
    margin: 0 4px;
}

/* Editor Content Area */
.fp-editor-content {
    min-height: 400px;
    padding: 20px 0;
    font-size: 1.05rem;
    line-height: 2;
    outline: none;
    color: var(--fp-text);
}

.fp-editor-content:empty::before {
    content: '本文を書く...';
    color: var(--fp-text-tertiary);
    pointer-events: none;
}

/* Editor Settings Panel */
.fp-editor-settings {
    position: fixed;
    right: 0;
    top: var(--fp-header-height);
    bottom: 0;
    width: 340px;
    background: var(--fp-surface);
    border-left: 1px solid var(--fp-border);
    padding: 24px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: var(--fp-transition-slow);
    z-index: 100;
    box-shadow: -4px 0 20px rgba(0,0,0,0.05);
}

.fp-editor-settings.open {
    transform: translateX(0);
}

.fp-settings-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--fp-border-light);
}

.fp-settings-group {
    margin-bottom: 20px;
}

.fp-settings-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fp-text-secondary);
    margin-bottom: 8px;
    display: block;
}

.fp-settings-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--fp-border);
    border-radius: var(--fp-radius-sm);
    font-size: 0.875rem;
    outline: none;
    transition: var(--fp-transition);
}

.fp-settings-input:focus {
    border-color: var(--fp-primary);
}

.fp-settings-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--fp-border);
    border-radius: var(--fp-radius-sm);
    font-size: 0.875rem;
    outline: none;
    background: var(--fp-bg);
    transition: var(--fp-transition);
    appearance: none;
    cursor: pointer;
}

.fp-settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.fp-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--fp-border);
    border-radius: var(--fp-radius-full);
    cursor: pointer;
    transition: var(--fp-transition);
}

.fp-toggle-switch.active {
    background: var(--fp-primary);
}

.fp-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: var(--fp-radius-full);
    transition: var(--fp-transition-spring);
    box-shadow: var(--fp-shadow-sm);
}

.fp-toggle-switch.active::after {
    left: 22px;
}

/* Publish Button */
.fp-publish-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--fp-primary-gradient);
    color: white;
    border: none;
    border-radius: var(--fp-radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--fp-transition);
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

.fp-publish-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37,99,235,0.35);
}

.fp-publish-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.fp-draft-btn {
    padding: 12px 24px;
    border: 1.5px solid var(--fp-border);
    border-radius: var(--fp-radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fp-text-secondary);
    cursor: pointer;
    transition: var(--fp-transition);
    background: transparent;
}

.fp-draft-btn:hover {
    border-color: var(--fp-text-tertiary);
    color: var(--fp-text);
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.fp-profile-container {
    max-width: var(--fp-max-width);
    margin: 0 auto;
}

.fp-profile-cover {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

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

.fp-profile-info {
    max-width: 800px;
    margin: -50px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.fp-profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: var(--fp-radius-full);
    border: 4px solid var(--fp-bg);
    object-fit: cover;
    box-shadow: var(--fp-shadow-lg);
    margin-bottom: 16px;
}

.fp-profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.fp-profile-username {
    font-size: 0.9rem;
    color: var(--fp-text-tertiary);
    margin-bottom: 12px;
}

.fp-profile-bio {
    font-size: 0.95rem;
    color: var(--fp-text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
    max-width: 560px;
}

.fp-profile-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.fp-profile-stat {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.fp-profile-stat-num {
    font-size: 1.1rem;
    font-weight: 700;
}

.fp-profile-stat-label {
    font-size: 0.8rem;
    color: var(--fp-text-tertiary);
}

.fp-profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--fp-border);
    margin-top: 32px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
}

.fp-profile-tab {
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--fp-text-secondary);
    border-bottom: 2px solid transparent;
    transition: var(--fp-transition);
    cursor: pointer;
}

.fp-profile-tab:hover {
    color: var(--fp-text);
}

.fp-profile-tab.active {
    color: var(--fp-text);
    font-weight: 600;
    border-bottom-color: var(--fp-text);
}

.fp-profile-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

/* ============================================================
   EXPLORE PAGE
   ============================================================ */
.fp-explore-container {
    max-width: var(--fp-max-width);
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.fp-explore-header {
    margin-bottom: 32px;
}

.fp-explore-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.fp-explore-desc {
    font-size: 0.95rem;
    color: var(--fp-text-secondary);
}

.fp-category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.fp-category-tabs::-webkit-scrollbar { display: none; }

.fp-category-tab {
    padding: 8px 18px;
    border-radius: var(--fp-radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--fp-text-secondary);
    background: var(--fp-bg-secondary);
    white-space: nowrap;
    transition: var(--fp-transition);
    cursor: pointer;
    border: none;
}

.fp-category-tab:hover {
    background: var(--fp-bg-tertiary);
    color: var(--fp-text);
}

.fp-category-tab.active {
    background: var(--fp-text);
    color: var(--fp-text-inverse);
}

/* ============================================================
   USER DASHBOARD
   ============================================================ */
.fp-dashboard-container {
    max-width: var(--fp-max-width);
    margin: 0 auto;
    padding: 32px 24px 80px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
}

.fp-dashboard-sidebar {
    position: sticky;
    top: calc(var(--fp-header-height) + 24px);
}

.fp-dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fp-dashboard-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--fp-text-secondary);
    border-radius: var(--fp-radius-sm);
    transition: var(--fp-transition);
}

.fp-dashboard-link:hover {
    background: var(--fp-bg-secondary);
    color: var(--fp-text);
}

.fp-dashboard-link.active {
    background: var(--fp-primary-lighter);
    color: var(--fp-primary);
    font-weight: 600;
}

.fp-dashboard-link svg {
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

.fp-dashboard-link.active svg {
    opacity: 1;
}

.fp-dashboard-content {
    min-width: 0;
}

.fp-dashboard-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

/* Dashboard Stats Cards */
.fp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.fp-stat-card {
    background: var(--fp-surface);
    border: 1px solid var(--fp-border-light);
    border-radius: var(--fp-radius);
    padding: 20px;
    transition: var(--fp-transition);
}

.fp-stat-card:hover {
    border-color: var(--fp-border);
    box-shadow: var(--fp-shadow-sm);
}

.fp-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fp-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.fp-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--fp-text);
    letter-spacing: -0.02em;
}

.fp-stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
}

.fp-stat-change.up { color: var(--fp-success); }
.fp-stat-change.down { color: var(--fp-danger); }

/* Dashboard Table */
.fp-table-container {
    background: var(--fp-surface);
    border: 1px solid var(--fp-border-light);
    border-radius: var(--fp-radius);
    overflow: hidden;
}

.fp-table {
    width: 100%;
    border-collapse: collapse;
}

.fp-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fp-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--fp-bg-secondary);
    border-bottom: 1px solid var(--fp-border);
}

.fp-table td {
    padding: 14px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--fp-border-light);
    color: var(--fp-text);
}

.fp-table tr:last-child td {
    border-bottom: none;
}

.fp-table tr:hover td {
    background: var(--fp-surface-hover);
}

/* ============================================================
   USER SETTINGS
   ============================================================ */
.fp-settings-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.fp-settings-section {
    background: var(--fp-surface);
    border: 1px solid var(--fp-border-light);
    border-radius: var(--fp-radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.fp-settings-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--fp-border-light);
}

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.fp-notifications-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.fp-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-radius: var(--fp-radius);
    transition: var(--fp-transition);
    border-bottom: 1px solid var(--fp-border-light);
}

.fp-notification-item:hover {
    background: var(--fp-surface-hover);
}

.fp-notification-item.unread {
    background: var(--fp-primary-lighter);
}

.fp-notification-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--fp-radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.fp-notification-body {
    flex: 1;
}

.fp-notification-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--fp-text);
}

.fp-notification-text strong {
    font-weight: 600;
}

.fp-notification-time {
    font-size: 0.75rem;
    color: var(--fp-text-tertiary);
    margin-top: 4px;
}

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.fp-legal-container {
    max-width: var(--fp-content-width);
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.fp-legal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.fp-legal-date {
    font-size: 0.85rem;
    color: var(--fp-text-tertiary);
    margin-bottom: 32px;
}

.fp-legal-content {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--fp-text-secondary);
}

.fp-legal-content h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--fp-text);
    margin: 32px 0 12px;
}

.fp-legal-content p {
    margin-bottom: 16px;
}

/* ============================================================
   MAGAZINE
   ============================================================ */
.fp-magazine-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.fp-magazine-header {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--fp-border-light);
}

.fp-magazine-cover {
    width: 200px;
    height: 200px;
    border-radius: var(--fp-radius-lg);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--fp-bg-tertiary);
}

.fp-magazine-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fp-magazine-info {
    flex: 1;
}

.fp-magazine-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.fp-magazine-desc {
    font-size: 0.95rem;
    color: var(--fp-text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.fp-magazine-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--fp-text-tertiary);
    margin-bottom: 20px;
}

.fp-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--fp-primary-gradient);
    color: white;
    border-radius: var(--fp-radius-full);
    font-weight: 700;
    transition: var(--fp-transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

.fp-subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37,99,235,0.35);
}

/* ============================================================
   MODAL
   ============================================================ */
.fp-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--fp-transition);
}

.fp-modal.open {
    opacity: 1;
    visibility: visible;
}

.fp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--fp-transition);
}

.fp-modal-overlay.open {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
}

.fp-modal-content {
    position: relative;
    background: var(--fp-surface);
    border-radius: var(--fp-radius-xl);
    padding: 32px;
    max-width: 440px;
    width: calc(100% - 48px);
    box-shadow: var(--fp-shadow-2xl);
    transform: scale(0.95) translateY(10px);
    transition: var(--fp-transition-spring);
}

.fp-modal.open .fp-modal-content {
    transform: scale(1) translateY(0);
}

/* ============================================================
   TOAST
   ============================================================ */
.fp-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fp-toast {
    padding: 14px 20px;
    background: var(--fp-text);
    color: var(--fp-text-inverse);
    border-radius: var(--fp-radius);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--fp-shadow-xl);
    animation: fpSlideInRight 0.3s var(--fp-ease-spring);
    transition: var(--fp-transition);
    max-width: 360px;
}

.fp-toast.success {
    background: var(--fp-success);
}

.fp-toast.error {
    background: var(--fp-danger);
}

.fp-toast.warning {
    background: var(--fp-warning);
}

/* ============================================================
   CONFETTI
   ============================================================ */
.fp-confetti-piece {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 4000;
    animation: fpConfetti 1.5s ease-out forwards;
}

/* ============================================================
   FOOTER
   ============================================================ */
.fp-footer {
    background: var(--fp-bg-secondary);
    border-top: 1px solid var(--fp-border-light);
    padding: 40px 24px;
}

.fp-footer-inner {
    max-width: var(--fp-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fp-footer-links {
    display: flex;
    gap: 24px;
}

.fp-footer-links a {
    font-size: 0.8rem;
    color: var(--fp-text-tertiary);
    transition: var(--fp-transition);
}

.fp-footer-links a:hover {
    color: var(--fp-text-secondary);
}

.fp-footer-copy {
    font-size: 0.75rem;
    color: var(--fp-text-tertiary);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fpSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fpSlideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

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

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

@keyframes fpFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -20px) rotate(1deg); }
    66% { transform: translate(-10px, 10px) rotate(-1deg); }
}

@keyframes fpPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes fpConfetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-400px) rotate(720deg); opacity: 0; }
}

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

/* Scroll Reveal */
.fp-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--fp-ease), transform 0.6s var(--fp-ease);
}

.fp-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Press effect */
.fp-press {
    transition: var(--fp-transition);
}

.fp-press:active {
    transform: scale(0.97);
}

/* Skeleton Loading */
.fp-skeleton {
    background: linear-gradient(90deg, var(--fp-bg-tertiary) 25%, var(--fp-bg-secondary) 50%, var(--fp-bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: fpShimmer 1.5s infinite;
    border-radius: var(--fp-radius-sm);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .fp-home-layout {
        grid-template-columns: 1fr;
    }

    .fp-sidebar {
        display: none;
    }

    .fp-dashboard-container {
        grid-template-columns: 1fr;
    }

    .fp-dashboard-sidebar {
        position: static;
    }

    .fp-dashboard-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 4px;
        padding-bottom: 4px;
    }

    .fp-dashboard-link {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    :root {
        --fp-header-height: 56px;
        --fp-gap: 16px;
    }

    .fp-header-inner {
        padding: 0 16px;
    }

    .fp-header-center {
        display: none;
    }

    .fp-nav-main {
        display: none;
    }

    .fp-nav-main.mobile-open {
        display: flex;
        position: absolute;
        top: var(--fp-header-height);
        left: 0;
        right: 0;
        background: var(--fp-surface);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--fp-border);
        box-shadow: var(--fp-shadow-lg);
    }

    .fp-mobile-toggle {
        display: flex;
    }

    .fp-btn-write span {
        display: none;
    }

    .fp-btn-write {
        padding: 8px 12px;
    }

    .fp-hero {
        padding: 48px 16px 40px;
    }

    .fp-article-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .fp-auth-card {
        padding: 28px 24px;
    }

    .fp-editor-container {
        padding: 16px 16px 60px;
    }

    .fp-editor-title-input {
        font-size: 1.5rem;
    }

    .fp-editor-settings {
        width: 100%;
    }

    .fp-profile-cover {
        height: 180px;
    }

    .fp-profile-avatar-large {
        width: 80px;
        height: 80px;
    }

    .fp-magazine-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .fp-footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .fp-footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .fp-article-actions {
        gap: 16px;
    }

    .fp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .fp-article-grid {
        grid-template-columns: 1fr;
    }

    .fp-stats-grid {
        grid-template-columns: 1fr;
    }

    .fp-hero-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.fp-text-center { text-align: center; }
.fp-text-left { text-align: left; }
.fp-text-right { text-align: right; }
.fp-mt-0 { margin-top: 0; }
.fp-mt-4 { margin-top: 16px; }
.fp-mt-8 { margin-top: 32px; }
.fp-mb-0 { margin-bottom: 0; }
.fp-mb-4 { margin-bottom: 16px; }
.fp-mb-8 { margin-bottom: 32px; }
.fp-flex { display: flex; }
.fp-flex-center { display: flex; align-items: center; justify-content: center; }
.fp-gap-2 { gap: 8px; }
.fp-gap-4 { gap: 16px; }
.fp-hidden { display: none; }
.fp-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Badge */
.fp-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--fp-radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.fp-badge.primary { background: var(--fp-primary-light); color: var(--fp-primary); }
.fp-badge.success { background: var(--fp-success-light); color: var(--fp-success); }
.fp-badge.warning { background: var(--fp-warning-light); color: var(--fp-warning); }
.fp-badge.danger { background: var(--fp-danger-light); color: var(--fp-danger); }

/* Status Dot */
.fp-status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--fp-radius-full);
    display: inline-block;
}

.fp-status-dot.online { background: var(--fp-success); }
.fp-status-dot.offline { background: var(--fp-text-tertiary); }

/* WP Admin Bar Offset */
body.admin-bar .fp-header {
    top: 32px;
}

body.admin-bar .fp-main {
    padding-top: calc(var(--fp-header-height) + 32px);
}

@media (max-width: 782px) {
    body.admin-bar .fp-header {
        top: 46px;
    }
    body.admin-bar .fp-main {
        padding-top: calc(var(--fp-header-height) + 46px);
    }
}

/* Category Chips (explore page) */
.fp-category-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: var(--fp-radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--fp-text-secondary);
    background: var(--fp-bg-secondary);
    white-space: nowrap;
    transition: var(--fp-transition);
    border: 1px solid transparent;
}

.fp-category-chip:hover {
    background: var(--fp-bg-tertiary);
    color: var(--fp-text);
}

.fp-category-chip.active {
    background: var(--fp-text);
    color: var(--fp-text-inverse);
}

/* Dashboard Stats */
.fp-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.fp-dash-stat {
    background: var(--fp-surface);
    border: 1px solid var(--fp-border-light);
    border-radius: var(--fp-radius);
    padding: 20px;
    text-align: center;
    transition: var(--fp-transition);
}

.fp-dash-stat:hover {
    border-color: var(--fp-border);
    box-shadow: var(--fp-shadow-sm);
}

.fp-dash-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--fp-text);
    letter-spacing: -0.02em;
}

.fp-dash-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fp-text-tertiary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Verified & Pro Badges */
.fp-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--fp-primary);
    color: white;
    border-radius: var(--fp-radius-full);
}

.fp-pro-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: var(--fp-radius-full);
    letter-spacing: 0.05em;
}

/* Paywall Button */
.fp-paywall-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: var(--fp-primary-gradient);
    color: white;
    border-radius: var(--fp-radius-full);
    font-size: 1rem;
    font-weight: 700;
    transition: var(--fp-transition);
    box-shadow: 0 4px 14px rgba(37,99,235,0.3);
    border: none;
    cursor: pointer;
}

.fp-paywall-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

.fp-paywall-box { text-align: center; }

/* Stagger Animation */
.fp-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    animation: fpStaggerIn 0.5s var(--fp-ease) forwards;
}

.fp-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.fp-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.fp-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.fp-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.fp-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.fp-stagger > *:nth-child(6) { animation-delay: 0.3s; }
.fp-stagger > *:nth-child(7) { animation-delay: 0.35s; }
.fp-stagger > *:nth-child(8) { animation-delay: 0.4s; }
.fp-stagger > *:nth-child(n+9) { animation-delay: 0.45s; }

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

.fp-page-enter { animation: fpFadeIn 0.4s var(--fp-ease); }
.fp-notif-slide { animation: fpSlideUp 0.3s var(--fp-ease); }

/* Editor Cover Area */
.fp-editor-cover-area {
    position: relative;
    width: 100%;
    aspect-ratio: 16/7;
    max-height: 300px;
    border-radius: var(--fp-radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
    cursor: pointer;
    background: var(--fp-bg-tertiary);
}

.fp-editor-cover-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Comment Form */
.fp-comment-form-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--fp-radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.fp-comment-form-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fp-comment-form-input textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--fp-border);
    border-radius: var(--fp-radius);
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: var(--fp-transition);
    font-size: 0.9rem;
    line-height: 1.6;
}

.fp-comment-form-input textarea:focus {
    border-color: var(--fp-primary);
    box-shadow: var(--fp-shadow-glow);
}

.fp-comment-form-actions {
    display: flex;
    justify-content: flex-end;
}

/* Modal Close */
.fp-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 8px;
    border-radius: var(--fp-radius-sm);
    cursor: pointer;
    background: none;
    border: none;
    color: var(--fp-text-tertiary);
    transition: var(--fp-transition);
}

.fp-modal-close:hover {
    background: var(--fp-bg-tertiary);
    color: var(--fp-text);
}

.fp-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Support Amounts */
.fp-support-amounts {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Search Results */
.fp-search-results-container {
    max-width: var(--fp-content-width);
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.fp-search-results-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.fp-search-results-count {
    font-size: 0.85rem;
    color: var(--fp-text-tertiary);
    margin-bottom: 24px;
}


/* ============================================================
   BOTTOM NAVIGATION BAR - App-like Mobile Navigation
   ============================================================ */
.fp-bottom-nav {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.fp-bottom-nav.hidden {
    transform: translateY(100%);
}

.fp-bottom-nav-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    max-width: 560px;
    margin: 0 auto;
    padding: 6px 4px 4px;
    height: 60px;
}

.fp-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    padding: 4px 0 2px;
    color: var(--fp-text-tertiary);
    text-decoration: none;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease;
}

.fp-bottom-nav-item:hover {
    color: var(--fp-text-secondary);
    text-decoration: none;
}

.fp-bottom-nav-item.active {
    color: var(--fp-primary);
}

.fp-bottom-nav-item.active .fp-bottom-nav-icon svg {
    stroke-width: 2.2;
}

/* Active indicator dot */
.fp-bottom-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--fp-primary);
    animation: fpBottomNavDot 0.3s ease forwards;
}

@keyframes fpBottomNavDot {
    from { transform: translateX(-50%) scale(0); }
    to { transform: translateX(-50%) scale(1); }
}

.fp-bottom-nav-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    transition: transform 0.2s ease;
}

.fp-bottom-nav-item:active .fp-bottom-nav-icon {
    transform: scale(0.85);
}

.fp-bottom-nav-icon svg {
    display: block;
}

.fp-bottom-nav-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1;
}

/* Notification badge on bottom nav */
.fp-bottom-nav-badge {
    position: absolute;
    top: -2px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--fp-danger);
    color: white;
    font-size: 0.55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
    line-height: 1;
}

/* ============================================================
   FAB (Floating Action Button) - Center Create Button
   ============================================================ */
.fp-bottom-nav-fab {
    position: relative;
    flex: 1;
}

.fp-bottom-nav-fab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--fp-primary-gradient);
    color: white;
    margin: 0 auto;
    margin-top: -22px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35),
                0 2px 6px rgba(37, 99, 235, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.fp-bottom-nav-fab-btn::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--fp-primary-gradient);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    filter: blur(8px);
}

.fp-bottom-nav-fab:hover .fp-bottom-nav-fab-btn {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45),
                0 3px 8px rgba(37, 99, 235, 0.25);
}

.fp-bottom-nav-fab:hover .fp-bottom-nav-fab-btn::before {
    opacity: 0.4;
}

.fp-bottom-nav-fab:active .fp-bottom-nav-fab-btn {
    transform: scale(0.95);
}

.fp-bottom-nav-fab .fp-bottom-nav-label {
    margin-top: 2px;
    color: var(--fp-primary);
    font-weight: 700;
}

.fp-bottom-nav-fab svg {
    stroke: white;
}

/* ============================================================
   RESPONSIVE: Show bottom nav on mobile/tablet
   ============================================================ */
@media (max-width: 768px) {
    .fp-bottom-nav {
        display: block;
    }

    /* Add padding to main content and footer so they don't hide behind bottom nav */
    .fp-main {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .fp-footer {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    }

    /* Hide desktop header nav items on mobile since bottom nav replaces them */
    .fp-header-right .fp-btn-write,
    .fp-header-right .fp-notification-bell {
        display: none;
    }

    /* Adjust header to be simpler on mobile */
    .fp-header-right .fp-btn-login,
    .fp-header-right .fp-btn-signup {
        display: none;
    }

    /* Hide mobile hamburger since bottom nav replaces it */
    .fp-mobile-toggle {
        display: none !important;
    }

    /* Hide the mobile-open nav since bottom nav replaces it */
    .fp-nav-main.mobile-open {
        display: none !important;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .fp-bottom-nav-inner {
        padding: 6px 0 4px;
    }

    .fp-bottom-nav-label {
        font-size: 0.55rem;
    }

    .fp-bottom-nav-fab-btn {
        width: 48px;
        height: 48px;
        margin-top: -20px;
    }

    .fp-bottom-nav-fab-btn svg {
        width: 22px;
        height: 22px;
    }
}

/* Landscape mode adjustments */
@media (max-height: 500px) and (max-width: 768px) {
    .fp-bottom-nav-inner {
        height: 50px;
        padding: 4px 4px 2px;
    }

    .fp-bottom-nav-label {
        display: none;
    }

    .fp-bottom-nav-fab-btn {
        width: 44px;
        height: 44px;
        margin-top: -16px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .fp-bottom-nav {
        background: rgba(30, 30, 30, 0.95);
        border-top-color: rgba(255, 255, 255, 0.08);
    }

    .fp-bottom-nav-badge {
        border-color: #1e1e1e;
    }
}

/* Haptic feedback animation for active items */
@keyframes fpBottomNavTap {
    0% { transform: scale(1); }
    50% { transform: scale(0.88); }
    100% { transform: scale(1); }
}

.fp-bottom-nav-item:active {
    animation: fpBottomNavTap 0.15s ease;
}

.fp-bottom-nav-fab:active {
    animation: none;
}

/* Section Icons - Universal Design */
.fp-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
}
.fp-section-icon svg {
    width: 18px;
    height: 18px;
}
.fp-section-icon-trend {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}
.fp-section-icon-trend svg {
    stroke: #d97706;
}
.fp-section-icon-new {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}
.fp-section-icon-new svg {
    stroke: #2563eb;
}
.fp-section-title {
    display: flex;
    align-items: center;
}

/* Profile Avatar - proper size */
.fp-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    margin-bottom: 16px;
    background: #e5e7eb;
}

/* Profile page articles grid - 2 columns */
.fp-profile-content .fp-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Mobile: 1 column */
@media (max-width: 640px) {
    .fp-profile-avatar {
        width: 72px;
        height: 72px;
    }
    .fp-profile-content .fp-articles-grid {
        grid-template-columns: 1fr;
    }
}
