/* ===== Quick Links Grid + Tool Panels ===== */

/* Quick Links: horizontal scroll, 6 visible */
.quick-links {
  display: flex;
  gap: 10px;
  padding: 16px 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  min-width: 90px;
  flex-shrink: 0;
  scroll-snap-align: start;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all var(--transition);
  user-select: none;
}
.quick-link:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.quick-link.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}
.quick-link-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all var(--transition);
}
.quick-link:hover .quick-link-icon {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.quick-link-label {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}
.ql-loading .quick-link-icon::after {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Expandable panel area below quick-links */
#ql-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
#ql-expand.open {
  max-height: 600px;
}

/* Shared tool panel styles */
.tool-panel {
  display: none;
  padding: 16px 20px;
  margin: 0 0 16px;
  background: rgba(30,40,55,0.6);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
}
.tool-panel.active { display: block; }

/* Shared tool elements */
.tool-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tool-row select,
.tool-row input {
  flex: 1;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
}
.tool-row select { flex: 0.7; }
.tool-arrow {
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  transition: color var(--transition);
}
.tool-arrow:hover { color: var(--accent); }
.tool-action-btn {
  padding: 8px 16px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #0a0e14;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition);
}
.tool-action-btn:hover { background: var(--accent-dim); }
.tool-sm-btn {
  padding: 4px 10px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #0a0e14;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
}
.tool-sm-btn:hover { background: var(--accent-dim); }

/* Addin generator grid */
.addin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tool-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tool-field label {
  font-size: 11px;
  color: var(--text-muted);
}
.tool-field input,
.tool-field select {
  padding: 7px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-sans);
  outline: none;
}
.tool-field input:focus,
.tool-field select:focus { border-color: var(--accent); }
.tool-guid-row {
  display: flex;
  gap: 6px;
}
.tool-guid-row input { flex: 1; }

/* Snippet grid */
.snippet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.snippet-card {
  padding: 8px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.snippet-card:hover {
  border-color: var(--accent-dim);
}
.snippet-card-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.snippet-card-name {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.snippet-card-lang {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--accent);
}
.snippet-card-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Tool output */
.tool-output {
  margin-top: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tool-output-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}
.tool-output pre {
  padding: 10px;
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-primary);
  max-height: 200px;
  overflow-y: auto;
}

/* Version table */
.version-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}
.version-table td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.version-table td:first-child {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
  width: 60px;
}

/* API links */
.api-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.api-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all var(--transition);
}
.api-links a:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}

/* Weather */
.weather-panel { text-align: center; }
.weather-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}
.weather-icon { font-size: 32px; }
.weather-temp {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.weather-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.weather-detail {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.weather-city {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  #ql-expand { transition: none; }
}

/* ===== Favicon Strategy ===== */
.favicon-img {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  object-fit: contain;
  flex-shrink: 0;
}
.favicon-emoji {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.bookmark-favicon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--bg-hover);
  overflow: hidden;
}

/* ===== Bookmarks Page Arrows ===== */
.bookmarks-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(30,40,55,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, background 0.2s ease;
  opacity: 0;
  pointer-events: none;
}
.page-arrow.visible {
  opacity: 0.6;
  pointer-events: auto;
}
.page-arrow:hover {
  opacity: 1;
  background: rgba(30,40,55,0.8);
  border-color: var(--accent);
  color: var(--accent);
}
.page-arrow:disabled { opacity: 0.15; pointer-events: none; }
.page-arrow:hover {
  opacity: 1;
  border-color: var(--accent);
  color: var(--accent);
}
.page-arrow:disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}
.bookmarks-grid {
  flex: 1;
  min-width: 0;
}

/* ===== Quick-links Layout + Hover Scrollbar ===== */
.quick-links {
  max-width: 75%;
  margin: 0 auto;
}
.quick-links {
  scrollbar-width: thin;
  scrollbar-color: rgba(122,133,153,0) transparent;
  transition: scrollbar-color 0.4s ease;
}
.quick-links.show-scrollbar {
  scrollbar-color: rgba(122,133,153,0.5) transparent;
}
.quick-links::-webkit-scrollbar {
  height: 4px;
}
.quick-links::-webkit-scrollbar-track {
  background: transparent;
}
.quick-links::-webkit-scrollbar-thumb {
  background: rgba(122,133,153,0);
  border-radius: 2px;
  transition: background 0.4s ease;
}
.quick-links.show-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(122,133,153,0.5);
}
.quick-links.show-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Quick-links: constrain to 3/4 width */
.quick-links {
  max-width: 75%;
  margin: 0 auto;
}

/* ===== Wallpaper Picker Gallery ===== */
.wp-section { margin-bottom: 14px; }
.wp-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.wp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.wp-item {
  cursor: pointer;
  text-align: center;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: all 0.15s;
  overflow: hidden;
}
.wp-item:hover { border-color: var(--border-light); }
.wp-item.active { border-color: var(--accent); }
.wp-preview {
  width: 100%;
  height: 44px;
  border-radius: 4px;
}
.wp-item span {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wp-custom-row { display: flex; gap: 6px; }

/* ===== Page Arrows Container ===== */
.page-arrows-container {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bookmarks-section {
  flex: 1;
  min-width: 0;
}

/* ===== Search History ===== */
#search-history {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(26,35,55,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  margin-top: 4px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.15s ease;
  z-index: 15;
}
#search-history.open {
  max-height: 300px;
  opacity: 1;
}
.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.history-item:hover { background: rgba(255,255,255,0.05); }
.history-icon { font-size: 12px; opacity: 0.4; }
.history-text { flex: 1; font-size: 13px; color: var(--text-secondary); }
.history-del {
  background: none; border: none; color: var(--text-muted);
  font-size: 11px; cursor: pointer; opacity: 0;
  transition: opacity 0.15s;
}
.history-item:hover .history-del { opacity: 1; }
.history-del:hover { color: var(--danger); }
.history-clear {
  padding: 6px 14px;
  border-top: 1px solid rgba(255,255,255,0.04);
  text-align: center;
}
.history-clear button {
  background: none; border: none;
  color: var(--text-muted); font-size: 11px;
  cursor: pointer;
}
.history-clear button:hover { color: var(--text-secondary); }

/* ===== Custom Bookmarks ===== */
.bookmark-add-card {
  border: 2px dashed var(--border);
  opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s;
}
.bookmark-add-card:hover {
  opacity: 1;
  border-color: var(--accent);
}
.bookmark-card[draggable="true"] {
  cursor: grab;
}
.bookmark-card[draggable="true"]:active {
  cursor: grabbing;
}

/* ===== Glass transparency fallback ===== */
/* Ensures panels are translucent even if backdrop-filter fails */
@supports not (backdrop-filter: blur(1px)) {
  .tool-panel,
  .news-card,
  .bookmark-card,
  .mini-panel-content,
  .quick-link {
    background: rgba(30,40,55,0.85) !important;
  }
}



/* ===== Theme-aware icon/text colors ===== */
.theme-dark .top-right button,
.theme-dark .top-right a {
  color: #ffffff !important;
}
.theme-light .top-right button,
.theme-light .top-right a {
  color: #000000 !important;
}
.theme-dark .quick-link-label,
.theme-dark .date-label,
.theme-dark .clock {
  color: #ffffff !important;
}
.theme-light .quick-link-label,
.theme-light .date-label,
.theme-light .clock {
  color: #000000 !important;
}

/* ===== Section Divider ===== */
.section-divider {
  width: 50%;
  height: 1px;
  margin: 8px auto;
  background: var(--border);
  opacity: 0.4;
}

/* ===== Tool Styles ===== */
.tool-header {
  margin-bottom: 12px;
}
.tool-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.tool-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.tool-tab {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.tool-tab:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.tool-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tool-note { font-size: 11px; color: var(--text-muted); margin-top: 10px; }

/* Converter */
.converter-body { display: flex; flex-direction: column; gap: 12px; }
.converter-row { display: flex; align-items: center; gap: 12px; }
.converter-field { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.converter-arrow { font-size: 18px; color: var(--accent); flex-shrink: 0; }
.converter-formula { font-size: 11px; color: var(--text-muted); text-align: center; }

/* Versions table */
.versions-table-wrap { overflow-x: auto; }
.versions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.versions-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.versions-table td {
  padding: 8px 10px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.versions-table tr:hover td { background: rgba(255,255,255,0.02); }
.versions-table code {
  background: rgba(255,255,255,0.05);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
}

/* API reference */
.apis-grid { display: flex; flex-direction: column; gap: 16px; }
.api-cat-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.api-items { display: flex; flex-wrap: wrap; gap: 6px; }
.api-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
}
.api-item:hover { background: rgba(255,255,255,0.06); border-color: var(--accent); }
.api-name { font-size: 13px; font-weight: 600; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }
.api-desc { font-size: 11px; color: var(--text-muted); }

/* ===== Custom Wallpaper Upload ===== */
.wp-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.wp-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.wp-upload-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--accent);
  color: var(--accent);
}
.wp-upload-hint {
  font-size: 11px;
  color: var(--text-muted);
}
.wp-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 0;
  text-align: center;
  grid-column: 1 / -1;
}
.wp-del-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.wp-item {
  position: relative;
}
.wp-item:hover .wp-del-btn {
  opacity: 1;
}

/* ===== Engine Dropdown Scrollbar ===== */
.engine-dropdown::-webkit-scrollbar {
  width: 4px;
}
.engine-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.engine-dropdown::-webkit-scrollbar-thumb {
  background: rgba(122,133,153,0.3);
  border-radius: 2px;
}
.engine-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(122,133,153,0.5);
}

/* ===== Converter Swap Button ===== */
.converter-swap {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--accent);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.converter-swap:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--accent);
  transform: rotate(180deg);
}

/* ===== Code Snippets ===== */
.snippet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.snippet-card {
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.snippet-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--accent);
}
.snippet-card-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.snippet-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.snippet-card-lang {
  font-size: 10px;
  color: var(--accent);
  background: rgba(0,212,170,0.1);
  padding: 1px 6px;
  border-radius: 3px;
}
.snippet-card-desc {
  font-size: 11px;
  color: var(--text-muted);
}
.tool-output {
  margin-top: 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  overflow: hidden;
}
.tool-output-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tool-output-hd span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.tool-sm-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.tool-sm-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.tool-output pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ===== Notes Tool ===== */
.notes-textarea {
  width: 100%;
  min-height: 200px;
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.notes-textarea:focus {
  border-color: var(--accent);
}
.notes-status {
  font-size: 11px;
  color: var(--text-muted);
}
.notes-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Multi-Note Layout ===== */
.notes-multi-layout {
  display: flex;
  gap: 12px;
  min-height: 220px;
}
.notes-list {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  padding-right: 12px;
}
.notes-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.notes-add-btn {
  width: 24px;
  height: 24px;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
.notes-list-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.notes-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  background: rgba(255,255,255,0.02);
}
.notes-list-item:hover { background: rgba(255,255,255,0.06); }
.notes-list-item.active { background: rgba(0,212,170,0.12); border-left: 2px solid var(--accent); }
.notes-list-item-info { flex: 1; min-width: 0; }
.notes-list-item-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notes-list-item-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
.notes-del-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  padding: 2px 4px;
  flex-shrink: 0;
}
.notes-list-item:hover .notes-del-btn { opacity: 1; }
.notes-del-btn:hover { color: var(--danger); }
.notes-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.notes-title-input {
  width: 100%;
  padding: 6px 10px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}
.notes-title-input:focus { border-color: var(--accent); }
@media (max-width: 600px) {
  .notes-multi-layout { flex-direction: column; }
  .notes-list { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 8px; max-height: 120px; }
}

/* ===== Tool Panel Close Button ===== */
.tool-panel-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: rgba(0,212,170,0.08);
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  z-index: 2;
  padding: 0;
  line-height: 1;
}
.tool-panel-close:hover {
  background: var(--accent);
  color: #fff;
}

/* ===== Zoom Slider (Settings) ===== */
.zoom-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.zoom-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
}
.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
.zoom-val {
  font-size: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  min-width: 36px;
  text-align: right;
}

/* ===== Edit Mode (right-click) ===== */
.bookmark-card.edit-mode {
  border: 1px dashed rgba(255,100,100,0.4) !important;
  position: relative;
  animation: ios-wiggle 0.28s ease-in-out infinite alternate;
}
.quick-link.edit-mode {
  border: 1px dashed rgba(255,100,100,0.4) !important;
  animation: ios-wiggle 0.28s ease-in-out infinite alternate;
}
@keyframes ios-wiggle {
  0% { transform: rotate(-1.5deg); }
  100% { transform: rotate(1.5deg); }
}
@keyframes ios-wiggle-2 {
  0% { transform: rotate(1deg); }
  100% { transform: rotate(-1deg); }
}
.edit-del-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(255,60,60,0.7);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  padding: 0;
  line-height: 1;
}
.edit-del-btn:hover { background: rgba(255,60,60,1); }

/* ===== Weather Tool ===== */
.weather-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.weather-result {
  min-height: 80px;
}
.weather-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px 0;
}
.weather-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.weather-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.weather-icon {
  font-size: 36px;
}
.weather-temp {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}
.weather-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.weather-details {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.weather-city {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

/* ===== Weather Popup ===== */
.weather-popup {
  position: fixed;
  top: 60px;
  right: 24px;
  width: 340px;
  max-height: 80vh;
  overflow-y: auto;
  background: rgba(20,28,40,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 0;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.weather-popup.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.wp-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wp-header-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.wp-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}
.wp-close:hover { color: var(--text-primary); }

.wp-current {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.wp-current-icon { font-size: 42px; }
.wp-current-temp {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.wp-current-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.wp-current-details {
  display: flex;
  gap: 14px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.wp-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 18px 6px;
}

.wp-hourly {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 18px 12px;
  scrollbar-width: none;
}
.wp-hourly::-webkit-scrollbar { display: none; }
.wp-hour {
  flex-shrink: 0;
  text-align: center;
  padding: 6px 8px;
  min-width: 48px;
}
.wp-hour-time { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }
.wp-hour-icon { font-size: 18px; margin-bottom: 2px; }
.wp-hour-temp { font-size: 12px; font-weight: 600; color: var(--text-primary); }

.wp-daily {
  padding: 0 18px 14px;
}
.wp-day {
  display: flex;
  align-items: center;
  padding: 6px 0;
  gap: 10px;
}
.wp-day-name { font-size: 12px; color: var(--text-secondary); width: 36px; }
.wp-day-icon { font-size: 18px; width: 28px; text-align: center; }
.wp-day-desc { font-size: 11px; color: var(--text-muted); flex: 1; }
.wp-day-temp { font-size: 12px; color: var(--text-primary); }
.wp-day-temp span { color: var(--text-muted); font-weight: 400; }

.wp-loading {
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== Weather City Chips ===== */
.weather-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.weather-city-chip {
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.weather-city-chip:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}
.weather-city-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== Weather Nav Buttons ===== */
.weather-nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.weather-nav-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--accent);
  border-color: var(--accent);
}
