@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

:root {
	--bg-primary: #ffffff;
	--bg-secondary: #f5f5f7;
	--bg-tertiary: #eaeaec;
	--bg-hover: #f0f0f2;
	--bg-active: #e8e8ea;
	--bg-card: #ffffff;
	--bg-modal: #ffffff;
	--bg-input: #f5f5f7;
	--text-primary: #1d1d1f;
	--text-secondary: #6e6e73;
	--text-tertiary: #aeaeb2;
	--border: #d2d2d7;
	--border-light: #e5e5ea;
	--accent: #0071e3;
	--accent-hover: #0077ED;
	--accent-light: rgba(0,113,227,0.08);
	--danger: #ff3b30;
	--danger-hover: #ff453a;
	--danger-light: rgba(255,59,48,0.08);
	--success: #34c759;
	--shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
	--shadow-md: 0 4px 12px rgba(0,0,0,0.08);
	--shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;
	--sidebar-width: 280px;
	--unread-bg: #0071e3;
	--unread-text: #ffffff;
  }

  @media (prefers-color-scheme: dark) {
	:root {
	  --bg-primary: #121213;
	  --bg-secondary: #2c2c2e;
	  --bg-tertiary: #3a3a3c;
	  --bg-hover: #333336;
	  --bg-active: #3a3a3d;
	  --bg-card: #2c2c2e;
	  --bg-modal: #2c2c2e;
	  --bg-input: #3a3a3c;
	  --text-primary: #f5f5f7;
	  --text-secondary: #98989d;
	  --text-tertiary: #636366;
	  --border: #48484a;
	  --border-light: #3a3a3c;
	  --accent: #0a84ff;
	  --accent-hover: #409cff;
	  --accent-light: rgba(10,132,255,0.12);
	  --danger: #ff453a;
	  --danger-hover: #ff6961;
	  --danger-light: rgba(255,69,58,0.12);
	  --success: #30d158;
	  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
	  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
	  --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
	  --unread-bg: #0a84ff;
	  --unread-text: #ffffff;
	}
  }

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

  body {
	font-family: "Outfit", sans-serif;
	  font-optical-sizing: auto;
	  font-style: normal;
	background: var(--bg-primary);
	color: var(--text-primary);
	line-height: 1.5;
	overflow: hidden;
	height: 100vh;
	-webkit-font-smoothing: antialiased;
  }

  /* Layout */
  .app { display: flex; height: 100vh; padding: 10px 0 10px 10px; }

  .sidebar {
	width: var(--sidebar-width);
	background: var(--bg-secondary);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	overflow: hidden;
	transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
	z-index: 100;
  }

  .sidebar-header {
	padding: 10px 10px 4px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-shrink: 0;
  }

  .sidebar-actions {
	display: flex;
	gap: 2px;
  }

  .sidebar-nav {
	flex: 1;
	overflow-y: auto;
	padding: 4px 8px 8px;
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
  }

  .sidebar-nav::-webkit-scrollbar { width: 4px; }
  .sidebar-nav::-webkit-scrollbar-track { background: transparent; }
  .sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

  .main {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-width: 0;
  }

  .main-header {
	padding: 12px 20px;
	border-bottom: 1px solid var(--border-light);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
	gap: 12px;
	min-height: 52px;
  }

  .main-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
  }

  .main-header h2 {
	font-size: 16px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
  }

  .main-header-actions {
	display: flex;
	gap: 4px;
	flex-shrink: 0;
  }

  .feed-list {
	flex: 1;
	overflow-y: auto;
	padding: 0;
	min-height: 0;
	padding-bottom: 120px;
  }

  #listView {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
  }

  .feed-list::-webkit-scrollbar { width: 6px; }
  .feed-list::-webkit-scrollbar-track { background: transparent; }
  .feed-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

  /* Buttons */
  .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	padding: 7px 14px;
	transition: all 0.15s ease;
	font-family: inherit;
	white-space: nowrap;
  }

  .btn-primary {
	background: var(--accent);
	color: #fff;
  }
  .btn-primary:hover { background: var(--accent-hover); }

  .btn-danger {
	background: var(--danger);
	color: #fff;
  }
  .btn-danger:hover { background: var(--danger-hover); }

  .btn-ghost {
	background: transparent;
	color: var(--text-secondary);
	padding: 6px 8px;
  }
  .btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

  .btn-outline {
	background: transparent;
	border: 1px solid var(--border);
	color: var(--text-primary);
  }
  .btn-outline:hover { background: var(--bg-hover); }

  .btn-icon {
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: var(--radius-sm);
	background: transparent;
	border: none;
	color: var(--text-secondary);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
	flex-shrink: 0;
  }
  .btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }

  .btn-icon svg { width: 18px; height: 18px; }

  /* Sidebar items */
  .nav-item {
	display: flex;
	align-items: center;
	padding: 7px 10px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	color: var(--text-primary);
	font-size: 13px;
	font-weight: 500;
	gap: 8px;
	transition: background 0.1s ease;
	user-select: none;
	position: relative;
  }
  .nav-item:hover { background: var(--bg-hover); }
  .nav-item.active { background: var(--accent-light); color: var(--accent); }
  .nav-item.active .nav-icon { color: var(--accent); }

  .nav-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: var(--text-secondary);
  }

  .nav-item.active .unread-badge { background: var(--accent); }

  .nav-label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
  }

  .unread-badge {
	background: var(--unread-bg);
	color: var(--unread-text);
	font-size: 11px;
	font-weight: 600;
	padding: 1px 7px;
	border-radius: 10px;
	flex-shrink: 0;
	min-width: 20px;
	text-align: center;
  }

  .folder-section { margin-top: 4px; }

  .folder-header {
	display: flex;
	align-items: center;
	padding: 7px 10px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	gap: 6px;
	color: var(--text-primary);
	transition: background 0.1s ease;
	user-select: none;
  }
  .folder-header:hover { background: var(--bg-hover); }
  .folder-header.active { background: var(--accent-light); color: var(--accent); }

  .folder-chevron {
	width: 14px;
	height: 14px;
	transition: transform 0.2s ease;
	color: var(--text-tertiary);
	flex-shrink: 0;
  }
  .folder-chevron.open { transform: rotate(90deg); }

  .folder-feeds {
	padding-left: 14px;
	overflow: hidden;
  }

  .folder-feeds.collapsed { display: none; }

  .folder-feeds .nav-item { font-weight: 400; }

  .nav-divider {
	height: 1px;
	background: var(--border-light);
	margin: 6px 10px;
  }

  /* Feed items */
  .article-item {
	padding: 14px 20px;
	border-bottom: 1px solid var(--border-light);
	cursor: pointer;
	transition: background 0.1s ease;
  }
  .article-item:hover { background: var(--bg-hover); }
  .article-item.read { opacity: 0.5; }

  .article-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
	font-size: 12px;
	color: var(--text-secondary);
  }

  .article-source {
	font-weight: 600;
	color: var(--accent);
  }

  .article-dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--text-tertiary);
	flex-shrink: 0;
  }

  .article-title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	margin-bottom: 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
  }

  .article-snippet {
	font-size: 13px;
	color: var(--text-secondary);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
  }

  .article-item.has-thumb {
	display: flex;
	align-items: flex-start;
	gap: 16px;
  }

  .article-item-text {
	flex: 1;
	min-width: 0;
  }

  .article-thumb {
	width: 100px;
	height: 72px;
	object-fit: cover;
	border-radius: var(--radius-sm);
	flex-shrink: 0;
	background: var(--bg-tertiary);
  }

  .unread-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
	flex-shrink: 0;
  }

  /* Article view */
  .article-view {
	display: none;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
  }
  .article-view.active { display: flex; }

  .article-view-header {
	padding: 12px 20px;
	border-bottom: 1px solid var(--border-light);
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
  }

  .article-content {
	flex: 1;
	overflow-y: auto;
	padding: 24px 20px 40px;
	max-width: 720px;
	margin: 0 auto;
	width: 100%;
  }

  .article-content h1 {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 8px;
	letter-spacing: -0.3px;
  }

  .article-content .meta {
	font-size: 13px;
	color: var(--text-secondary);
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
  }

  .article-body {
	font-size: 15px;
	line-height: 1.7;
	color: var(--text-primary);
  }

  .article-body p { margin-bottom: 14px; }
  .article-body a { color: var(--accent); text-decoration: none; }
  .article-body a:hover { text-decoration: underline; }
  .article-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 12px 0; }
  .article-body h2, .article-body h3, .article-body h4 { margin: 20px 0 8px; font-weight: 600; }
  .article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 14px; }
  .article-body blockquote {
	border-left: 3px solid var(--accent);
	padding-left: 16px;
	margin: 14px 0;
	color: var(--text-secondary);
	font-style: italic;
  }
  .article-body pre {
	background: var(--bg-secondary);
	padding: 14px;
	border-radius: var(--radius-sm);
	overflow-x: auto;
	margin-bottom: 14px;
	font-size: 13px;
  }

  /* Modal */
  .modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.4);
	z-index: 500;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: fadeIn 0.15s ease;
	backdrop-filter: blur(4px);
  }
  .modal-overlay.active { display: flex; }

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

  .modal {
	background: var(--bg-modal);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	width: 100%;
	max-width: 440px;
	max-height: 80vh;
	overflow-y: auto;
	animation: slideUp 0.2s cubic-bezier(0.4,0,0.2,1);
  }

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

  .modal-header {
	padding: 18px 20px 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
  }

  .modal-header h3 {
	font-size: 17px;
	font-weight: 700;
  }

  .modal-body { padding: 16px 20px; }
  .modal-footer {
	padding: 12px 20px 18px;
	display: flex;
	gap: 8px;
	justify-content: flex-end;
  }

  .form-group { margin-bottom: 14px; }

  .form-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 5px;
	color: var(--text-secondary);
  }

  .form-input {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-family: inherit;
	background: var(--bg-input);
	color: var(--text-primary);
	outline: none;
	transition: border-color 0.15s ease;
  }
  .form-input:focus { border-color: var(--accent); }

  .form-select {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-family: inherit;
	background: var(--bg-input);
	color: var(--text-primary);
	outline: none;
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
  }

  /* Discovered feeds */
  .discovered-feeds { margin-top: 12px; }

  .discovered-feed {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--border-light);
	border-radius: var(--radius-sm);
	margin-bottom: 6px;
	cursor: pointer;
	transition: all 0.15s ease;
  }
  .discovered-feed:hover { border-color: var(--accent); background: var(--accent-light); }
  .discovered-feed.selected { border-color: var(--accent); background: var(--accent-light); }

  .discovered-feed-info { flex: 1; min-width: 0; }
  .discovered-feed-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .discovered-feed-url { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .check-circle {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid var(--border);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
  }
  .discovered-feed.selected .check-circle {
	border-color: var(--accent);
	background: var(--accent);
  }

  /* Context menu */
  .context-menu {
	display: none;
	position: fixed;
	background: var(--bg-modal);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	padding: 4px;
	min-width: 180px;
	z-index: 600;
	animation: fadeIn 0.1s ease;
  }
  .context-menu.active { display: block; }

  .context-menu-item {
	padding: 8px 12px;
	font-size: 13px;
	cursor: pointer;
	border-radius: var(--radius-sm);
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--text-primary);
	transition: background 0.1s ease;
  }
  .context-menu-item:hover { background: var(--bg-hover); }
  .context-menu-item.danger { color: var(--danger); }
  .context-menu-item.danger:hover { background: var(--danger-light); }

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

  .context-menu-item svg { width: 15px; height: 15px; }

  /* Empty state */
  .empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 40px 20px;
	text-align: center;
	color: var(--text-secondary);
  }

  .empty-state svg {
	width: 48px;
	height: 48px;
	margin-bottom: 16px;
	color: var(--text-tertiary);
  }

  .empty-state h3 {
	font-size: 17px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--text-primary);
  }

  .empty-state p {
	font-size: 14px;
	max-width: 280px;
	margin-bottom: 16px;
  }

  /* Loading spinner */
  .spinner {
	width: 18px;
	height: 18px;
	border: 2px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
	margin: 0 auto;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  .loading-bar {
	height: 2px;
	background: var(--accent);
	position: fixed;
	top: 0;
	left: 0;
	z-index: 999;
	animation: loadingBar 1.5s ease-in-out infinite;
	display: none;
  }
  .loading-bar.active { display: block; }

  @keyframes loadingBar {
	0% { width: 0; }
	50% { width: 70%; }
	100% { width: 100%; opacity: 0; }
  }

  /* Refresh banner */
  .refresh-banner {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 20px;
	background: var(--accent-light);
	color: var(--accent);
	font-size: 13px;
	font-weight: 500;
	border-bottom: 1px solid var(--border-light);
	flex-shrink: 0;
	animation: fadeIn 0.15s ease;
  }

  .refresh-banner-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid var(--accent-light);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
	flex-shrink: 0;
  }

  /* Spinning refresh button */
  .btn-icon.spinning svg {
	animation: spin 1s linear infinite;
  }
  .btn-icon.spinning {
	opacity: 0.5;
	pointer-events: none;
  }

  @media (max-width: 768px) {
	.refresh-banner { padding: 8px 14px; }
  }

  /* Toast */
  .toast-container {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 700;
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
  }

  .toast {
	background: var(--text-primary);
	color: var(--bg-primary);
	padding: 10px 18px;
	border-radius: var(--radius-md);
	font-size: 13px;
	font-weight: 500;
	box-shadow: var(--shadow-lg);
	animation: toastIn 0.25s ease, toastOut 0.25s ease 2.5s forwards;
  }

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

  /* Mobile menu toggle */
  .mobile-menu-btn { display: none; }

  .sidebar-close-btn { display: none; }

  /* Tab bar — hidden on desktop, shown on mobile */
  .tab-bar { display: none; }

  /* Mobile */
  @media (max-width: 768px) {
	.app { padding: 0; }

	/* Hide sidebar completely on mobile — use tab bar instead */
	.sidebar {
	  display: none !important;
	}
	.mobile-overlay {
	  display: none !important;
	}
	.mobile-menu-btn {
	  display: none !important;
	}
	.sidebar-close-btn {
	  display: none !important;
	}

	/* Show tab bar */
	.tab-bar {
	  display: flex;
	  position: fixed;
	  bottom: 30px;
	  left: 10%;
	  right: 10%;
	  background: var(--bg-secondary);
	  border-top: none;
	  border-radius: 40px;
	  box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.139);
	  z-index: 200;
	  padding: 8px 10px;
	}

	.tab-bar-item {
	  flex: 1;
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	  gap: 2px;
	  padding: 6px 0;
	  border: none;
	  border-radius: 40px;
	  background: transparent;
	  color: var(--text-secondary);
	  cursor: pointer;
	  font-family: inherit;
	  font-size: 10px;
	  font-weight: 500;
	  transition: color 0.15s ease;
	  -webkit-tap-highlight-color: transparent;
	}

	.tab-bar-item svg {
	  width: 22px;
	  height: 22px;
	}

	.tab-bar-item.active {
	  color: var(--accent);
	  background: var(--bg-hover);
	}
	.tab-bar-item.active svg {
	  color: var(--accent);
	}

	/* Hide tab bar when reading an article */
	.tab-bar.hidden {
	  display: none;
	}

	/* Adjust main content for tab bar */
	.app {
	  
	}

	/* Toast above tab bar */
	.toast-container {
	  bottom: 72px;
	}

	.article-content { padding: 20px 16px 40px; }
	.article-content h1 { font-size: 20px; }
	.main-header { padding: 10px 14px; position: relative; }
	.main-header-left { position: absolute; left: 0; right: 0; justify-content: center; pointer-events: none; }
	.main-header-left #viewTitle { pointer-events: auto; }
	.main-header-actions { position: relative; z-index: 1; margin-left: auto; }
	.article-item { padding: 12px 14px; }
	.article-item.has-thumb { flex-direction: column; gap: 10px; }
	.article-thumb { width: 100%; height: 140px; border-radius: var(--radius-sm); }

  }

  /* Favicon */
  .feed-favicon {
	width: 16px;
	height: 16px;
	border-radius: 3px;
	flex-shrink: 0;
	object-fit: contain;
	background: var(--bg-tertiary);
  }

  .link-btn {
	color: var(--accent);
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	background: none;
	border: none;
	font-family: inherit;
  }
  .link-btn:hover { text-decoration: underline; }

  /* Star styles */
  .btn-icon.starred { color: #f5a623; }
  .btn-icon.starred:hover { color: #e6951a; background: rgba(245,166,35,0.1); }
  .btn-icon.starred svg { fill: #f5a623; }

  .starred-badge { background: #f5a623; }
  .nav-item.active .starred-badge { background: #f5a623; }

  .article-star-icon {
	width: 14px;
	height: 14px;
	color: #f5a623;
	flex-shrink: 0;
	margin-left: auto;
  }

  /* Settings view */
  .settings-view {
	padding: 24px 20px 40px;
	max-width: 560px;
	margin: 0 auto;
	width: 100%;
  }

  .settings-section {
	margin-bottom: 28px;
  }

  .settings-section-title {
	font-size: 13px;
	font-weight: 600;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 6px;
	padding: 0 4px;
  }

  .settings-section-desc {
	font-size: 13px;
	color: var(--text-tertiary);
	margin-bottom: 8px;
	padding: 0 4px;
  }

  .settings-card {
	background: var(--bg-secondary);
	border-radius: var(--radius-md);
	border: 1px solid var(--border-light);
	overflow: hidden;
  }

  .settings-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	cursor: pointer;
	transition: background 0.1s ease;
  }
  .settings-item:hover { background: var(--bg-hover); }

  .settings-item-info {
	flex: 1;
	min-width: 0;
  }

  .settings-item-label {
	font-size: 14px;
	font-weight: 500;
	color: var(--text-primary);
  }

  .settings-item-desc {
	font-size: 12px;
	color: var(--text-secondary);
	margin-top: 2px;
  }

  .settings-item-icon {
	width: 18px;
	height: 18px;
	color: var(--text-tertiary);
	flex-shrink: 0;
  }

  .settings-item-danger .settings-item-label { color: var(--danger); }
  .settings-item-danger .settings-item-icon { color: var(--danger); }
  .settings-item-danger:hover { background: var(--danger-light); }

  .settings-select {
	appearance: none;
	-webkit-appearance: none;
	background: var(--bg-primary);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-sm, 6px);
	padding: 8px 32px 8px 12px;
	font-size: 13px;
	color: var(--text-primary);
	cursor: pointer;
	flex-shrink: 0;
	background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	min-width: 0;
	max-width: 200px;
  }
  .settings-select:focus {
	outline: none;
	border-color: var(--accent);
  }

  .settings-divider {
	height: 1px;
	background: var(--border-light);
	margin: 0 16px;
  }

  .btn-sm {
	font-size: 12px;
	padding: 5px 10px;
	flex-shrink: 0;
  }

  .inactive-feed-item { cursor: default; }
  .inactive-feed-item:hover { background: transparent; }

  @media (max-width: 768px) {
	.settings-view { padding: 20px 16px 40px; }
  }

  /* Auth Screen */
  .auth-screen {
	display: none;
	position: fixed;
	inset: 0;
	background: var(--bg-primary);
	z-index: 1000;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 20px;
  }
  .auth-screen.active { display: flex; }

  .auth-card {
	width: 100%;
	max-width: 380px;
	text-align: center;
  }

  .auth-title {
	font-size: 32px;
	font-weight: 700;
	letter-spacing: -0.5px;
	margin-bottom: 4px;
  }

  .auth-subtitle {
	font-size: 14px;
	color: var(--text-secondary);
	margin-bottom: 28px;
  }

  .auth-tabs {
	display: flex;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--border-light);
  }

  .auth-tab {
	flex: 1;
	padding: 10px;
	border: none;
	background: transparent;
	font-size: 14px;
	font-weight: 600;
	color: var(--text-secondary);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	font-family: inherit;
	transition: color 0.15s ease, border-color 0.15s ease;
	-webkit-tap-highlight-color: transparent;
  }
  .auth-tab.active {
	color: var(--accent);
	border-bottom-color: var(--accent);
  }

  .auth-form { text-align: left; }
  .auth-form .form-group { margin-bottom: 14px; }
  .auth-form .btn-primary {
	width: 100%;
	padding: 11px;
	font-size: 14px;
	margin-top: 6px;
  }

  .auth-skip {
	margin-top: 24px;
	font-size: 13px;
	color: var(--text-secondary);
  }
  .auth-skip a {
	color: var(--accent);
	cursor: pointer;
	text-decoration: none;
  }
  .auth-skip a:hover { text-decoration: underline; }

  /* Danger button */
  .btn-danger {
	background: var(--danger);
	color: #fff;
	border: none;
	padding: 8px 16px;
	border-radius: var(--radius-sm);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.15s ease;
  }
  .btn-danger:hover { background: var(--danger-hover); }

  /* Session list */
  .session-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--border-light);
  }
  .session-item:last-child { border-bottom: none; }

  .session-info { flex: 1; min-width: 0; }

  .session-device {
	font-size: 14px;
	font-weight: 500;
  }

  .session-meta {
	font-size: 12px;
	color: var(--text-secondary);
	margin-top: 2px;
  }

  .session-current {
	font-size: 11px;
	font-weight: 600;
	color: var(--success);
	padding: 3px 8px;
	background: rgba(52,199,89,0.1);
	border-radius: 4px;
	flex-shrink: 0;
  }

  /* Account info in settings */
  .settings-account-email {
	font-size: 13px;
	color: var(--text-secondary);
	padding: 10px 16px;
	background: var(--bg-primary);
	border-bottom: 1px solid var(--border-light);
  }

  /* Folders view (inside feedList for mobile navigation) */
  .folders-view {
	padding: 8px 0;
  }

  .folders-view-actions {
	display: flex;
	gap: 8px;
	padding: 8px 16px 12px;
  }

  .folders-view-actions .btn {
	flex: 1;
  }

  .folders-view-section {
	margin-bottom: 4px;
  }

  .folders-view-folder {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	gap: 10px;
	cursor: pointer;
	transition: background 0.1s ease;
  }
  .folders-view-folder:hover { background: var(--bg-hover); }

  .folders-view-folder .nav-icon {
	width: 20px;
	height: 20px;
	color: var(--text-secondary);
	flex-shrink: 0;
  }

  .folders-view-folder-name {
	flex: 1;
	font-size: 15px;
	font-weight: 600;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
  }

  .folders-view-folder-meta {
	font-size: 12px;
	color: var(--text-secondary);
	flex-shrink: 0;
  }

  .folders-view-folder-actions {
	display: flex;
	gap: 2px;
	flex-shrink: 0;
  }

  .folders-view-feed {
	display: flex;
	align-items: center;
	padding: 10px 16px 10px 46px;
	gap: 10px;
	cursor: pointer;
	transition: background 0.1s ease;
  }
  .folders-view-feed:hover { background: var(--bg-hover); }

  .folders-view-feed-name {
	flex: 1;
	font-size: 14px;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
  }

  .folders-view-divider {
	height: 1px;
	background: var(--border-light);
	margin: 4px 16px;
  }

  .folders-view-section-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 12px 16px 6px;
  }

  /* Status message in modal */
  .status-msg {
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	font-size: 13px;
	margin-bottom: 12px;
	display: none;
  }
  .status-msg.error { display: block; background: var(--danger-light); color: var(--danger); }
  .status-msg.info { display: block; background: var(--accent-light); color: var(--accent); }
  .status-msg.success { display: block; background: rgba(52,199,89,0.1); color: var(--success); }