/* ========================================
   POYOFARM Design System
   ======================================== */

/* Custom Fonts */
@font-face {
  font-family: 'DotGothic16';
  src: url('../assets/fonts/DotGothic16-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MochiyPopOne';
  src: url('../assets/fonts/MochiyPopOne-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* CSS Variables - Color Palette */
:root {
  /* Primary Colors */
  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-primary-dark: #4f46e5;

  /* Background Colors - Light Theme */
  --color-bg: #ffffff;
  --color-bg-secondary: #f8f9fa;
  --color-bg-card: #ffffff;
  --color-bg-card-hover: #f0f0f5;

  /* Text Colors - Dark text for light bg */
  --color-text: #1a1a2e;
  --color-text-secondary: #4a4a5a;
  --color-text-muted: #8a8a9a;

  /* Accent Colors */
  --color-accent-green: #10b981;
  --color-accent-pink: #ec4899;
  --color-accent-yellow: #f59e0b;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-bg: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);

  /* Shadows - Softer for light theme */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Container */
  --container-max: 1200px;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   Typography
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: 3rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2rem;
  color: var(--color-text);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

/* ========================================
   Layout
   ======================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

section {
  padding: var(--space-xl) 0;
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
}

.logo img {
  height: 40px;
  width: auto;
}

.nav {
  display: flex;
  gap: var(--space-lg);
}

.nav a {
  color: var(--color-text-secondary);
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav a:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.05);
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: var(--transition-fast);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  padding-top: calc(72px + var(--space-xl));
  padding-bottom: var(--space-xl);
  text-align: center;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: white;
}

/* Curve moved to apps-section */

.hero h1 {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease;
  position: relative;
  z-index: 1;
}

.hero-logo {
  max-width: 300px;
  height: auto;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  animation: fadeInUp 0.8s ease 0.2s both;
  position: relative;
  z-index: 1;
}

/* ========================================
   App Grid
   ======================================== */
.apps-section {
  position: relative;
  padding: var(--space-xl) 0;
  background: rgb(185, 155, 200);
}

/* Curve Divider */
.curve-divider {
  background: rgb(185, 155, 200);
  margin-top: -1px;
}

.curve-divider svg {
  display: block;
  width: 100%;
  height: 150px;
}

/* Section Box */
.section-box {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  width: 50%;
  box-shadow: var(--shadow-md);
  border: 8px solid white;
}

.section-box-left {
  margin-left: var(--space-lg);
  margin-right: auto;
}

.section-box-right {
  margin-left: auto;
  margin-right: var(--space-lg);
}

/* 個別ボックスの色 */
.apps-box {
  background: rgb(222, 220, 120);
}

.games-box {
  background: rgb(240, 120, 150);
}

.models-box {
  background: rgb(180, 220, 210);
}

/* Section Layout */
.section-layout {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: 0 var(--space-lg);
}

.section-layout-reverse {
  flex-direction: row-reverse;
}

.section-title-outside {
  font-family: 'MochiyPopOne', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--color-text);
  flex: 1;
  text-align: center;
  -webkit-text-stroke: 10px white;
  paint-order: stroke fill;
}

/* 個別タイトルスタイル */
.apps-title {
  font-size: 8rem;
  font-weight: 800;
  color: rgb(222, 220, 120);
  flex: 1;
  text-align: left;
}

.games-title {
  font-size: 8rem;
  font-weight: 800;
  color: rgb(240, 120, 150);
  ;
  flex: 1;
  text-align: right;
}

.models-title {
  font-size: 8rem;
  font-weight: 800;
  color: rgb(180, 220, 210);
  flex: 1;
  text-align: left;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-lg);
  max-width: 900px;
  margin: 0;
  justify-items: start;
}

/* App Card */
.app-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
  max-width: 140px;
}

.app-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.app-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-normal);
}

.app-card:hover .app-icon {
  transform: scale(1.05);
}

/* Store Links Overlay */
.store-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-normal);
}

.app-card:hover .store-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Booth Overlay for Models */
.booth-overlay {
  align-items: center;
  padding: var(--space-sm);
}

.booth-overlay a {
  display: block;
  transition: transform var(--transition-fast);
}

.booth-overlay a:hover {
  transform: scale(1.05);
}

.booth-overlay img {
  max-width: 100%;
  height: auto;
}

.store-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
}

.store-link:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.store-link-disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.store-link-disabled:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: none;
}

.store-link img {
  width: 28px;
  height: 28px;
}

/* ========================================
   Games Section
   ======================================== */
.games-section {
  background: rgb(185, 155, 200);
  padding: var(--space-xl) 0;
}

.section-description {
  text-align: center;
  color: var(--color-text-muted);
  margin-top: calc(-1 * var(--space-lg));
  margin-bottom: var(--space-xl);
}

/* Games App Grid */
.games-app-grid {
  max-width: 900px;
  margin: 0;
}

/* Game Center Section */
.game-center-section {
  background: rgb(185, 155, 200);
  padding: var(--space-xl) 0;
}

/* Game Center Wrapper */
.game-center-wrapper {
  display: flex;
  justify-content: center;
}

/* Game Center Door */
.game-center-door {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.game-center-door:hover {
  transform: translateY(-4px) scale(1.02);
}

.door-character {
  width: 240px;
  height: auto;
}

.door-char-normal {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.door-char-hover {
  position: absolute;
  top: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.game-center-door:hover .door-char-normal {
  opacity: 0;
}

.game-center-door:hover .door-char-hover {
  opacity: 1;
}

.door-title {
  font-family: 'MochiyPopOne', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: rgb(114, 6, 255);
  -webkit-text-stroke: 5px rgb(238, 255, 0);
  paint-order: stroke fill;
}

.door-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.door-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}



.door-cta {
  font-size: 0.9rem;
  color: var(--color-primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .games-layout {
    flex-direction: column;
  }

  .game-center-door {
    flex-direction: row;
    min-width: auto;
    gap: var(--space-md);
  }

  .game-center-door img {
    width: 80px;
    margin-bottom: 0;
  }
}

.placeholder-card {
  background: black;
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-card .placeholder-text {
  font-family: 'MochiyPopOne', sans-serif;
  font-size: 2rem;
  color: white;
}

.game-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.game-card-disabled {
  cursor: not-allowed;
  pointer-events: none;
}

.game-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.game-card-placeholder {
  position: relative;
  width: 240px;
  height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(240, 120, 150);
  border: 5px solid white;
}

.games-page .game-title {
  font-family: 'MochiyPopOne', sans-serif;
  font-size: 1.5rem;
  color: var(--color-text);
  -webkit-text-stroke: 0.2px white;
  text-align: center;
  margin-top: 8px;
}

.placeholder-icon {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.placeholder-icon-normal {
  opacity: 1;
  transition: opacity 0.2s ease;
  transform: translateX(10px);
}

.placeholder-icon-hover {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateX(10px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.game-card-placeholder:hover .placeholder-icon-normal {
  opacity: 0;
}

.game-card-placeholder:hover .placeholder-icon-hover {
  opacity: 1;
}

.placeholder-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
}

.game-card-placeholder .placeholder-text {
  font-size: 1.5rem;
  color: white;
}

/* Models Section */
.models-section {
  background: rgb(185, 155, 200);
  padding: var(--space-xl) 0;
}


/* ========================================
   Footer
   ======================================== */
.footer {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: white;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-text);
}

.copyright {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ========================================
   Privacy Policy Page
   ======================================== */
.policy-content {
  max-width: 800px;
  margin: 0 auto;
  padding-top: calc(72px + var(--space-xl));
  padding-bottom: var(--space-xl);
}

.policy-content h1 {
  text-align: center;
  margin-bottom: var(--space-xl);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: var(--color-text);
  color: var(--color-text);
}

.policy-content h3 {
  color: var(--color-text);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-size: 1.25rem;
}

.policy-content h4 {
  color: var(--color-text);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  font-size: 1.1rem;
}

.policy-content p,
.policy-content li {
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.policy-content ul {
  list-style: disc;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.policy-date {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

/* ========================================
   Games Page
   ======================================== */
.games-page {
  background: white;
}

.games-page .policy-content {
  background: rgb(185, 155, 200);
  max-width: 100%;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.games-page .policy-content h1 {
  font-family: 'MochiyPopOne', sans-serif;
  font-size: 3rem;
  color: rgb(114, 6, 255);
  -webkit-text-fill-color: rgb(114, 6, 255);
  -webkit-text-stroke: 5px rgb(238, 255, 0);
  paint-order: stroke fill;
}

.games-page .games-grid {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  gap: var(--space-lg);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
  :root {
    --space-lg: 1.5rem;
    --space-xl: 2.5rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-sm);
  }

  .nav.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .app-card {
    border-radius: var(--radius-md);
  }

  .store-overlay,
  .booth-overlay {
    opacity: 0;
    transform: translateY(10px);
  }

  .app-card:active .store-overlay,
  .app-card:active .booth-overlay,
  .app-card:focus .store-overlay,
  .app-card:focus .booth-overlay {
    opacity: 1;
    transform: translateY(0);
  }

  .store-link {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    aspect-ratio: 1;
    flex-shrink: 0;
  }

  .store-link svg {
    width: 20px;
    height: 20px;
  }

  .games-grid {
    grid-template-columns: 1fr;
    justify-content: center;
    gap: var(--space-lg);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-md);
  }
}

@media (max-width: 480px) {
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .hero h1 {
    font-size: 2rem;
  }
}

/* Coming Soon Badge */
.coming-soon {
  position: relative;
}

.coming-soon::after {
  content: 'Coming Soon';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  background: #1a1a2e;
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  border: 2px solid white;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-md);
}

/* ========================================
   Responsive Design - Mobile
   ======================================== */
@media (max-width: 768px) {

  /* Section Layout - Mobile */
  .section-layout {
    flex-direction: column;
    gap: var(--space-md);
    padding: 0 var(--space-md);
  }

  /* Section Box - Full Width on Mobile */
  .section-box {
    width: 100%;
    margin: 0;
  }

  .section-box-left,
  .section-box-right {
    margin-left: 0;
    margin-right: 0;
  }

  /* Section Title - Above Content on Mobile */
  .section-title-outside {
    font-size: 2.5rem;
    order: -1;
    text-align: center;
    flex: none;
    width: 100%;
    margin-bottom: var(--space-sm);
  }

  /* Apps/Games/Models Titles */
  .apps-title,
  .games-title,
  .models-title {
    font-size: 2.5rem;
    text-align: center;
  }

  /* Apps Grid - 2 Columns on Mobile */
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    justify-items: center;
  }

  .app-card {
    max-width: 120px;
  }

  .placeholder-card {
    max-width: 120px;
  }

  /* Game Center Section */
  .game-center-section {
    padding: var(--space-lg) 0;
  }

  .door-character {
    width: 180px;
  }

  .door-title {
    font-size: 1rem;
  }

  /* Header - Mobile */
  .header .container {
    padding: 0 var(--space-md);
  }

  .nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  /* Hero Section - Mobile */
  .hero {
    padding: var(--space-xl) var(--space-md);
    padding-top: calc(72px + var(--space-xl));
    min-height: auto;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  /* Footer - Mobile */
  .footer-links {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* Even smaller screens */
@media (max-width: 400px) {

  .section-title-outside,
  .apps-title,
  .games-title,
  .models-title {
    font-size: 2rem;
    -webkit-text-stroke: 6px white;
  }

  .apps-grid {
    gap: var(--space-sm);
  }

  .app-card {
    max-width: 100px;
  }
}