body {
  font-family: 'SF Pro Display', 'SF Pro Text', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background: linear-gradient(135deg, #0c0f16 0%, #181c24 50%, #1a1f28 100%);
  margin: 0;
  padding: 0;
  color: #e5e7ef;
  min-height: 100vh;
  line-height: 1.6;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 {
  text-align: center;
  margin-top: 2.5rem;
  margin-bottom: 2rem;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: #f3f4fa;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  border-radius: 2px;
}

ul {
  list-style: none;
  padding: 0;
  max-width: 520px;
  margin: 0 auto;
}

/* Legacy li styles - kept for compatibility but overridden by product-card */

strong {
  font-size: 1.15rem;
  font-weight: 500;
  color: #f3f4fa;
  margin-bottom: 0.2rem;
}

.product-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 1rem;
  color: #6b7280;
}

.product-meta span {
  white-space: nowrap;
}

a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  margin-top: 0.5rem;
  align-self: flex-start;
  transition: color 0.18s;
}

a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

hr {
  display: none;
}

p {
  text-align: center;
  color: #a0aec0;
  margin-top: 4rem;
  font-size: 1.15rem;
}

.tab-bar {
  display: flex;
  justify-content: center;
  margin: 2rem auto 0 auto;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 0 1rem;
}
.tab-btn {
  background: #23273a;
  border: 1.5px solid #353a4a;
  border-radius: 12px 12px 0 0;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  color: #e5e7ef;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  position: relative;
  flex: 1;
  max-width: 150px;
}
.tab-btn:first-child {
  margin-left: 0;
}
.tab-btn:last-child {
  margin-right: 0;
}
.tab-btn + .tab-btn {
  margin-left: 0.5rem;
}
.tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}
.tab-btn:not(.active):hover {
  background: #2a2f42;
  border-color: #4a5568;
  transform: translateY(-1px);
}
.tab-content {
  display: none;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.tab-content.active {
  display: block;
}

.dashboard-section {
  background: linear-gradient(135deg, #23273a 0%, #252938 100%);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
  margin-bottom: 2.5rem;
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.dashboard-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.dashboard-section h2 {
  color: #f3f4fa;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-section h2::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  border-radius: 2px;
}

/* Section header with watcher status */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  margin-bottom: 0;
}

/* Status indicators container */
.status-indicators {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

/* Watcher status indicator */
.watcher-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(24, 28, 36, 0.6);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Auto-refresh countdown indicator */
.auto-refresh-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: rgba(16, 90, 162, 0.2);
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: #60a5fa;
  font-family: 'SF Pro Display', 'SF Pro Text', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
  animation: pulse-dot 2s infinite;
}

.status-dot.running {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.status-dot.stopped {
  background: #ef4444;
}

.status-text {
  color: #a0aec0;
  white-space: nowrap;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.product-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #2a2f3a 0%, #252938 100%);
  border-radius: 16px;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
  margin-bottom: 1.2rem;
  padding: 1.5rem 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #2563eb, #60a5fa, #3b82f6);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 2px 2px 0 0;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px 0 rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.product-card:hover::before {
  opacity: 1;
}

.product-card.price-alert {
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: linear-gradient(135deg, #1e3a2e 0%, #22c55e15 100%);
}

.product-card.price-alert::before {
  background: linear-gradient(90deg, #22c55e, #16a34a);
  opacity: 1;
}
.product-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.product-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: #f3f4fa;
  margin-bottom: 0.2rem;
  line-height: 1.4;
}
.product-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: #a0aec0;
  font-weight: 500;
}

.product-meta .price-indicator {
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-meta .price-indicator.above-target {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.product-meta .price-indicator.below-target {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.product-link {
  font-size: 0.95rem;
  color: #60a5fa;
  text-decoration: none;
  margin-top: 0.3rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.product-link:hover {
  color: #3b82f6;
  text-decoration: none;
  transform: translateX(2px);
}

.product-link::after {
  content: '↗';
  font-size: 0.8rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.product-link:hover::after {
  transform: translate(2px, -2px);
}
.product-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: 1.5rem;
}

.product-actions button {
  background: rgba(30, 34, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  cursor: pointer;
  color: #a0aec0;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.product-actions button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.product-actions button:hover::before {
  left: 100%;
}

.product-actions .edit-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.product-actions .delete-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Beautiful Add Product Container */
.add-product-container {
  margin-top: 2rem;
  background: linear-gradient(135deg, #1a1f28 0%, #181c24 100%);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.add-product-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #2563eb, #60a5fa, #3b82f6);
}

.add-product-header {
  background: linear-gradient(135deg, #23273a 0%, #252938 100%);
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.add-product-header h3 {
  color: #f3f4fa;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.add-product-header p {
  color: #a0aec0;
  font-size: 0.9rem;
  margin: 0;
  text-align: left;
}

.add-product-form {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: end;
}

.input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  color: #e5e7ef;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.add-product-form input[type="url"],
.add-product-form input[type="number"],
.add-product-form input[type="text"] {
  padding: 1rem 1.2rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(35, 39, 58, 0.5);
  color: #e5e7ef;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.add-product-form input::placeholder {
  color: #6b7280;
  font-weight: 400;
}

.add-product-form input:focus {
  border: 2px solid #2563eb;
  background: rgba(35, 39, 58, 0.8);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.add-btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 160px;
  justify-content: center;
  height: fit-content;
  align-self: flex-end;
  margin-top: 1.7rem; /* Align with input field height + label */
}

.add-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.add-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.add-btn:hover::before {
  left: 100%;
}

.add-btn:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.1rem;
}

.btn-text {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-form {
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.card-form input[type="text"],
.card-form input[type="url"],
.card-form input[type="number"] {
  padding: 1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(24, 28, 36, 0.6);
  color: #e5e7ef;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.card-form input::placeholder {
  color: #6b7280;
}

.card-form input:focus {
  border: 1px solid #2563eb;
  background: rgba(24, 28, 36, 0.9);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.card-form button[type="submit"] {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.card-form button[type="submit"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.card-form button[type="submit"]:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.card-form button[type="submit"]:hover::before {
  left: 100%;
}

.current-value {
  color: #a0aec0;
  font-size: 0.95rem;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(24, 28, 36, 0.4);
  border-radius: 10px;
  border-left: 3px solid #2563eb;
  font-family: 'SF Pro Display', 'SF Pro Text', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.current-value * {
  color: #a0aec0 !important;
}

.current-value strong {
  color: #f3f4fa !important;
  font-weight: 600;
}

.current-value .success {
  color: #22c55e !important;
}

.current-value .error {
  color: #ef4444 !important;
}

/* Countdown styling */
.countdown {
  font-family: 'SF Pro Display', 'SF Pro Text', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-weight: 600;
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Watcher control buttons */
.watcher-btn {
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.watcher-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.watcher-btn:hover::before {
  left: 100%;
}

.start-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.start-btn:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.start-btn:disabled {
  background: #374151;
  color: #6b7280;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.stop-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.stop-btn:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.stop-btn:disabled {
  background: #374151;
  color: #6b7280;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading and status indicators */
.loading {
  color: #60a5fa;
  animation: pulse 1.5s infinite;
}

.error {
  color: #ef4444;
}

.success {
  color: #22c55e;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Fix for dark text in browser elements */
input, textarea, select, option, button {
  color: #e5e7ef !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px rgba(35, 39, 58, 0.8) inset !important;
  -webkit-text-fill-color: #e5e7ef !important;
  color: #e5e7ef !important;
}

/* Ensure all button text is visible */
button, input[type="button"], input[type="submit"] {
  color: #e5e7ef !important;
}

button:disabled {
  color: #6b7280 !important;
}

/* Select dropdown styling */
select {
  background: rgba(35, 39, 58, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #e5e7ef !important;
  border-radius: 8px;
  padding: 0.5rem;
}

select option {
  background: #23273a !important;
  color: #e5e7ef !important;
}

/* Responsive design */
@media (max-width: 768px) {
  .dashboard-section {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .tab-bar {
    margin: 1.5rem 1rem 0 1rem;
    padding: 0;
  }
  
  .tab-btn {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    min-width: 80px;
    border-radius: 8px;
  }
  
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .add-btn {
    min-width: auto;
    width: 100%;
    margin-top: 0.5rem;
    align-self: stretch;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .watcher-status-indicator {
    align-self: flex-end;
  }
  
  .product-actions {
    flex-direction: column;
    margin-left: 1rem;
  }
  
  h1 {
    font-size: 1.8rem;
    margin-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .tab-bar {
    margin: 1rem 0.5rem 0 0.5rem;
    gap: 0.25rem;
  }
  
  .tab-btn {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    min-width: 60px;
    max-width: none;
    flex: 1;
  }
  
  .dashboard-section {
    margin: 0.5rem;
    padding: 1rem;
  }
  
  .add-product-header {
    padding: 1rem 1.5rem;
  }
  
  .add-product-form {
    padding: 1.5rem;
  }
  
  .section-header {
    align-items: center;
  }
  
  .watcher-status-indicator {
    align-self: center;
    font-size: 0.8rem;
  }
  
  h1 {
    font-size: 1.6rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }
}

::-webkit-scrollbar {
  width: 10px;
  background: #23273a;
}
::-webkit-scrollbar-thumb {
  background: #181c24;
  border-radius: 8px;
} 