/* Design Style Prompts — ProWebCare Tools (aligned with convert-case tokens) */

:root {
  --primary: #00e556;
  --primary-dim: rgba(0, 229, 86, 0.1);
  --primary-glow: #00e556;
  --bg-main: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-surface: #ffffff;
  --surface-light: #ffffff;
  --text-main: #0b0b0b;
  --text-muted: #4b5563;
  --text-light: #6b7280;
  --border-color: #e2e8f0;
  --border-light: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(0, 229, 86, 0.3);
}

html.dark {
  --bg-main: #030303;
  --bg-secondary: #0a0a0a;
  --bg-surface: #0f0f0f;
  --surface-light: #0f0f0f;
  --text-main: #ffffff;
  --text-muted: #a0a0a0;
  --text-light: #6b7280;
  --border-color: #262626;
  --border-light: #262626;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(0, 229, 86, 0.4);
}

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

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

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.tool-header {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.88);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

html.dark .tool-header {
  background: rgba(3, 3, 3, 0.8);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.25rem;
  transition: color 0.3s ease;
}

.logo-link:hover {
  color: var(--primary);
}

.logo-badge {
  background: var(--primary-dim);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin-right: 16px;
  background: var(--surface-light);
  padding: 4px;
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  transition: all 0.2s ease;
}

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

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

.nav-link .material-icons-outlined {
  font-size: 18px;
}

@media (max-width: 768px) {
  .nav-link span:not(.material-icons-outlined) {
    display: none;
  }
  .nav-link {
    padding: 8px 12px;
    min-width: 40px;
    justify-content: center;
  }
  .header-nav {
    margin-right: 8px;
  }
}

.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-main);
}

.theme-toggle:hover {
  background: var(--primary-dim);
  border-color: var(--primary);
  transform: scale(1.05);
}

.theme-icon-light,
.theme-icon-dark {
  font-size: 20px;
}

html.dark .theme-icon-light {
  display: none;
}

html:not(.dark) .theme-icon-dark {
  display: none;
}

.tool-main {
  flex: 1;
  padding: 40px 0;
}

.hero-section {
  text-align: center;
  margin-bottom: 28px;
}

.hero-kicker {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.15;
}

.text-glow {
  background: linear-gradient(135deg, var(--primary) 0%, #00c44a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 8px;
}

.hero-hint {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-top: 8px;
}

.hero-hint kbd {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.privacy-notice {
  background: var(--primary-dim);
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.privacy-notice-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.privacy-icon {
  color: var(--primary);
  font-size: 24px;
  flex-shrink: 0;
}

.privacy-text {
  color: var(--text-main);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.privacy-text strong {
  color: var(--primary);
  font-weight: 600;
}

.dsp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px 28px;
  margin-bottom: 24px;
  padding: 20px 22px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.dsp-filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dsp-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.dsp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dsp-chip {
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.dsp-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.dsp-chip[aria-pressed="true"] {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.dsp-count {
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--text-muted);
  align-self: center;
}

@media (max-width: 640px) {
  .dsp-count {
    width: 100%;
    margin-left: 0;
  }
}

.dsp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.dsp-card {
  text-align: left;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px 18px 16px;
  background: var(--bg-surface);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 168px;
}

.dsp-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.dsp-card:focus {
  outline: none;
}

.dsp-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.dsp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.dsp-card-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
}

.dsp-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.dsp-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.dsp-badge.mode-light {
  background: rgba(255, 248, 220, 0.35);
}

html:not(.dark) .dsp-badge.mode-light {
  background: #fff8dc;
  color: #5c4a00;
}

.dsp-badge.mode-dark {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
}

html:not(.dark) .dsp-badge.mode-dark {
  color: #4338ca;
  background: rgba(67, 56, 202, 0.08);
}

.dsp-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.dsp-card-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.dsp-card-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.dsp-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  border-radius: 14px;
}

/* Modal */
.dsp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dsp-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 720px) {
  .dsp-modal-overlay {
    align-items: center;
  }
}

.dsp-modal {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 720px;
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}

.dsp-modal-overlay.is-open .dsp-modal {
  transform: translateY(0);
}

.dsp-modal-header {
  padding: 20px 22px 12px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dsp-modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.dsp-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}

.dsp-modal-close:hover {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.dsp-modal-body {
  padding: 16px 22px 22px;
  overflow-y: auto;
  flex: 1;
}

.dsp-modal-summary {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.dsp-prompt-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.dsp-prompt-text {
  width: 100%;
  min-height: 220px;
  padding: 14px 16px;
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.55;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text-main);
  resize: vertical;
}

.dsp-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.dsp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.dsp-btn-primary {
  background: var(--primary);
  color: #000;
}

.dsp-btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

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

.dsp-btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.info-section {
  margin-top: 20px;
}

.info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}

.info-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
}

.info-content p {
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.faq-item {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

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

.faq-item h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  font-family: 'Space Grotesk', sans-serif;
}

.faq-item p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.tool-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  margin-top: auto;
}

.footer-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 300;
  max-width: 320px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success .toast-message::before {
  content: '✓ ';
  color: var(--primary);
  font-weight: 700;
}

.toast-message {
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.9375rem;
}

button:focus-visible,
.dsp-chip:focus-visible,
.dsp-card:focus-visible,
.dsp-modal-close:focus-visible,
.dsp-prompt-text:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  .tool-main {
    padding: 28px 0;
  }
  .info-card {
    padding: 22px 18px;
  }
  .privacy-notice-content {
    flex-direction: column;
    text-align: center;
  }
  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
  }
}

body.dsp-modal-open {
  overflow: hidden;
}
