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

/* Base theme variables - Light theme (default) */
:root,
html[data-theme="light"] {
  --primary: #DAA520;
  --primary-hover: #B8860B;
  --background: #fafafa;
  --surface: #ffffff;
  --border: #e0e0e0;
  --text: #1a1a1a;
  --text-secondary: #666666;
  --error: #d32f2f;
  --success: #388e3c;
  --radius: 12px;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Dark theme */
html[data-theme="dark"] {
  --primary: #4a9eff;
  --primary-hover: #2a7fd9;
  --background: #1e1e1e;
  --surface: #2d2d2d;
  --border: #404040;
  --text: #f5f5f5;
  --text-secondary: #b0b0b0;
  --error: #f44336;
  --success: #4caf50;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Matrix theme - Gruvbox colors */
html[data-theme="matrix"] {
  --primary: #b8bb26;
  --primary-hover: #98971a;
  --background: #282828;
  --surface: #3c3836;
  --border: #504945;
  --text: #ebdbb2;
  --text-secondary: #a89984;
  --error: #fb4934;
  --success: #b8bb26;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --font-family: 'Iosevka', 'Courier New', monospace;
}

html[data-theme="matrix"] * {
  font-family: var(--font-family) !important;
}

body {
  font-family: var(--font-family);
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  width: 100%;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

.header-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.header-logo {
  width: 48px;
  height: 48px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
}

.tagline {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.state-container {
  background: var(--background);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.error-message {
  color: var(--error);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.error-hint {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

#empty h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

#empty p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

#empty a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

#empty a:hover {
  text-decoration: underline;
}

#content {
  background: var(--background);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.extension-banner {
  background: var(--primary);
  color: var(--background);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--primary-hover);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.banner-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.banner-text {
  flex: 1;
  min-width: 200px;
}

.banner-text strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
}

.banner-button {
  background: var(--background);
  color: var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
  white-space: nowrap;
  border: 2px solid var(--primary-hover);
}

.banner-button:hover {
  background: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tab-count {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  text-align: center;
}

.tab-count span {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.actions {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.primary-button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.2s;
}

.primary-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.primary-button:active {
  transform: translateY(0);
}

.hint {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.hint span {
  font-weight: 600;
  color: var(--text);
}

.tab-list h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text);
}

#tabs-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tab-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s;
}

.tab-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.tab-info {
  flex: 1;
  min-width: 0;
  margin-right: 1rem;
}

.tab-domain {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.tab-url {
  color: var(--text-secondary);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-action {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-action:hover {
  background: var(--primary-hover);
}

footer {
  margin-top: auto;
  padding-top: 3rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

footer a:hover {
  color: var(--primary);
}

.privacy-note {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

@media (max-width: 640px) {
  h1 {
    font-size: 2rem;
  }

  .container {
    padding: 1rem;
  }

  #content {
    padding: 1.5rem;
  }

  .tab-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .tab-info {
    margin-right: 0;
  }

  .tab-action {
    width: 100%;
    text-align: center;
  }
}
