/* シフトカレンダー 公式サイト スタイルシート */

/* ========================================
   CSS Variables
======================================== */
:root {
  --primary-color: #4F46E5;
  --primary-dark: #4338CA;
  --primary-light: #818CF8;
  --secondary-color: #10B981;
  --accent-color: #F59E0B;
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --bg-dark: #111827;
  --bg-tertiary: #F3F4F6;
  --border-color: #E5E7EB;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --header-bg: rgba(255, 255, 255, 0.95);
  --card-bg: #FFFFFF;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  /* Dark Mode Variables - Orange Theme (Deep Gradient) */
  --primary-color: #F59E0B; /* Amber 500 - メインは明るいオレンジに戻す */
  --primary-dark: #B45309;  /* Amber 700 - ホバー等は濃く */
  --primary-light: #D97706; /* Amber 600 - グラデーションの片割れを少し暗くして深みを出す */
  --secondary-color: #34D399;
  --accent-color: #FBBF24;
  --text-primary: #F9FAFB;
  --text-secondary: #D1D5DB;
  --text-light: #9CA3AF;
  --bg-primary: #111827;
  --bg-secondary: #1F2937;
  --bg-dark: #030712;
  --bg-tertiary: #374151;
  --border-color: #374151;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);
  --header-bg: rgba(17, 24, 39, 0.95);
  --card-bg: #1F2937;
}

/* ========================================
   Reset & Base
======================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden; /* Prevent horizontal scroll */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

/* ========================================
   Typography
======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.75rem; }
}

/* ========================================
   Layout
======================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

.section {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 6rem 0;
  }
}

/* ========================================
   Header
======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

/* Logo Card Style */
.logo-card {
  width: 36px;
  height: 36px;
  background: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md); /* Increased shadow */
  overflow: hidden;
}

[data-theme="dark"] .logo-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  box-shadow: none; /* No shadow in dark mode usually, or keep low */
}

.logo-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Theme-based logo switching */

/* Utility classes for theme-based visibility */
.theme-dark-only {
  display: none;
}

[data-theme="dark"] .theme-light-only {
  display: none !important;
}

[data-theme="dark"] .theme-dark-only {
  display: block !important;
}

/* Specific logo overrides if needed, or update logo HTML to use new classes later.
   For now, keeping logo classes for backward compatibility but integrating logic if possible.
*/
.logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

.nav {
  display: none;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

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

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .mobile-header-actions {
    display: none;
  }
}

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

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius-md);
}

.mobile-menu a:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

/* ========================================
   Hero Section
======================================== */
.hero {
  padding-top: 120px;
  padding-bottom: 4rem;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

@media (min-width: 768px) {
  .hero {
    padding-top: 140px;
    padding-bottom: 6rem;
  }
}

.hero-content {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.hero-text {
  text-align: center;
}

@media (min-width: 768px) {
  .hero-text {
    text-align: left;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.75rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.25rem;
  }
}

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

@media (min-width: 768px) {
  .hero-subtitle {
    margin-left: 0;
    margin-right: auto;
  }
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: flex-start;
  }
}

.store-badge {
  height: 48px;
  width: auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-badge:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.hero-image {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-mockup {
  max-width: 280px;
  width: 100%;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.15));
}

/* (Removed disable block) */

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

/* ========================================
   Features Section
======================================== */
.features {
  background: var(--bg-primary);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: 4rem;
  }
}

.section-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Features Section Layout */
.features-layout {
  display: flex;
  flex-direction: column;
  gap: 4rem; /* Space between carousel and text on mobile */
  align-items: center;
}

@media (max-width: 1023px) {
  .features-header {
    order: 1;
  }

  .features-visual {
    order: 2;
  }

  .features-grid {
    order: 3;
  }

  .calendar-modes-section {
    order: 4;
  }
}

/* Calendar Modes Section */
.calendar-modes-section {
  width: 100%;
}

@media (min-width: 1024px) {
  .calendar-modes-section {
    grid-column: 1 / -1;
  }
}

/* Top Row: Customize + Calendar Types Side by Side */
.calendar-modes-top-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .calendar-modes-top-row {
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: stretch;
  }
}

/* Customize Feature Box (Left Side) */
.customize-feature-box {
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .customize-feature-box {
    justify-content: center;
    height: 100%;
  }
}

.customize-header {
  margin-bottom: 1.5rem;
}

.customize-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.customize-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

@media (min-width: 768px) {
  .customize-title {
    font-size: 1.75rem;
  }
}

.customize-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.customize-cards .feature-card {
  padding: 1rem 1.25rem;
}

/* Calendar Types Box (Right Side - Header + Sliders) */
.calendar-types-box {
  text-align: center;
}

.calendar-types-header {
  margin-bottom: 2rem;
}

.calendar-types-header .calendar-modes-title {
  font-size: 1.5rem;
}

@media (min-width: 768px) {
  .calendar-types-header .calendar-modes-title {
    font-size: 1.75rem;
  }
}

.calendar-types-box .comparison-sliders-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  justify-items: center;
}

@media (min-width: 640px) {
  .calendar-types-box .comparison-sliders-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.calendar-types-box .custom-comparison-slider {
  width: 280px;
  max-width: 100%;
}

.calendar-modes-header {
  text-align: center;
  margin-bottom: 2rem;
}

.calendar-modes-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.calendar-modes-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.calendar-modes-layout {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}


.calendar-modes-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: stretch;
  justify-items: center;
}

.comparison-sliders-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  justify-items: center;
}

.comparison-sliders-grid .comparison-container {
  text-align: center;
  width: 100%;
  max-width: 280px;
}

.comparison-label {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.comparison-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0.35rem 0 0.75rem;
}

@media (max-width: 640px) {
  .comparison-sliders-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (min-width: 1024px) {
  .calendar-modes-layout {
    grid-template-columns: 1fr;
  }
}

.calendar-modes-layout .comparison-sliders-grid {
  max-width: none;
  width: 100%;
}

.calendar-modes-layout .custom-comparison-slider {
  width: 280px;
  max-width: 100%;
}

.calendar-modes-aside {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  text-align: left;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calendar-aside-title {
  margin: 1rem 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.calendar-aside-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.calendar-aside-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .comparison-sliders-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (min-width: 1200px) {
  .calendar-modes-content {
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: stretch;
  }

  .comparison-sliders-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .calendar-modes-aside {
    max-width: none;
    min-height: 100%;
  }
}

.calendar-aside-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-color);
  background: rgba(76, 105, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

.calendar-aside-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.1rem;
  color: var(--primary-color);
  font-weight: 700;
}

/* Carousel Container Wrapper */
.features-visual {
  display: flex;
  justify-content: center;
  width: 100%;
  position: relative;
  /* Ensure it has height for the carousel if absolute positioning is used inside */
  min-height: 580px; 
}



.features-header {
  text-align: center;
  margin-bottom: 3rem;
}

/* Feature Cards Grid */
.features-grid {
  display: grid;
  gap: 1.5rem;
}

.feature-card {
  display: flex;
  align-items: center;
  text-align: left;
  padding: 1.25rem;
  gap: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-content {
  flex: 1;
  min-width: 0;
}

/* Desktop Layout */
@media (min-width: 1024px) {
  .features-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 4rem;
    row-gap: 4rem;
    align-items: center;
  }

  .features-visual {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  /* Wrapper for header + grid on right side */
  .features-right-content {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .features-right-content .features-header {
    text-align: left;
    margin-bottom: 1.5rem;
  }

  .features-right-content .features-header .section-subtitle {
    margin: 0;
  }

  .features-right-content .features-grid {
    display: grid;
    gap: 0.75rem;
  }

  .features-right-content .feature-card {
    padding: 1rem 1.25rem;
  }

  .calendar-modes-section {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .feature-card {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .feature-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    font-size: 1.5rem;
  }

  .feature-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.feature-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
}

.feature-title {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.feature-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ========================================
   Pricing Section
======================================== */
.pricing {
  background: var(--bg-secondary);
}

.pricing-grid {
  display: grid;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

.pricing-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pricing-card .btn {
  margin-top: auto;
}

.pricing-card.featured {
  border: 2px solid var(--primary-color);
}

.pricing-card.featured::before {
  content: 'おすすめ';
  position: absolute;
  top: 20px;
  right: -30px;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 2.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  transform: rotate(45deg);
}

.pricing-header {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.pricing-name {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.pricing-features {
  margin-bottom: 2rem;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: var(--text-secondary);
}

.pricing-features li::before {
  content: '✓';
  color: var(--secondary-color);
  font-weight: 700;
}

.pricing-features li.disabled {
  opacity: 0.5;
}

.pricing-features li.disabled::before {
  content: '×';
  color: var(--text-light);
}

/* ========================================
   Buttons
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.btn-block {
  width: 100%;
}

/* ========================================
   CTA Section
======================================== */
.cta {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
}

[data-theme="dark"] .cta {
  background: var(--primary-color);
}

.cta h2 {
  color: white;
  margin-bottom: 1rem;
}



.cta p {
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

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

.cta .btn-primary:hover {
  background: var(--bg-secondary);
}

/* ========================================
   Footer
======================================== */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
  }
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  margin-bottom: 1rem;
}

.footer-description {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.footer-section h4 {
  color: white;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links a {
  display: block;
  color: var(--text-light);
  padding: 0.375rem 0;
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
}

/* ========================================
   Legal Pages (Terms, Privacy, FAQ, etc.)
======================================== */
.legal-page {
  padding-top: 100px;
  min-height: 100vh;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (min-width: 768px) {
  .legal-content {
    padding: 3rem 2rem;
  }
}

.legal-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

/* ========================================
   3D Carousel
======================================== */
.carousel-container {
  width: 280px;
  height: 560px;
  position: relative;
  perspective: 1000px;
  margin: 0 auto;
  margin-top: 100px; /* Add space for top caption */
}

@keyframes float-caption {
  0%, 100% { transform: translate(-50%, 0px); }
  50% { transform: translate(-50%, -20px); }
}

.carousel-caption {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 120%; /* wider than container to fit text */
  text-align: center;
  color: var(--text-primary);
  color: var(--text-primary);
  pointer-events: none;
  z-index: 20;
}

.caption-title {
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.caption-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: normal;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-style: preserve-3d;
  opacity: 0;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 40px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Active State (Center) */
.carousel-item.active {
  transform: translateZ(0) scale(1);
  z-index: 10;
  opacity: 1;
  pointer-events: auto;
}

/* Previous State (Left, Back, Rotated) */
.carousel-item.prev {
  transform: translateX(-70%) translateZ(-200px) rotateY(30deg);
  z-index: 5;
  opacity: 0.8;
  pointer-events: auto;
  cursor: pointer;
}

/* Next State (Right, Back, Rotated) */
.carousel-item.next {
  transform: translateX(70%) translateZ(-200px) rotateY(-30deg);
  z-index: 5;
  opacity: 0.8;
  pointer-events: auto;
  cursor: grab;
}


/* Dark mode adjustments for shadow if needed */
[data-theme="dark"] .carousel-item img {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.legal-date {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.legal-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.375rem;
}

.legal-body h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.legal-body p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.legal-body ul, .legal-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-body li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  list-style: disc;
}

.legal-body ol li {
  list-style: decimal;
}

/* ========================================
   FAQ Page
======================================== */
.faq-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.faq-category-btn {
  padding: 0.5rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.faq-category-btn:hover,
.faq-category-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: rgba(0, 0, 0, 0.03);
}

.faq-icon {
  font-size: 1.25rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   WebView Mode (for mobile app)
======================================== */
body.webview-mode .header,
body.webview-mode .footer,
body.webview-mode .cta,
body.embed-mode .header,
body.embed-mode .footer,
body.embed-mode .cta {
  display: none !important;
}

body.webview-mode .legal-page,
body.embed-mode .legal-page {
  padding-top: 0;
}

body.webview-mode .legal-content,
body.embed-mode .legal-content {
  padding-top: 1rem;
}

/* ========================================
   Utilities
======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }

@media (max-width: 767px) {
  .hide-mobile { display: none; }
}

@media (min-width: 768px) {
  .hide-desktop { display: none; }
}

/* ========================================
   Theme Toggle Button
======================================== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  transform: scale(1.05);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.theme-toggle .icon-sun {
  display: block;
  color: var(--accent-color);
}

.theme-toggle .icon-moon {
  display: none;
  color: var(--primary-light);
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* Dark Mode Additional Styles */
[data-theme="dark"] .hero-title {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .faq-question:hover {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .footer {
  background: var(--bg-dark);
}

[data-theme="dark"] .store-badge {
  filter: brightness(0.9);
}

/* Smooth theme transition */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.header,
.mobile-menu,
.feature-card,
.pricing-card,
.faq-item,
.btn,
.theme-toggle {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   Custom Comparison Slider
======================================== */
.comparison-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 4rem;
  text-align: center;
}

.comparison-title {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.comparison-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.custom-comparison-slider {
  width: min(280px, 100%);
  margin: 0 auto;
  aspect-ratio: 1 / 2; /* Match the carousel phone ratio (280x560) */
  border-radius: 40px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 40px;
  display: block;
}

.slider-img.before {
  z-index: 2;
  /* clip-path will be set by JS */
}

.slider-img.after {
  z-index: 1;
}

.slider-handle {
  position: absolute;
  top: 50%;
  /* left will be set by JS */
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5), 0 4px 15px rgba(0, 0, 0, 0.3);
  font-size: 1.2rem;
  pointer-events: none; /* Let clicks pass to range input */
  transition: transform 0.1s ease;
  animation: handle-wiggle 3s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.slider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: -22px 0 26px rgba(0, 0, 0, 0.5), -6px 0 10px rgba(0, 0, 0, 0.45);
  z-index: 2;
  transform: translateX(-50%);
  pointer-events: none;
}

@keyframes handle-wiggle {
  0%, 100% {
    transform: translate(-50%, -50%);
  }
  25% {
    transform: translate(calc(-50% + 10px), -50%);
  }
  50% {
    transform: translate(-50%, -50%);
  }
  75% {
    transform: translate(calc(-50% - 10px), -50%);
  }
}

.slider-range {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}

/* Slider hint animation - pulsing glow effect */
@keyframes slider-hint-pulse {
  0%, 100% {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 20px rgba(100, 149, 237, 0.5);
  }
}

/* Handle bounce animation to indicate draggable */
@keyframes handle-bounce {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

/* Stop animations on interaction */
.custom-comparison-slider:hover .slider-handle,
.custom-comparison-slider:focus-within .slider-handle,
.custom-comparison-slider:active .slider-handle {
  animation: none;
  transform: translate(-50%, -50%);
}

@media (max-width: 767px) {
  /* Hide text-heavy feature cards on mobile to reduce clutter */
  .features-grid {
    display: none;
  }
}

/* ========================================
   Terms of Service & Privacy Policy
======================================== */
.terms-section {
  padding-top: 8rem; /* ヘッダー分空ける */
  padding-bottom: 4rem;
}

.terms-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.page-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.terms-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.terms-content p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .terms-content {
    padding: 3rem;
  }
}

/* Embed Mode */
.embed-mode .header,
.embed-mode .footer {
  display: none !important;
}

.embed-mode .terms-section,
.embed-mode .legal-page,
.embed-mode .section {
  padding-top: 2rem !important; /* Reset padding since header is gone */
}
