/* --- ROOT VARIABLES & RESET --- */
:root {
  --bg-main: #0d1117;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.1);
  --accent-color: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.2);
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --radius-lg: 18px;
  --radius-md: 12px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  padding-bottom: 40px;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* APP HEADER */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.logo-icon { font-size: 1.4rem; }
.logo-text { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.5px; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.streak-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* SEARCH BAR */
.search-section {
  padding: 16px 20px;
  max-width: 650px;
  margin: 0 auto;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  gap: 10px;
}

.search-box:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 12px var(--accent-glow);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 1rem;
  width: 100%;
}

.clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.suggestions-list {
  position: absolute;
  top: 100%;
  left: 20px;
  right: 20px;
  background: #161b22;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 6px;
  z-index: 90;
  max-height: 250px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

/* BOOKMARKS MODAL */
.bookmarks-view {
  position: fixed;
  inset: 0;
  background: #161b22;
  z-index: 200;
  padding: 20px;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.bookmark-item {
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
}
