/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 80px;
}

/* Header */
.header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    margin-bottom: var(--space-md);
    position: sticky;
    top: 0;
    background: rgba(13, 13, 15, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 40;
}

/* Header Row 1: Logo + Actions */
.header-row-1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Header Row 2: Navigation + Stats */
.header-row-2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: var(--space-sm);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary) !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.logo-f {
    color: white !important;
    -webkit-text-fill-color: white !important;
    font-size: 18px;
    font-weight: 700;
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1;
}

.logo-plus {
    position: absolute;
    top: -2px;
    right: -4px;
    color: var(--primary-color) !important;
    -webkit-text-fill-color: var(--primary-color) !important;
    font-size: 12px;
    font-weight: 700;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color) !important;
    -webkit-text-fill-color: var(--text-color) !important;
}

/* Header back container (replaces nav in row 2) */
.header-back {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-back-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    transition: color var(--transition-fast);
    flex-shrink: 0;
}

.header-back-btn:hover {
    color: var(--primary-color);
}

.header-page-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Header stats (in row 2) */
.header-stats {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(251, 191, 36, 0.2);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--spark-color);
}

.stat-pill.stat-spark {
    background: rgba(251, 191, 36, 0.2);
    color: var(--spark-color);
}

.stat-pill.stat-heat {
    background: rgba(255, 107, 107, 0.15);
    color: var(--heat-color);
}

.stat-pill.stat-heat.empty {
    opacity: 0.5;
}

/* Header nav tabs */
.header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-sm);
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
}

.header-nav::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: var(--surface-elevated);
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-tab i,
.nav-tab svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.nav-tab-text {
    display: none;
}

.nav-tab:hover {
    background: var(--surface-color);
    color: var(--text-color);
}

.nav-tab.active {
    background: var(--spark-color);
    color: #0D0D0F;
    padding: 8px 14px;
    font-weight: 600;
}

.nav-tab.active svg path,
.nav-tab.active svg rect {
    stroke: #0D0D0F;
    fill: none;
}

.nav-tab.active svg path[fill="currentColor"] {
    fill: #0D0D0F;
    stroke: none;
}

.nav-tab.active .nav-tab-text {
    display: inline;
}

/* Filter tabs */
.header-filters {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-sm);
}

.filter-tab {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-tab:hover {
    border-color: var(--border-light);
    color: var(--text-color);
}

.filter-tab.active {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
    color: var(--primary-color);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--surface-elevated);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-btn:hover {
    background: var(--surface-color);
    transform: scale(1.05);
}

.header-btn svg, .header-btn i {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    color: var(--text-secondary);
}

.header-btn:hover svg, .header-btn:hover i {
    stroke: var(--text-color);
    color: var(--text-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

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

/* Feed tabs - hidden since navigation moved to header */
.feed-tabs {
    display: none !important;
}

/* Hide duplicate feed filters from JS (now in header) */
.feed-filters {
    display: none !important;
}

#feedFiltersContainer {
    display: none !important;
}

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

.feed-tab {
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.feed-tab:hover {
    background: var(--surface-elevated);
    border-color: var(--border-light);
}

.feed-tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

/* Pull to refresh */
.pull-indicator {
    text-align: center;
    padding: var(--space-md);
    color: var(--hint-color);
    font-size: 13px;
    display: none;
}

.pull-indicator.visible {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-color);
}
