:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --navy: #0d1b3e;
  --bg-gradient: linear-gradient(135deg, #0d1b3e 0%, #1e40af 50%, #3b82f6 100%);
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --input-bg: #f3f4f6;
  --white: #ffffff;
  --border: #e2e8f0;
}

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

body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  background-color: #0d1b3e; /* ベースカラー */
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(30, 58, 138, 0.2) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(29, 78, 216, 0.1) 0px, transparent 50%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* 不要なグリッドと光沢を削除し、より洗練された抽象的な背景へ */
body::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.03) 0%, transparent 40%);
  animation: rotate 60s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

body::after {
  display: none; /* 複雑すぎるレイヤーを削除 */
}

/* スプリットレイアウト用ラッパー */
.auth-wrapper {
  width: 100%;
  max-width: 1000px;
  min-height: 600px;
  background: #ffffff;
  border-radius: 30px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 単一カード用ラッパー（管理者画面など） */
.auth-container-single {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 左側：インフォエリア */
.auth-side-info {
  flex: 1;
  background: var(--bg-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  padding: 40px;
  text-align: center;
  position: relative;
  z-index: 2;
  clip-path: ellipse(100% 100% at 0% 50%);
}

.auth-side-info h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.3;
}

.auth-side-info p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 300px;
  opacity: 0.9;
}

.btn-outline {
  padding: 12px 40px;
  border: 2px solid var(--white);
  background: transparent;
  color: var(--white);
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
}

/* 右側：フォームエリア */
.auth-side-form {
  flex: 1.2;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px;
}

.auth-side-form h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 30px;
}

.form-container {
  width: 100%;
  max-width: 360px;
}

.input-field {
  width: 100%;
  background: var(--input-bg);
  margin-bottom: 15px;
  height: 50px;
  border-radius: 50px;
  display: grid;
  grid-template-columns: 15% 85%;
  padding: 0 1rem;
  align-items: center;
}

.input-field i {
  text-align: center;
  color: #acacac;
  font-size: 1rem;
}

.input-field input, .input-field select {
  background: none;
  outline: none;
  border: none;
  font-weight: 500;
  font-size: 1rem;
  color: var(--navy);
  width: 100%;
}

.btn-solid {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--navy) 100%);
  color: #fff;
  padding: 18px 32px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  letter-spacing: 0.05em;
  text-decoration: none;
  margin: 10px 0;
}

.btn-solid:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4);
  background: linear-gradient(135deg, #3b82f6 0%, var(--primary) 100%);
}

.social-text {
  padding: 1rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.social-media {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-icon {
  height: 40px;
  width: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--navy);
  transition: 0.3s;
  text-decoration: none;
}

.social-icon:hover {
  background: var(--input-bg);
  border-color: var(--primary);
  color: var(--primary);
}

.form-options {
  margin: 15px 0 20px 10px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 10px;
}

.checkbox-container input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  background-color: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: 0.2s;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark::after {
  display: block;
}

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

/* マイページ専用スタイル */
.mypage-container {
  width: 100%;
  max-width: 900px;
  margin: 40px auto;
  z-index: 1;
}

.mypage-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.mypage-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(13, 27, 62, 0.1);
}

.section-group {
  margin-bottom: 40px;
}

.section-group h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-group h3::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: var(--primary);
  border-radius: 2px;
}

.mypage-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mypage-table th,
.mypage-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.mypage-table th {
  background-color: #f8fafc;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mypage-table tr:last-child td {
  border-bottom: none;
}

.mypage-table .plan-name {
  font-weight: 700;
  color: var(--navy);
}

.mypage-table .price-cell {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--navy);
}

.mypage-table .content-list {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ラジオボタンと数量入力のカスタマイズ */
.selection-cell {
  text-align: center !important;
}

.mypage-input-qty {
  width: 70px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--input-bg);
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: 0.3s;
}

.mypage-input-qty:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 合計と決済エリア */
.mypage-footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px dashed rgba(13, 27, 62, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-amount {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.total-amount span {
  font-size: 2rem;
  color: var(--primary);
}

.btn-checkout {
  padding: 18px 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--navy) 100%);
  color: white;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.btn-checkout:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4);
  background: linear-gradient(135deg, #3b82f6 0%, var(--primary) 100%);
}

/* レスポンシブ */
@media (max-width: 870px) {
  .auth-wrapper {
    flex-direction: column;
    height: auto;
    max-width: 500px;
    border-radius: 20px;
  }
  .auth-side-info {
    clip-path: none;
    padding: 40px 20px;
  }
  .auth-side-form {
    padding: 40px 20px;
  }
}
