:root {
  --bg: #0b0f1a;
  --bg-card: #141a2a;
  --bg-elevated: #1c2438;
  --border: #2a3548;
  --text: #e8edf7;
  --text-muted: #8b97b0;
  --primary: #6c5ce7;
  --primary-hover: #7d6ff0;
  --accent: #00d2d3;
  --success: #2ecc71;
  --danger: #ff6b6b;
  --gradient: linear-gradient(135deg, #6c5ce7 0%, #00d2d3 100%);
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --font: 'Noto Sans JP', system-ui, sans-serif;
  --font-display: 'Outfit', 'Noto Sans JP', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  font-size: 1.5rem;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

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

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

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
  padding: 14px;
}

.btn-buy {
  background: var(--accent);
  color: #0b0f1a;
  font-weight: 600;
}

.btn-buy:hover {
  filter: brightness(1.1);
}

/* Hero */
.hero {
  padding: 80px 0 60px;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108,92,231,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-tag {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent, #00d4aa);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 36px;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

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

/* Floating cards */
.hero-visual {
  position: relative;
  height: 380px;
}

.floating-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}

.floating-card .card-emoji {
  font-size: 1.6rem;
}

.floating-card .card-title {
  font-weight: 500;
  font-size: 0.95rem;
}

.floating-card .card-price {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.card-1 {
  top: 20px;
  left: 40px;
  animation-delay: 0s;
}

.card-2 {
  top: 140px;
  right: 20px;
  animation-delay: -2s;
}

.card-3 {
  bottom: 30px;
  left: 80px;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Categories */
.categories {
  padding: 20px 0 10px;
}

.category-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.pill {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.pill:hover {
  border-color: var(--primary);
  color: var(--text);
}

.pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Marketplace */
.marketplace {
  padding: 40px 0 80px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
}

.section-title.center {
  text-align: center;
  margin-bottom: 40px;
}

.search-box {
  position: relative;
}

.search-box input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 40px 10px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  width: 240px;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
}

.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.idea-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s;
  cursor: pointer;
}

.idea-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(108, 92, 231, 0.15);
}

.idea-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.idea-emoji {
  font-size: 2rem;
}

.idea-cat {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.idea-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}

.idea-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.idea-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.idea-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
}

.idea-seller {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 0;
  font-size: 1.1rem;
}

/* How */
.how {
  padding: 60px 0 80px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step {
  text-align: center;
  padding: 20px;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */
.footer {
  padding: 40px 0;
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.8rem;
}

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

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

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s;
}

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

.modal-detail {
  max-width: 560px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

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

.modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 24px;
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Detail content */
.detail-emoji {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.detail-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.detail-desc {
  color: var(--text-muted);
  white-space: pre-wrap;
  margin-bottom: 28px;
  line-height: 1.7;
}

.detail-seller {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--success);
  color: #0b0f1a;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  z-index: 300;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  background: var(--danger);
  color: white;
}

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

  .menu-toggle {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

  .hero {
    padding: 50px 0 40px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }
}
