/* Premium modern design */
:root {
  --font-family: 'Space Grotesk', 'Inter', sans-serif;
  --color-primary: #4b2bee;
  --color-primary-rgb: 75, 43, 238;
  --color-primary-dark: #3a1eb8;
  --color-bg-light: #f6f6f8;
  --color-bg-dark: #131022;
  --color-surface-dark: #1c1833;
  --color-border-dark: #292348;
  --color-text-light: #222;
  --color-text-dark: #e0e0e0;
  --radius: 8px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --transition-speed: 0.3s;
  --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Keyframe Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes glow {

  0%,
  100% {
    box-shadow: 0 0 5px rgba(var(--color-primary-rgb), 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(var(--color-primary-rgb), 0.5);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Global improvements */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--color-primary);
  color: white;
}

/* Subtle grid background pattern */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-size: 50px 50px;
  background-image:
    linear-gradient(to right, rgba(75, 43, 238, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(75, 43, 238, 0.03) 1px, transparent 1px);
  pointer-events: none;
}


[data-theme="dark"] {
  --color-bg: var(--color-bg-dark);
  --color-surface: var(--color-surface-dark);
  --color-border: var(--color-border-dark);
  --color-text: var(--color-text-dark);
}

[data-theme="light"] {
  --color-bg: var(--color-bg-light);
  --color-surface: #fff;
  --color-border: #ddd;
  --color-text: var(--color-text-light);
}

body {
  margin: 0;
  font-family: var(--font-family);
  background: var(--color-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--color-text);
  transition: background var(--transition-speed) var(--transition-timing),
    color var(--transition-speed) var(--transition-timing);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.has-bg::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1;
  pointer-events: none;
  animation: fadeIn 0.5s var(--transition-timing);
}

body.has-bg .header {
  background: rgba(var(--color-primary), 0.8);
  backdrop-filter: blur(5px);
  transition: all var(--transition-speed) var(--transition-timing);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  background: var(--color-primary);
  color: #fff;
  animation: slideDown 0.5s var(--transition-timing);
  transition: background var(--transition-speed) var(--transition-timing);
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.profile-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#profile-select {
  background: none;
  border: none;
  color: #fff;
  font-family: var(--font-family);
  font-size: 0.9rem;
  padding: 2px 5px;
  cursor: pointer;
  outline: none;
}

#profile-select option {
  background: var(--color-surface-dark);
  color: #fff;
}

#add-profile-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
}

#add-profile-btn:hover {
  background: var(--color-primary);
  transform: scale(1.1);
}

#rename-profile-btn,
#delete-profile-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  transition: all 0.2s;
}

#rename-profile-btn {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

#rename-profile-btn:hover {
  color: #fff;
  transform: scale(1.2);
}

#delete-profile-btn {
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.2rem;
  display: none;
}

#delete-profile-btn:hover {
  color: #ff4444;
  transform: scale(1.2);
}

.header h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: fadeIn 0.6s var(--transition-timing);
}

#theme-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s var(--transition-timing);
}

#theme-toggle:hover {
  transform: scale(1.2) rotate(20deg);
}

.header-controls button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s var(--transition-timing),
    opacity 0.2s var(--transition-timing);
  padding: 0.5rem;
  border-radius: 8px;
}

.header-controls button:hover {
  transform: translateY(-2px) scale(1.1);
  background: rgba(255, 255, 255, 0.1);
}

.weather-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: help;
  transition: opacity 0.3s;
}

.weather-widget:hover {
  opacity: 0.8;
}

.weather-icon {
  font-size: 1.2rem;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.status-widget {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-left: 1.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  margin-left: 0.5rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #4ade80;
  margin-bottom: 2px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 5px #4ade80;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.7;
    box-shadow: 0 0 12px #4ade80;
  }

  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 5px #4ade80;
  }
}

.clock-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: monospace;
  line-height: 1;
}

#current-time {
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 1px;
}

#current-date {
  font-size: 0.65rem;
  opacity: 0.7;
  text-transform: uppercase;
  margin-top: 2px;
}

.main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.zones {
  flex: 1;
  columns: 320px auto;
  column-gap: 1.5rem;
  padding: 2rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

.zones::-webkit-scrollbar {
  width: 6px;
}

.zones::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

.zone {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: slideUp 0.5s var(--transition-timing);
  animation-fill-mode: both;
  transition: transform 0.3s var(--transition-timing),
    box-shadow 0.3s var(--transition-timing),
    border-color 0.3s var(--transition-timing);
  position: relative;
  width: 100%;
  height: fit-content;
}

/* Holographic corner accents */
.zone::before,
.zone::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--color-primary);
  opacity: 0;
  transition: opacity 0.3s var(--transition-timing);
  pointer-events: none;
}

.zone::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: var(--radius);
}

.zone::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: var(--radius);
}

.zone:hover::before,
.zone:hover::after {
  opacity: 1;
}

.zone:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: var(--color-primary);
}

/* Stagger animation for zones */
.zone:nth-child(1) {
  animation-delay: 0.05s;
}

.zone:nth-child(2) {
  animation-delay: 0.1s;
}

.zone:nth-child(3) {
  animation-delay: 0.15s;
}

.zone:nth-child(4) {
  animation-delay: 0.2s;
}

.zone:nth-child(5) {
  animation-delay: 0.25s;
}

.zone:nth-child(6) {
  animation-delay: 0.3s;
}

.zone h2 {
  margin: 0;
  font-size: 1.2rem;
}

.zone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  cursor: grab;
}

.zone-header:active {
  cursor: grabbing;
}

.delete-zone-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.2s var(--transition-timing),
    color 0.2s var(--transition-timing),
    transform 0.2s var(--transition-timing);
  font-size: 1.2rem;
}

.delete-zone-btn:hover {
  opacity: 1;
  color: red;
  transform: scale(1.3) rotate(90deg);
}


.zone-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.layout-zone-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.7;
  transition: transform 0.2s, opacity 0.2s;
  padding: 0;
  filter: grayscale(1);
}

.layout-zone-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  filter: grayscale(0);
}

/* Block List Grid System */
.block-list {

  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
  /* Default 1 col */
  transition: all 0.3s ease;
}

.block-list.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.block-list.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Ensure blocks in grid fill height if needed or just look uniform */
.block {

  position: relative;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1rem;
  margin: 0;
  border-radius: var(--radius);
  cursor: grab;
  user-select: none;
  transition: transform 0.2s var(--transition-timing),
    background 0.2s var(--transition-timing),
    box-shadow 0.2s var(--transition-timing),
    filter 0.2s var(--transition-timing);
  display: block;
  text-decoration: none;
  animation: scaleIn 0.4s var(--transition-timing);
  animation-fill-mode: both;
}

/* Stagger animation for blocks */
.block:nth-child(1) {
  animation-delay: 0.05s;
}

.block:nth-child(2) {
  animation-delay: 0.1s;
}

.block:nth-child(3) {
  animation-delay: 0.15s;
}

.block:nth-child(4) {
  animation-delay: 0.2s;
}

.block:nth-child(5) {
  animation-delay: 0.25s;
}

.block:active {
  cursor: grabbing;
  transform: scale(1.05);
}

.block:hover {
  filter: brightness(0.9);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(66, 133, 244, 0.3);
}

.block:hover .block-actions {
  opacity: 1;
  pointer-events: auto;
}

.block-actions {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--transition-timing);
}

.block-action-btn {
  background: rgba(0, 0, 0, 0.2);
  border: none;
  color: #fff;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s var(--transition-timing);
}

.block-action-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: scale(1.2);
}

.block-action-btn.delete:hover {
  background: #ff4444;
  transform: scale(1.2) rotate(90deg);
}

.block-action-btn.edit:hover {
  background: #4CAF50;
  transform: scale(1.2);
}

/* Removing animation */
.block.removing {
  animation: fadeOut 0.3s var(--transition-timing) forwards;
}

.zone.removing {
  animation: fadeOut 0.4s var(--transition-timing) forwards;
}

/* Modal & Controls */
.header-controls {
  display: flex;
  gap: 1rem;
}

#add-block-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity var(--transition-speed) var(--transition-timing),
    backdrop-filter var(--transition-speed) var(--transition-timing);
  backdrop-filter: blur(0px);
}

.modal:not(.hidden) {
  backdrop-filter: blur(4px);
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal.hidden .modal-content {
  transform: scale(0.9);
}

/* Search Bar Styles */
.search-container {
  margin: 0 1.5rem;
  flex: 1;
  max-width: 400px;
  position: relative;
}

.search-container input {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  color: #fff;
  font-family: var(--font-family);
  transition: all 0.3s var(--transition-timing);
}

.search-container input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(75, 43, 238, 0.3);
}

.search-container::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.6;
}

/* Removal of duplicate .zone and .cyber-grid definitions that might be trailing */


/* Scrollbar styles for all overflow containers */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
  opacity: 0.5;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

.modal-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: var(--radius);
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  color: var(--color-text);
  transform: scale(1);
  transition: transform var(--transition-speed) var(--transition-timing);
  animation: scaleIn 0.3s var(--transition-timing);
}

/* Specific buttons styles */
#reset-bg-btn {
  margin-right: auto;
  color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
  font-weight: 500;
}

#reset-bg-btn:hover {
  background: rgba(255, 68, 68, 0.2);
  transform: translateY(-2px);
}

.modal-content h3 {
  margin-top: 0;
}

.modal-content label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.2s var(--transition-timing),
    box-shadow 0.2s var(--transition-timing);
}

.modal-content input:focus,
.modal-content select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.modal-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s var(--transition-timing);
}

.modal-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.modal-actions button.primary {
  background: var(--color-primary);
  color: #fff;
}

.modal-actions button.primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--color-card-bg);
  backdrop-filter: blur(10px);
  color: var(--color-text);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  animation: slideInRight 0.3s var(--transition-timing);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 300px;
}

.toast.success {
  border-left: 4px solid #4CAF50;
}

.toast.error {
  border-left: 4px solid #f44336;
}

.toast.info {
  border-left: 4px solid var(--color-primary);
}

.toast.removing {
  animation: slideOutRight 0.3s var(--transition-timing) forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* RSS Sidebar */
.rss-sidebar {
  width: 30vw;
  min-width: 350px;
  max-width: 600px;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 10;
  animation: fadeIn 0.5s var(--transition-timing);
}

.rss-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rss-header h2 {
  margin: 0;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.rss-controls {
  display: flex;
  gap: 8px;
}

.rss-controls button:hover {
  opacity: 1 !important;
  transform: scale(1.1);
}

.rss-manage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.rss-manage-item:last-child {
  border-bottom: none;
}

.rss-manage-item .delete-rss-btn {
  background: none;
  border: none;
  color: #ff4444;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  border-radius: 4px;
}

.rss-manage-item .delete-rss-btn:hover {
  background: rgba(255, 68, 68, 0.1);
}

.rss-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) var(--color-surface);
}

.rss-list::-webkit-scrollbar {
  width: 6px;
}

.rss-list::-webkit-scrollbar-thumb {
  background-color: var(--color-primary);
  border-radius: 3px;
}

.rss-list::-webkit-scrollbar-track {
  background: transparent;
}

.rss-item {
  padding: 1rem;
  background: rgba(var(--color-primary), 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all 0.2s var(--transition-timing);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.rss-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--color-primary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.rss-item:hover {
  transform: translateX(4px);
  border-color: var(--color-primary);
  background: rgba(var(--color-primary), 0.1);
}

.rss-item:hover::before {
  transform: scaleY(1);
}

.rss-item h3 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.rss-item p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rss-meta {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-family: monospace;
  opacity: 0.6;
}

/* Modal Content Adjustments */
.modal-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

/* Toast Adjustments */
.toast {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

/* Shortcuts Help Modal */
.shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

kbd {
  background: rgba(75, 43, 238, 0.2);
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: monospace;
  font-weight: bold;
  color: var(--color-primary);
  min-width: 30px;
  text-align: center;
  box-shadow: 0 2px 0 var(--color-primary-dark);
}

[data-theme="light"] kbd {
  background: #eee;
  border-color: #ccc;
  color: #333;
  box-shadow: 0 2px 0 #999;
}

/* Custom scrollbar for sidebar */
.rss-list::-webkit-scrollbar {
  width: 8px;
  background: rgba(0, 0, 0, 0.1);
}

.rss-list::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
}

.rss-list::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

@media (max-width: 900px) {
  .main-container {
    flex-direction: column;
  }

  .rss-sidebar {
    width: 100%;
    height: 300px;
    border-left: none;
    border-top: 1px solid var(--color-border);
  }
}

.rss-scroll-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.rss-scroll-controls button {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.rss-scroll-controls button:hover {
  background: var(--color-primary);
  color: white;
  transform: scale(1.1);
  border-color: var(--color-primary);
}

/* Quick Notes Widget */
.notes-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 320px;
  height: 400px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s var(--transition-timing), opacity 0.3s ease;
}

.notes-widget.hidden {
  display: flex;
  /* Keep flex to maintain layout when showing */
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
}

.notes-header {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px 12px 0 0;
  cursor: grab;
}

.notes-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.notes-actions button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 0 0.25rem;
  transition: color 0.2s;
}

.notes-actions button:hover {
  color: var(--color-primary);
}

.notes-widget textarea {
  flex: 1;
  background: transparent;
  border: none;
  padding: 1rem;
  resize: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--color-text);
  outline: none;
  line-height: 1.5;
}

.notes-widget textarea::placeholder {
  opacity: 0.5;
}

/* RSS Images */
.rss-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.1);
}

/* Main Layout Wrapper */
.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Google Search Container */
.google-search-container {
  padding: 2rem 2rem 0.5rem 2rem;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  animation: slideDown 0.5s var(--transition-timing);
  z-index: 50;
}

.google-search-container form {
  position: relative;
  width: 100%;
  max-width: 600px;
}

.google-search-container input {
  width: 100%;
  padding: 1rem 1rem 1rem 3.5rem;
  border-radius: 50px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s var(--transition-timing);
  backdrop-filter: blur(10px);
}

.google-search-container input:focus {
  outline: none;
  box-shadow: 0 8px 25px rgba(var(--color-primary-rgb), 0.3);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.search-icon-g {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--color-primary);
  pointer-events: none;
  font-family: 'Space Grotesk', sans-serif;
}

.rss-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* RSS Management Styles */
.rss-manage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  cursor: default;
}

.rss-manage-item .drag-handle {
  cursor: grab;
  margin-right: 1rem;
  opacity: 0.5;
  font-size: 1.2rem;
  user-select: none;
}

.rss-manage-item .drag-handle:active {
  cursor: grabbing;
}

.rss-manage-item span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}

.rss-manage-item .delete-rss-btn {
  background: none;
  border: none;
  color: #ff4444;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.5rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.rss-manage-item .delete-rss-btn:hover {
  opacity: 1;
}

/* SortableJS Styles */
.sortable-ghost {
  opacity: 0.3;
  background: var(--color-primary) !important;
}

.sortable-chosen {
  background: rgba(var(--color-primary), 0.1) !important;
}

/* Network Status Zone Styles */
.network-zone {
  background: linear-gradient(135deg, var(--color-surface), rgba(var(--color-primary-rgb), 0.05));
}

.network-devices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.network-device {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.network-device.online {
  border-left-color: #4ade80;
}

.network-device.offline {
  border-left-color: #ef4444;
  opacity: 0.7;
}

.network-device:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: translateX(4px);
}

.device-status {
  font-size: 1rem;
  line-height: 1;
}

.device-name {
  font-weight: 600;
  flex: 1;
}

.device-host {
  font-family: monospace;
  font-size: 0.75rem;
  opacity: 0.6;
}

.device-latency {
  font-size: 0.75rem;
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.device-latency.high-latency {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.network-loading,
.network-empty,
.network-error {
  text-align: center;
  padding: 1.5rem;
  opacity: 0.6;
}

.network-empty p,
.network-error p {
  margin: 0.5rem 0;
  opacity: 0.8;
}

.network-empty small,
.network-error small {
  font-size: 0.75rem;
  opacity: 0.6;
}

.network-last-check {
  font-size: 0.7rem;
  text-align: right;
  opacity: 0.5;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}

.refresh-network-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.7;
  transition: transform 0.2s, opacity 0.2s;
  padding: 0;
}

.refresh-network-btn:hover {
  opacity: 1;
  transform: rotate(180deg);
}