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

:root {
  --accent: #E07A3C;
  --accent-hover: #C65D1E;
  --accent-light: #FEF3E2;
  --bg: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --bg-tertiary: #F3F4F6;
  --text: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --error: #EF4444;
  --error-bg: #FEE2E2;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.125rem;
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-tertiary);
}

.nav-link svg {
  width: 16px;
  height: 16px;
}

.nav-more {
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
}

.btn-google {
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #dadce0;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.btn-google svg {
  flex-shrink: 0;
}

.btn-signin {
  padding: 6px 12px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

.btn-icon:hover {
  background: var(--bg-tertiary);
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-icon.copied {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Hero Section */
.hero {
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--bg) 100%);
  padding: 80px 24px 60px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* Search Container */
.search-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px 4px 4px 16px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 560px;
}

.search-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  min-width: 200px;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.btn-extract {
  padding: 12px 24px;
  font-size: 0.9375rem;
}

.search-divider {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.btn-secondary-action {
  padding: 12px 20px;
}

/* Search Box Wrapper for positioning suggestions */
.search-box-wrapper {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.search-box-wrapper .search-box {
  max-width: none;
}

/* Domain Suggestions Dropdown */
.suggestions-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 50;
  overflow: hidden;
  animation: slideDown 0.15s ease-out;
}

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

.suggestions-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.suggestions-header svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.suggestions-list {
  max-height: 240px;
  overflow-y: auto;
}

.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border-light);
}

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

.suggestion-item:hover {
  background: var(--bg-secondary);
}

.suggestion-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.suggestion-favicon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.suggestion-domain {
  font-weight: 500;
  color: var(--text);
}

.suggestion-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.suggestion-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.suggestion-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.suggestion-stat svg {
  width: 12px;
  height: 12px;
}

.suggestion-view-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.suggestion-view-btn:hover {
  background: var(--accent-hover);
}

.spinner {
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Main Content */
.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}

/* Error Message */
.error-message {
  background: var(--error-bg);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 0.9375rem;
}

/* Results Section */
.results-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
}

.results-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.results-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-domain {
  font-weight: 600;
  color: var(--accent);
  font-size: 1rem;
}

.results-time {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-download {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-download svg {
  width: 18px;
  height: 18px;
}

.btn-download.btn-success {
  background: var(--accent);
  border-color: var(--accent);
}

/* Tabs */
.tabs-container {
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  overflow-x: auto;
}

.tabs {
  display: flex;
  gap: 4px;
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  margin-bottom: -1px;
}

.tab svg {
  width: 18px;
  height: 18px;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab-badge {
  background: var(--accent);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
}

/* Tab Panels */
.tab-panels {
  padding: 24px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel-section {
  margin-bottom: 32px;
}

.panel-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

/* Color Grid */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.color-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.color-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.color-swatch {
  height: 56px;
}

.color-info {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}

.color-hex {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.color-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: capitalize;
}

/* Token List */
.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.token-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.8125rem;
  color: var(--text);
  transition: all 0.2s;
}

.token-item:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.token-item.primary {
  background: var(--accent-light);
  border-color: var(--accent);
}

/* Spacing Visual */
.spacing-visual {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.spacing-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius);
}

.spacing-bar {
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

.spacing-value {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.8125rem;
  color: var(--text);
}

/* Shadow List */
.shadow-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shadow-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius);
}

.shadow-preview {
  width: 100%;
  height: 40px;
  background: var(--bg);
  border-radius: 6px;
  margin-bottom: 10px;
}

.shadow-value {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  word-break: break-all;
}

/* Code Tabs */
.code-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.code-tab {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.code-tab:hover {
  background: var(--bg);
  color: var(--text);
}

.code-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.code-panels {
  position: relative;
}

.code-panel {
  display: none;
}

.code-panel.active {
  display: block;
}

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

.code-header span {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-family: 'SF Mono', Monaco, monospace;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.copy-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.copy-btn.copied {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.code-block {
  background: #1E293B;
  color: #E2E8F0;
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-word;
  max-height: 400px;
  min-height: 100px;
}

/* History Section */
.history-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.history-header h2 {
  font-size: 1rem;
  font-weight: 600;
}

.history-tabs {
  display: flex;
  gap: 4px;
}

.history-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.history-tab svg {
  width: 16px;
  height: 16px;
}

.history-tab:hover {
  color: var(--text);
  background: var(--bg-tertiary);
}

.history-tab.active {
  color: var(--accent);
  background: var(--accent-light);
}

.history-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.history-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.history-search svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.history-search input {
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  width: 180px;
}

.history-search input:focus {
  outline: none;
}

.history-search input::placeholder {
  color: var(--text-muted);
}

.history-count {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.history-table {
  min-height: 200px;
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.history-empty svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.history-empty p {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.history-empty span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.history-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s;
}

.history-row:hover {
  background: var(--bg-secondary);
}

.history-row:last-child {
  border-bottom: none;
}

.history-main {
  flex: 1;
  cursor: pointer;
}

.history-domain {
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.history-main:hover .history-domain {
  color: var(--accent);
}

.history-stats {
  display: flex;
  gap: 12px;
}

.history-stat {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.history-tokens {
  color: var(--accent);
  font-weight: 500;
}

.history-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 80px;
}

.history-time {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.history-views {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-action {
  display: flex;
  justify-content: center;
  padding: 8px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}

.history-action:hover {
  background: var(--bg-tertiary);
}

.history-action svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

/* Footer */
/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 32px;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 12px;
}

.footer-logo img {
  width: 24px;
  height: 24px;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-column h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 8px;
}

.footer-column a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-column a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-left a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.footer-left a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .footer-main {
    flex-direction: column;
    gap: 32px;
  }

  .footer-brand {
    max-width: none;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 32px;
  }
}

/* Support Button */
.support-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--text);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
  z-index: 50;
}

.support-btn svg {
  width: 18px;
  height: 18px;
}

.support-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgb(0 0 0 / 0.2);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.5);
}

.modal-content {
  position: relative;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  margin: 24px;
  box-shadow: 0 20px 40px -8px rgb(0 0 0 / 0.2);
}

.modal-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal-content p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 20px;
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 20px;
}

.modal-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Existing Extraction Modal */
.existing-modal {
  max-width: 450px;
  text-align: center;
}

.existing-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: 50%;
}

.existing-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.existing-modal h3 {
  text-align: center;
}

.existing-modal p {
  text-align: center;
}

.existing-modal p strong {
  color: var(--accent);
}

.existing-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.existing-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.existing-actions {
  justify-content: center;
}

.existing-actions .btn svg {
  width: 16px;
  height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .search-container {
    flex-direction: column;
  }

  .search-box {
    max-width: 100%;
  }

  .btn-secondary-action {
    width: 100%;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .history-row {
    grid-template-columns: 1fr 60px;
  }

  .history-colors,
  .history-fonts,
  .history-time {
    display: none;
  }
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}

.user-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.user-dropdown-trigger:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.dropdown-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: transform 0.2s;
}

.user-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 8px;
  display: none;
  z-index: 100;
}

.user-dropdown.open .user-dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--bg-tertiary);
}

.dropdown-item svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* Auth Modals */
.auth-modal {
  max-width: 420px;
}

.auth-form {
  width: 100%;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-transform: lowercase;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-error {
  padding: 12px 16px;
  background: var(--error-bg);
  color: var(--error);
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.form-success {
  padding: 12px 16px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.auth-links {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.auth-links a {
  color: var(--accent);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-links a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Loading state for buttons */
.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Pagination Styles */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 0;
}

.pagination .btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination .btn-sm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

/* Total themes count */
.total-themes {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

.total-themes span {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.total-themes span strong {
  color: var(--text-primary);
}
