/* ============================================
   シズカ - AIノイズ除去 無料サイト
   Base design: シャキッ reference
   ============================================ */

:root {
  --bg: #f5f5f5;
  --bg2: #fff;
  --bg3: #ececec;
  --border: #e0e0e0;
  --cyan: #0ea5e9;
  --cyan-dim: #0284c7;
  --green: #10b981;
  --red: #ef4444;
  --text: #1a1a1a;
  --text-dim: #999;
  --text-mid: #666;
  --shadow: 0 1px 3px #00000014;
}

[data-theme="dark"] {
  --bg: #0a0e17;
  --bg2: #0f1520;
  --bg3: #141c2d;
  --border: #1e2d48;
  --cyan: #00d4ff;
  --cyan-dim: #007a9a;
  --text: #c8d8f0;
  --text-dim: #5a7090;
  --text-mid: #8aa0c0;
  --shadow: 0 1px 3px #0000004d;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
}

#app {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ── Header ── */
.header {
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  width: 100%;
  margin-bottom: 0;
}

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

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

.header-logo-link {
  align-items: center;
  text-decoration: none;
  display: flex;
  gap: 8px;
}

.header-logo-icon {
  font-size: 24px;
}

.header-logo-text {
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
}

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

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

.privacy-badge {
  color: var(--text-mid);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  display: flex;
}

.theme-toggle {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  gap: 4px;
  padding: 2px;
  display: flex;
}

.theme-btn {
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1;
  transition: background 0.15s;
}

.theme-btn.active {
  background: var(--bg2);
  box-shadow: var(--shadow);
}

/* ── Info Bar ── */
.info-bar {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-mid);
  box-shadow: var(--shadow);
}

/* ── Drop Zone ── */
.drop-zone {
  border: 2px dashed var(--border);
  text-align: center;
  cursor: pointer;
  background: var(--bg2);
  border-radius: 12px;
  padding: 48px;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--cyan);
  background: #0ea5e90a;
}

[data-theme="dark"] .drop-zone:hover,
[data-theme="dark"] .drop-zone.drag-over {
  background: #00d4ff0a;
}

.drop-zone.has-file {
  border-style: solid;
  border-color: var(--green);
  cursor: default;
}

.drop-icon {
  margin-bottom: 12px;
  font-size: 48px;
  display: block;
}

.drop-hint {
  color: var(--text-dim);
  margin-top: 8px;
  font-size: 12px;
}

/* ── File Info ── */
.file-info {
  margin-top: 16px;
}

.file-info-inner {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-info-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.file-info-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-info-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-info-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.file-remove-btn {
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}

.file-remove-btn:hover {
  color: var(--red);
  border-color: var(--red);
}

/* ── Controls ── */
.controls {
  margin: 24px 0;
}

.controls-row {
  justify-content: center;
  align-items: center;
  gap: 16px;
  display: flex;
}

/* ── Model Selector ── */
.model-selector {
  margin-bottom: 16px;
}

.model-selector > label {
  display: block;
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 10px;
}

.model-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.model-option {
  cursor: pointer;
  display: block;
}

.model-option input[type="radio"] {
  display: none;
}

.model-card {
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 14px 12px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.model-option input[type="radio"]:checked + .model-card {
  border-color: var(--cyan);
  background: #0ea5e90a;
}

[data-theme="dark"] .model-option input[type="radio"]:checked + .model-card {
  background: #00d4ff0a;
}

.model-card:hover {
  border-color: var(--text-dim);
}

.model-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.model-card-desc {
  font-size: 12px;
  color: var(--text-mid);
}

.model-card-size {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.btn-primary {
  background: var(--cyan);
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-cancel {
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  padding: 6px 20px;
  font-size: 13px;
  margin-top: 12px;
  transition: color 0.15s, border-color 0.15s;
}

.btn-cancel:hover {
  color: var(--red);
  border-color: var(--red);
}

/* ── Status / Progress ── */
.status {
  text-align: center;
  margin: 24px 0;
}

.status-text {
  color: var(--text-mid);
  margin-bottom: 12px;
  font-size: 14px;
}

.progress-bar {
  background: var(--bg3);
  border-radius: 2px;
  height: 4px;
  overflow: hidden;
}

.progress-fill {
  background: var(--cyan);
  width: 0%;
  height: 100%;
  transition: width 0.3s;
}

/* ── Audio Preview ── */
.preview {
  margin: 24px 0;
}

.preview-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}

.preview-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.preview-tab {
  flex: 1;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.15s, background 0.15s;
  position: relative;
}

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

.preview-tab.active {
  color: var(--cyan);
}

.preview-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cyan);
}

.preview-body {
  padding: 20px;
}

.player-section audio {
  width: 100%;
}

/* ── Download ── */
.download-area {
  text-align: center;
  margin: 24px 0;
}

/* ── Info Section ── */
.info-section {
  flex-direction: column;
  gap: 24px;
  margin-top: 48px;
  display: flex;
}

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}

.card-header {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  display: flex;
}

.card-header span {
  font-size: 18px;
}

.card-header h2 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.card-body {
  padding: 20px;
}

.how-to-steps {
  flex-direction: column;
  gap: 16px;
  display: flex;
}

.step {
  align-items: flex-start;
  gap: 16px;
  display: flex;
}

.step-number {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-dim) 100%);
  color: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
}

.step-content h3 {
  color: var(--text);
  margin-bottom: 4px;
  font-size: 0.95rem;
  font-weight: 600;
}

.step-content p {
  color: var(--text-mid);
  font-size: 0.85rem;
  line-height: 1.7;
}

.features {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  display: grid;
}

.feature {
  background: var(--bg3);
  border-radius: 6px;
  padding: 16px;
}

.feature h3 {
  color: var(--text);
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.feature p {
  color: var(--text-mid);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ── Model Guide ── */
.model-guide-intro {
  color: var(--text-mid);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.model-guide {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.model-guide-item {
  background: var(--bg3);
  border-radius: 6px;
  padding: 16px;
}

.model-guide-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.model-guide-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.model-guide-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  color: #fff;
}

.badge-fast {
  background: var(--green);
}

.badge-balance {
  background: var(--cyan);
}

.badge-quality {
  background: #8b5cf6;
}

.model-guide-specs {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.model-guide-specs a {
  color: var(--text-dim);
  text-decoration: underline;
  transition: color 0.15s;
}

.model-guide-specs a:hover {
  color: var(--text);
}

.model-guide-item > p {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.7;
}

.model-guide-tip {
  background: var(--bg3);
  border-radius: 6px;
  padding: 16px;
  margin-top: 16px;
}

.model-guide-tip h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.model-guide-tip ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.model-guide-tip li {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.model-guide-tip li::before {
  content: '▶';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.65rem;
  color: var(--cyan);
}

.model-guide-tip > p {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ── Noise Examples ── */
.noise-examples {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.noise-category h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.noise-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.noise-list li {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.6;
  padding-left: 24px;
  position: relative;
}

.noise-list li::before {
  position: absolute;
  left: 0;
  top: 0;
}

.noise-list-good li::before {
  content: '✅';
}

.noise-list-weak li::before {
  content: '⚠️';
}

/* ── Use Cases ── */
.use-cases {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.use-case {
  background: var(--bg3);
  border-radius: 6px;
  padding: 16px;
}

.use-case h3 {
  color: var(--text);
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.use-case p {
  color: var(--text-mid);
  font-size: 0.82rem;
  line-height: 1.7;
}

/* ── Promo Banner ── */
.promo-banner {
  text-align: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid #0f3460;
  border-radius: 8px;
  margin-top: 24px;
  padding: 24px;
}

.promo-banner-label {
  color: #a0a0a0;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.promo-banner-title {
  color: #fff;
  margin-bottom: 8px;
  font-size: 1.5rem;
  font-weight: 700;
}

.promo-banner-subtitle {
  color: #888;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.promo-banner-btn {
  color: #fff;
  background: linear-gradient(135deg, #e94560 0%, #c73659 100%);
  border-radius: 4px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}

.promo-banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #e9456066;
}

.promo-chidimeru {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-color: #0f3460;
}

.promo-chidimeru-btn {
  background: linear-gradient(135deg, #e94560 0%, #c73659 100%);
}

.promo-chidimeru-btn:hover {
  box-shadow: 0 4px 12px #e9456066;
}

.promo-shaki {
  background: linear-gradient(135deg, #0a192f 0%, #112240 100%);
  border-color: #1e3a5f;
}

.promo-shaki-btn {
  background: linear-gradient(135deg, #6c5ce7 0%, #5a4bd1 100%);
}

.promo-shaki-btn:hover {
  box-shadow: 0 4px 12px #6c5ce766;
}

.promo-osameru {
  background: linear-gradient(135deg, #0a192f 0%, #112240 100%);
  border-color: #1e3a5f;
}

.promo-osameru-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.promo-osameru-btn:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.promo-kieruka {
  background: linear-gradient(135deg, #0a192f 0%, #112240 100%);
  border-color: #1e3a5f;
}

.promo-kieruka-btn {
  background: linear-gradient(135deg, #e94560 0%, #c73659 100%);
}

.promo-kieruka-btn:hover {
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

.promo-tsumeru {
  background: linear-gradient(135deg, #0a192f 0%, #112240 100%);
  border-color: #1e3a5f;
}

.promo-tsumeru-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.promo-tsumeru-btn:hover {
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.promo-mojisu {
  background: linear-gradient(135deg, #0a192f 0%, #112240 100%);
  border-color: #1e3a5f;
}

.promo-mojisu-btn {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.promo-mojisu-btn:hover {
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.promo-hatomega {
  background: linear-gradient(135deg, #0a192f 0%, #112240 100%);
  border-color: #1e3a5f;
}

.promo-hatomega-btn {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.promo-hatomega-btn:hover {
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.promo-hatomeru {
  background: linear-gradient(135deg, #0a192f 0%, #112240 100%);
  border-color: #1e3a5f;
}

.promo-hatomeru-btn {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.promo-hatomeru-btn:hover {
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.4);
}

.promo-tone {
  background: linear-gradient(135deg, #0a192f 0%, #112240 100%);
  border-color: #1e3a5f;
}

.promo-tone-btn {
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

.promo-tone-btn:hover {
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

/* ── Footer ── */
.footer {
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 20px 0;
}

.footer-links {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-dim);
  padding: 0 12px;
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer p {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.footer p a {
  color: inherit;
}

.footer-credits {
  margin-top: 8px;
  font-size: 0.65rem;
  line-height: 1.5;
}

.footer-credits a {
  color: var(--text-dim);
  text-decoration: underline;
  transition: color 0.15s;
}

.footer-credits a:hover {
  color: var(--text);
}

/* ── Utility ── */
.hidden {
  display: none !important;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  #app {
    padding: 16px;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }

  .header-right {
    flex-wrap: wrap;
    gap: 8px;
  }

  .privacy-badge {
    padding: 4px 8px;
    font-size: 11px;
  }

  .drop-zone {
    padding: 32px 16px;
  }

  .model-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .model-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 10px 14px;
  }

  .model-card-desc {
    margin-left: auto;
  }

  .model-card-size {
    margin-top: 0;
  }

  .controls-row {
    flex-wrap: wrap;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .step-number {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .model-guide-specs {
    flex-direction: column;
    gap: 2px;
  }
}

/* ── Sliders (デクリック) ── */
.sliders { display: flex; flex-direction: column; gap: 18px; margin-bottom: 20px; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 12px; }
.slider-head label { font-size: 13px; color: var(--text-mid); font-weight: 500; }
.slider-value { font-size: 13px; font-weight: 700; color: var(--cyan); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.slider-row input[type=range] { width: 100%; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; background: var(--bg3); outline: none; margin: 0; }
.slider-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--cyan); cursor: pointer; border: 2px solid var(--bg2); box-shadow: var(--shadow); }
.slider-row input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--cyan); cursor: pointer; border: 2px solid var(--bg2); }
.slider-hint { font-size: 11px; color: var(--text-dim); margin-top: 6px; line-height: 1.5; }

/* ── Secondary button ── */
.btn-secondary { background: var(--bg2); color: var(--cyan); cursor: pointer; border: 1px solid var(--cyan); border-radius: 6px; padding: 12px 28px; font-size: 15px; font-weight: 600; transition: opacity .2s, background .2s; }
.btn-secondary:hover { background: #0ea5e90a; }
.btn-secondary:disabled { opacity: .5; cursor: not-allowed; }
[data-theme=dark] .btn-secondary:hover { background: #00d4ff0a; }

/* ── Click count ── */
.click-count { text-align: center; margin-top: 12px; font-size: 13px; color: var(--text-mid); font-weight: 600; }

/* ── Download area (2 buttons) ── */
.download-area { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Sale Popup ── */
.sale-popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.7); z-index: 20000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all .3s ease; }
.sale-popup-overlay.show { opacity: 1; visibility: visible; }
.sale-popup-content { background: #fff; border-radius: 16px; padding: 40px; max-width: 500px; width: 90%; text-align: center; position: relative; transform: scale(.8); transition: transform .3s ease; }
.sale-popup-overlay.show .sale-popup-content { transform: scale(1); }
.sale-popup-close { position: absolute; top: 15px; right: 15px; width: 30px; height: 30px; border: none; background: #f0f0f0; border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; transition: all .3s ease; }
.sale-popup-close:hover { background: #e0e0e0; }
.sale-popup-title { font-size: 1.8rem; font-weight: 700; color: #353189; margin-bottom: 16px; }
.sale-popup-message { font-size: 1.1rem; color: #333; margin-bottom: 12px; line-height: 1.6; }
.sale-popup-submessage { font-size: .95rem; color: #666; margin-bottom: 24px; }
.sale-popup-button { display: inline-block; background: linear-gradient(135deg,#ff6b9d 0%,#c44569 100%); color: #fff; padding: 16px 40px; border-radius: 30px; text-decoration: none; font-weight: 600; font-size: 1.1rem; transition: all .3s ease; }
.sale-popup-button:hover { transform: translateY(-2px); }

/* ── 強度レベル セグメント選択（5段） ── */
.level-title { display: block; font-size: 13px; color: var(--text-mid); margin-bottom: 10px; font-weight: 500; }
.level-options { grid-template-columns: repeat(5, 1fr); }
.level-options .model-card { padding: 12px 8px; }
.level-options .model-card-title { font-size: 14px; }
.level-options .model-card-desc { font-size: 11px; line-height: 1.4; }
@media (max-width: 640px) {
  .level-options { grid-template-columns: 1fr; }
  .level-options .model-card { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 14px; }
  .level-options .model-card-desc { margin-left: auto; text-align: right; }
}
