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

:root {
  --orange: #E06000;
  --orange-light: #F5A050;
  --orange-bg: #E8721C;
  --bg-dark: #2a2a3e;
  --bg-darker: #1a1a2e;
  --bg-light: #FFF5EE;
  --text-white: #ffffff;
  --text-dark: #333;
  --text-dim: #808098;
  --text-dimmer: #505070;
  --border: #2a2a4a;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans JP", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ========================
   Hero Section
   ======================== */
.hero {
  background: linear-gradient(135deg, #D05500 0%, var(--orange-bg) 50%, #F5C8A0 90%, #FFF5EE 100%);
  color: var(--text-white);
  padding: 32px 48px 80px;
  min-height: 100vh;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* Header bar */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.share-buttons {
  display: flex;
  gap: 8px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-white);
  text-decoration: none;
  transition: background 0.15s;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Logo */
.logo-area {}

.logo-p {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-white);
}

.logo-ut {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-white);
}

.logo-cursor {
  display: inline-block;
  width: 12px;
  height: 20px;
  background: var(--text-white);
  margin-left: 2px;
  vertical-align: baseline;
  position: relative;
  top: 2px;
}

/* Copy */
.copy-en {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 64px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.copy-you {
  color: #000;
}

.copy-me {
  color: #4A9EFF;
}

.copy-ja {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  margin-bottom: 48px;
}

/* Demo area */
.demo-area {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

/* Callout (PC) */
.demo-callout-pc {
  position: relative;
  background: var(--text-white);
  color: var(--text-dark);
  border-radius: 10px;
  padding: 16px 18px;
  max-width: 200px;
  font-size: 13px;
  line-height: 1.6;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.demo-callout-arrow {
  position: absolute;
  top: 20px;
  right: -8px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid var(--text-white);
}

/* Callout (SP) */
.demo-callout-sp {
  display: none;
}

.demo-callout-arrow-down {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--text-white);
  margin: 0 auto;
}

.demo-callout-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  text-align: center;
}

.demo-callout-text {
  color: #666;
  font-size: 12px;
  line-height: 1.7;
}

.demo-callout-text strong {
  color: var(--orange);
}

/* Demo disclaimer & SP notice */
.demo-disclaimer {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 16px;
  text-align: center;
}

.demo-sp-notice {
  display: none;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 8px;
  text-align: center;
}

/* Tooltips — white bubble style */
.pair-tooltip,
.saved-tabs-tooltip {
  display: none;
  position: absolute;
  background: var(--text-white);
  border-radius: 8px;
  padding: 8px 12px;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  font-size: 11px;
  color: #555;
  white-space: nowrap;
}

.pair-tooltip .tooltip-arrow,
.saved-tabs-tooltip .tooltip-arrow {
  position: absolute;
  top: -6px;
  left: 16px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--text-white);
}

.saved-tabs-tooltip .tooltip-arrow {
  left: auto;
  right: 16px;
}

.tooltip-note {
  font-size: 9px;
  color: #999;
  margin-top: 4px;
}

/* Ripple hint for paired bar */
.demo-put-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  background: #121a30;
  border-bottom: 1px solid #1e2a48;
  font-size: 12px;
  position: relative;
  cursor: pointer;
}

.pair-name {
  color: #7eb8ff;
  font-weight: 500;
  position: relative;
}

.pair-name::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: rgba(126, 184, 255, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 2s ease-out infinite;
  pointer-events: none;
}

@keyframes ripple {
  0% { width: 6px; height: 6px; opacity: 0.6; }
  100% { width: 40px; height: 40px; opacity: 0; }
}

.demo-put-pair:hover .pair-tooltip {
  display: block;
  top: calc(100% + 4px);
  left: 10px;
}

.demo-put-pair:hover .pair-name::after {
  display: none;
}

/* Saved tabs area with ripple */
.saved-tabs-area {
  position: relative;
  margin-left: auto;
}

.saved-tabs-area::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  width: 6px;
  height: 6px;
  background: rgba(245, 160, 80, 0.6);
  border-radius: 50%;
  transform: translate(50%, -50%);
  animation: rippleOrange 2s ease-out infinite 0.5s;
  pointer-events: none;
}

@keyframes rippleOrange {
  0% { width: 6px; height: 6px; opacity: 0.6; }
  100% { width: 36px; height: 36px; opacity: 0; }
}

.saved-tabs-area:hover .saved-tabs-tooltip {
  display: block;
  top: calc(100% + 6px);
  right: 0;
}

.saved-tabs-area:hover::after {
  display: none;
}

/* Demo windows */
.demo-window {
  flex: 1;
  border-radius: 12px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  max-height: 380px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.demo-ai-body {
  overflow: hidden;
}

.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #252540;
}

.demo-titlebar-put {
  background: #16213e;
}

.demo-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-r { background: #ff5f57; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #28ca41; }

.demo-title {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.demo-title-put {
  color: var(--orange-light);
}

/* AI window */
.demo-ai {
  background: #1e1e2f;
}

.demo-ai-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.demo-chat {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 260px;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.chat-ai {
  background: #2a2a48;
  color: #e0e0e0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-user {
  background: #0f3460;
  color: #d0e0ff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.demo-ai-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #16162a;
}

.demo-ai-input {
  flex: 1;
  min-height: 20px;
  padding: 6px 10px;
  background: #1e1e38;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 13px;
  outline: none;
}

.demo-ai-send {
  background: none;
  border: none;
  color: var(--text-dimmer);
  cursor: default;
  padding: 4px;
}

.demo-ai-send:disabled {
  opacity: 0.3;
}

/* put window */
.demo-put {
  background: var(--bg-darker);
  overflow: visible;
}

.demo-put .demo-titlebar-put {
  border-radius: 12px 12px 0 0;
}

.demo-put .demo-toolbar {
  border-radius: 0 0 12px 12px;
}

.pair-label {
  color: var(--text-dimmer);
}

.pair-name {
  color: #7eb8ff;
  font-weight: 500;
}

.demo-editor {
  flex: 1;
  padding: 14px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: #e0e0e0;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 14px;
  line-height: 1.6;
}

.demo-editor::placeholder {
  color: var(--text-dimmer);
}

.demo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #16213e;
}

.demo-charcount {
  font-size: 11px;
  color: var(--text-dimmer);
}

.demo-buttons {
  display: flex;
  gap: 8px;
}

.demo-btn {
  padding: 5px 16px;
  border: 1px solid #333360;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.demo-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.demo-btn-copy {
  background: transparent;
  color: var(--text-dim);
}

.demo-btn-copy:hover:not(:disabled) {
  background: #2a2a4a;
  color: #e0e0e0;
}

.demo-btn-paste {
  background: #0f3460;
  color: #e0e0e0;
}

.demo-btn-paste:hover:not(:disabled) {
  background: #1a4f8a;
}

/* Saved prompt tabs (inside titlebar) */
.saved-tabs {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.saved-tab {
  position: relative;
  cursor: pointer;
}

.saved-tab-label {
  display: block;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
  line-height: 1;
}

.saved-tab:hover .saved-tab-label {
  background: rgba(255, 255, 255, 0.1);
}

.saved-tab-expand {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  background: var(--text-white);
  border-radius: 8px;
  padding: 12px 14px;
  width: 260px;
  z-index: 60;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.saved-tab:hover .saved-tab-expand {
  display: block;
}

.saved-tab-preview {
  font-size: 12px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 8px;
}

.saved-tab-hint {
  font-size: 10px;
  color: #999;
}

/* Fly animation */
@keyframes flyText {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translate(-50%, -20px) scale(0.95);
  }
  100% {
    opacity: 0;
    transform: translate(-100%, 0) scale(0.9);
  }
}

.fly-text {
  position: fixed;
  pointer-events: none;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 13px;
  color: var(--orange-light);
  background: rgba(224, 96, 0, 0.15);
  border: 1px solid var(--orange);
  border-radius: 6px;
  padding: 8px 14px;
  max-width: 200px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  animation: flyText 0.6s ease-in-out forwards;
  z-index: 1000;
}

/* ========================
   CTA (shared)
   ======================== */
.cta-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.cta-area {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(224, 96, 0, 0.3);
}

.cta-btn:active {
  transform: translateY(0);
}

.cta-btn-white {
  background: var(--text-white);
  color: var(--orange);
}

.cta-btn-white:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.cta-icon {
  font-size: 20px;
}

.cta-count {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 13px;
}

.cta-btn-white .cta-count {
  background: rgba(224, 96, 0, 0.15);
}

.cta-x {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  transition: border-color 0.15s, color 0.15s;
}

.cta-x:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--text-white);
}

.cta-x-white {
  color: var(--text-white);
  border-color: var(--text-white);
}

.cta-x-white:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cta-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* ========================
   About Section
   ======================== */
.about-section {
  background: linear-gradient(180deg, #D05500 0%, #C04800 100%);
  color: #e0e0e0;
  padding: 80px 24px;
}

.about-section > * {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.about-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text-white);
}

.about-desc {
  text-align: center;
  color: var(--text-white);
  font-size: 16px;
  margin-bottom: 40px;
}

.about-problems {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  max-width: 900px;
}

.problem {
  flex: 1;
  text-align: center;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.problem-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.problem p {
  font-size: 13px;
  color: #666;
  line-height: 1.7;
}

/* Answer divider */
.about-answer-area {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 48px;
  max-width: 900px;
}

.about-answer-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
}

.about-answer {
  text-align: center;
  font-size: 20px;
  color: var(--text-white);
  white-space: nowrap;
}

.about-answer strong {
  color: var(--orange-light);
  font-size: 24px;
}

.features {
  display: flex;
  gap: 20px;
  max-width: 900px;
}

.feature {
  flex: 1;
  text-align: center;
  padding: 28px 20px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.feature h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.feature p {
  font-size: 13px;
  color: #666;
  line-height: 1.7;
}

/* ========================
   Release Section
   ======================== */
.release-section {
  background: var(--bg-darker);
  padding: 80px 24px;
}

.release-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-white);
}

.release-cards {
  display: flex;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.release-card {
  flex: 1;
  text-align: center;
  padding: 28px 20px;
  background: #222240;
  border: 1px solid #333355;
  border-radius: 12px;
}

.release-card-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.release-card-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.release-card-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-white);
  line-height: 1.6;
}

.release-card-sub {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 400;
}

/* ========================
   CTA Bottom Section
   ======================== */
.cta-section {
  background: linear-gradient(180deg, var(--bg-darker) 0%, #12122a 100%);
  padding: 80px 24px;
}

/* ========================
   Footer
   ======================== */
.footer {
  background: #12122a;
  padding: 40px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dimmer);
}

/* ========================
   Responsive
   ======================== */
@media screen and (max-width: 768px) {
  .hero {
    padding: 24px 20px 60px;
  }

  .copy-en {
    font-size: 36px;
  }

  .copy-ja {
    font-size: 16px;
  }

  .demo-area {
    flex-direction: column;
    align-items: stretch;
  }

  /* SP callout */
  .demo-callout-pc {
    display: none;
  }

  .demo-callout-sp {
    display: block;
    background: var(--text-white);
    color: var(--text-dark);
    border-radius: 8px;
    padding: 8px 16px 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    width: fit-content;
    margin: 0 auto;
  }

  .demo-callout-sp .demo-callout-title {
    margin-bottom: 2px;
    font-size: 13px;
  }

  /* SP: AI window compact */
  .demo-titlebar-ai-pc {
    display: none;
  }

  .demo-ai {
    min-height: 120px !important;
    max-height: 200px;
  }

  .demo-chat {
    max-height: 120px;
  }

  .demo-chat {
    padding: 8px;
  }

  .chat-msg {
    font-size: 12px;
    padding: 6px 10px;
  }

  /* SP: put window full width, no Copy button */
  .demo-put {
    width: 100%;
  }

  .demo-copy-pc {
    display: none;
  }

  .demo-window {
    min-height: 180px;
    max-height: none;
  }

  /* SP notice */
  .demo-sp-notice {
    display: block;
  }

  /* Hide ripple on SP */
  .pair-name::after,
  .saved-tabs-area::after {
    display: none;
  }

  .about-problems,
  .features {
    flex-direction: column;
  }

  .about-problems {
    gap: 12px;
  }

  .about-answer-area {
    gap: 12px;
  }

  .about-answer {
    font-size: 16px;
  }

  .about-answer strong {
    font-size: 20px;
  }

  .release-cards {
    flex-direction: column;
  }

  .saved-tab-expand {
    position: fixed;
    left: 20px;
    right: 20px;
    width: auto;
  }
}
