:root {
  --primary-color: #E91E63;
  --primary-dark: #C2185B;
  --primary-light: #F8BBD0;
  --secondary-color: #9C27B0;
  --accent-color: #FF4081;
  --background: #FAFAFA;
  --surface: #FFFFFF;
  --text-primary: #212121;
  --text-secondary: #757575;
  --border-color: #E0E0E0;
  --success: #4CAF50;
  --warning: #FF9800;
  --error: #F44336;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(0, 0, 0, 0.15);
}

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

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ヘッダー */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

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

.header-cta-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-size: 0.95rem;
}

.header-cta-register {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  animation: pulse 2s infinite;
}

.header-cta-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.6);
}

.header-cta-login {
  background: white;
  color: var(--primary-color);
  border: 2px solid white;
}

.header-cta-login:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.header-user-info {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.header-logout-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.header-logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.8);
  }
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  font-size: 2rem;
}

.nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav a:hover {
  opacity: 0.8;
}

/* ハンバーガーメニューボタン */
.mobile-menu-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: transform 0.3s;
}

.mobile-menu-btn:hover {
  transform: scale(1.1);
}

.mobile-menu-btn.active {
  transform: rotate(90deg);
}

/* コンテナ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* カード */
.card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px var(--shadow-hover);
}

/* ボタン */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

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

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

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

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* グリッド */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* セクション */
.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i {
  color: var(--primary-color);
}

/* バッジ */
.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.badge-success {
  background: #C8E6C9;
  color: #2E7D32;
}

.badge-warning {
  background: #FFE0B2;
  color: #E65100;
}

.badge-error {
  background: #FFCDD2;
  color: #C62828;
}

/* フォーム */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
  font-family: inherit;
}

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

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

/* アラート */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-success {
  background: #C8E6C9;
  color: #2E7D32;
  border-left: 4px solid #4CAF50;
}

.alert-warning {
  background: #FFE0B2;
  color: #E65100;
  border-left: 4px solid #FF9800;
}

.alert-error {
  background: #FFCDD2;
  color: #C62828;
  border-left: 4px solid #F44336;
}

.alert-info {
  background: #BBDEFB;
  color: #1565C0;
  border-left: 4px solid #2196F3;
}

/* モーダル */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

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

/* ローディング */
.loading {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

/* 空状態 */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--border-color);
}

/* ナビゲーションメニュー（常にハンバーガー） */
.nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  flex-direction: column;
  padding: 5rem 0 2rem 0;
  gap: 0;
  z-index: 1000;
  transition: right 0.3s ease-in-out;
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.nav.active {
  right: 0;
}

.nav a {
  padding: 1.2rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  padding-left: 2.5rem;
}

.nav a i {
  width: 20px;
  text-align: center;
}

/* メニューオーバーレイ */
.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}

.menu-overlay.active {
  display: block;
  opacity: 1;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
  }

  .header-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .header-cta-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .header-cta-btn span {
    display: none;
  }

  .header-cta-btn {
    padding: 0.6rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
  }

  .header-cta-register {
    width: auto;
    border-radius: 25px;
    padding: 0.6rem 1rem;
  }

  .header-cta-register span {
    display: inline;
  }
}

@media (min-width: 769px) {
  .nav {
    width: 320px;
  }
}

/* スマホ用スティッキーフッター */
.mobile-sticky-footer {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 900;
  padding: 0.75rem;
  border-top: 3px solid var(--primary-color);
}

.mobile-sticky-footer .footer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 600px;
  margin: 0 auto;
}

.mobile-footer-btn {
  padding: 1rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.mobile-footer-btn i {
  font-size: 1.5rem;
}

.mobile-footer-call {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
  animation: callPulse 2s infinite;
}

.mobile-footer-call:active {
  transform: scale(0.95);
}

.mobile-footer-login {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}

.mobile-footer-login:active {
  transform: scale(0.95);
}

.mobile-footer-user {
  background: linear-gradient(135deg, #666 0%, #555 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-size: 0.85rem;
  padding: 0.75rem;
}

.mobile-footer-user i {
  font-size: 1.2rem;
}

@keyframes callPulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.8);
  }
}

/* スマホでのみ表示 */
@media (max-width: 768px) {
  .mobile-sticky-footer {
    display: block;
  }

  /* スティッキーフッター分のパディングを追加 */
  body {
    padding-bottom: 90px;
  }

  /* 通常のフッターは非表示 */
  .footer {
    display: none;
  }
}

/* ユーティリティ */
.text-center {
  text-align: center;
}

.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; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.hidden {
  display: none;
}
