/* ==============================================
   HIE GAMES - Common Styles
   Version: 1.3
   Last Updated: 2026-01-14
   変更点: ヘッダー・フッター固定、ポップアップ改行対応
   ============================================== */

/* ==============================================
   CSS Variables (Design Tokens)
   ============================================== */
:root {
  /* Main Colors */
  --color-deep-purple: #4A148C;      /* ひい（紫の子猫）のイメージ */
  --color-golden-yellow: #FFD54F;    /* ふみ（山吹色の子犬）のイメージ */
  --color-stardust-white: #F5F5F5;   /* 背景・余白 */
  --color-midnight-blue: #0D1B2A;    /* テキスト・影 */
  
  /* Accent Colors */
  --color-aurora-green: #00E676;     /* ボタンhover、強調 */
  --color-cosmic-silver: #B0BEC5;    /* ボーダー、補助線 */
  --color-dawn-orange: #FF7043;      /* 朝焼け */
  --color-dawn-pink: #FF8A80;        /* 朝焼け */
  
  /* Font Sizes */
  --font-size-xs: 0.875rem;   /* 14px */
  --font-size-sm: 1rem;       /* 16px */
  --font-size-md: 1.25rem;    /* 20px */
  --font-size-lg: 1.5rem;     /* 24px */
  --font-size-xl: 2rem;       /* 32px */
  --font-size-2xl: 3rem;      /* 48px */
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.6s ease-in-out;
  
  /* Z-index layers */
  --z-header: 1000;
  --z-popup: 2000;
  
  /* Fixed Heights */
  --header-height: 60px;
  --footer-height: 50px;
}

/* ==============================================
   Typography
   ============================================== */
body {
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.8;
  letter-spacing: 0.05em;
}

h1, h2, h3, h4, h5, h6,
.en-title {
  font-family: 'Poppins', 'Noto Sans JP', sans-serif;
}

/* ==============================================
   Header (固定表示)
   ============================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--spacing-md);
  background: rgba(13, 27, 42, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: var(--z-header);
  border-bottom: 1px solid rgba(176, 190, 197, 0.1);
}

.logo a {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--color-cosmic-silver);
  border-radius: 20px;
  padding: var(--spacing-xs) var(--spacing-sm);
  color: var(--color-stardust-white);
  cursor: pointer;
  transition: border-color var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-btn:hover {
  border-color: var(--color-golden-yellow);
}

.lang-btn .active {
  font-weight: 700;
  color: var(--color-golden-yellow);
}

.lang-btn .separator {
  color: var(--color-cosmic-silver);
}

/* ==============================================
   Footer (固定表示)
   ============================================== */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  background: rgba(13, 27, 42, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-top: 1px solid rgba(176, 190, 197, 0.2);
  z-index: var(--z-header);
}

.copyright {
  font-size: var(--font-size-xs);
  color: var(--color-cosmic-silver);
}

.company-name,
.creator-name {
  color: var(--color-golden-yellow);
  cursor: pointer;
  transition: color var(--transition-normal);
}

.company-name:hover,
.creator-name:hover {
  color: var(--color-stardust-white);
  text-decoration: underline;
}

/* ==============================================
   Popup (About us) - v1.3: 改行対応
   ============================================== */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-popup);
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.popup.hidden {
  opacity: 0;
  pointer-events: none;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
}

.popup-content {
  position: relative;
  background: linear-gradient(135deg, var(--color-midnight-blue), #1A2F4A);
  border: 2px solid var(--color-deep-purple);
  border-radius: 20px;
  padding: var(--spacing-lg);
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(74, 20, 140, 0.5);
  animation: popupAppear 0.3s ease-out;
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--color-cosmic-silver);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition-normal);
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover {
  color: var(--color-stardust-white);
}

.popup-title {
  font-family: 'Poppins', sans-serif;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-golden-yellow);
  margin-bottom: var(--spacing-md);
  text-align: center;
}

.popup-text {
  font-size: var(--font-size-sm);
  line-height: 2;
  color: var(--color-stardust-white);
  text-align: center;
}

@keyframes popupAppear {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ==============================================
   CTA Button (Common)
   ============================================== */
.cta-button {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  background: linear-gradient(135deg, var(--color-deep-purple), var(--color-golden-yellow));
  color: var(--color-stardust-white);
  border: none;
  border-radius: 50px;
  font-size: var(--font-size-md);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  text-decoration: none;
}

.cta-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 213, 79, 0.5);
}

.cta-button:active,
.cta-button.touched {
  transform: translateY(-2px);
}

/* ==============================================
   Utility Classes
   ============================================== */
.fade-in {
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hidden {
  display: none !important;
}

/* ==============================================
   Responsive - Header/Footer
   ============================================== */
@media (max-width: 767px) {
  :root {
    --header-height: 50px;
    --footer-height: 40px;
  }
  
  header {
    padding: 0 1rem;
  }
  
  .logo img {
    height: 32px;
  }
  
  .lang-btn {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-xs);
  }
  
  .copyright {
    font-size: 0.7rem;
  }
}

/* ==============================================
   Responsive - Popup
   ============================================== */
@media (max-width: 767px) {
  .popup-content {
    padding: var(--spacing-md);
  }
  
  .popup-title {
    font-size: var(--font-size-md);
  }
  
  .popup-text {
    font-size: var(--font-size-xs);
    line-height: 1.8;
  }
}
