:root {
  --bg-base: #0f172a;
  /* Slate 900 */
  --bg-surface: #1e293b;
  /* Slate 800 */
  --text-primary: #f8fafc;
  /* Slate 50 */
  --text-secondary: #94a3b8;
  /* Slate 400 */
  --accent-primary: #10b981;
  /* Emerald 500 - for positive actions/medical trust */
  --accent-hover: #059669;
  /* Emerald 600 */
  --accent-secondary: #3b82f6;
  /* Blue 500 - for information */
  --accent-warning: #ef4444;
  /* Red 500 - for warnings/problems */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 15px rgba(16, 185, 129, 0.3);
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Background gradient effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.1) 0%, rgba(15, 23, 42, 0) 50%);
  z-index: -1;
  pointer-events: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.3;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  padding: 2rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-header {
  padding: 4.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.5)), url('images/hero_bg.png');
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  margin-top: 1rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border);
}

header h1 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.lead-text {
  font-size: 1.125rem;
  color: #f8fafc;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  max-width: 700px;
  margin: 0 auto;
}

/* Glass panel styling (Card) */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.glass-panel:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Problem section (Block 1) */
.problem-quotes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.quote {
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid var(--accent-secondary);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  position: relative;
}

.quote::before {
  content: '"';
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.1);
  position: absolute;
  top: -0.5rem;
  left: 0.5rem;
  font-family: Georgia, serif;
}

.text-highlight {
  color: var(--accent-warning);
  font-weight: bold;
}

/* Custom Image Layouts */
.content-split-layout {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.content-text {
  flex: 1.2;
}

.content-image-wrapper {
  flex: 0.8;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.content-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-image-wrapper:hover .content-img {
  transform: scale(1.05);
}

.shadow-glow {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navigation Grid (Block 2) */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.nav-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--glass-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

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

.nav-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.btn {
  display: inline-block;
  background: var(--accent-primary);
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Bonus Content (Block 3) */
.bonus-content {
  background: linear-gradient(145deg, var(--bg-surface) 0%, rgba(30, 41, 59, 0.4) 100%);
  border-left: 4px solid var(--accent-warning);
}

/* Footer & Site description (Block 4) */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-secondary);
}

.footer-desc {
  font-size: 0.9rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: left;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.mt-4 {
  margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .glass-panel {
    padding: 1.5rem;
  }

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

  .content-split-layout {
    flex-direction: column;
    gap: 1.5rem;
  }

  .reverse-on-mobile {
    flex-direction: column-reverse;
  }

  .content-image-wrapper {
    width: 100%;
  }
}

/* Icons via emoji for now, can be replaced with SVG/fonts */
.icon {
  margin-right: 8px;
  font-style: normal;
}

/* Legal Pages Specific */
.legal-content h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.legal-content h3 {
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

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

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.legal-table th,
.legal-table td {
  padding: 1rem;
  border: 1px solid var(--glass-border);
  text-align: left;
}

.legal-table th {
  background: rgba(255, 255, 255, 0.03);
  width: 30%;
  color: var(--text-primary);
}

/* Share Buttons */
.share-buttons {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  box-shadow: var(--shadow-md);
}

.share-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-lg);
  color: white;
  filter: brightness(1.1);
}

.share-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.share-btn.line {
  background-color: #06C755;
}

.share-btn.x {
  background-color: #000000;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.share-btn.facebook {
  background-color: #1877F2;
}

@media (max-width: 768px) {
  .share-buttons {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    transform: none;
    flex-direction: row;
    justify-content: center;
    padding: 10px 15px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--glass-border);
    gap: 15px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .share-btn {
    flex: 1;
    max-width: 120px;
    height: 44px;
    border-radius: 8px;
    box-shadow: none;
  }
  
  .share-btn:hover {
    transform: scale(1.02);
  }
  
  .share-btn svg {
    width: 20px;
    height: 20px;
  }
  
  body {
    padding-bottom: 70px;
  }
}
