/* Future Proto Lab - Futuristic Responsive Design */

/* Font Import from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --dark-bg: #0a0e27;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --glow-color: #667eea;
  --transition-speed: 0.3s;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', 'Yu Gothic', 'Meiryo', sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 90%, rgba(79, 172, 254, 0.1) 0%, transparent 50%);
  z-index: -1;
  animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Language Switcher */
.lang-switcher {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  padding: 0.5rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all var(--transition-speed);
  backdrop-filter: blur(10px);
  font-family: inherit;
}

.lang-btn:hover,
.lang-btn.active {
  background: var(--primary-gradient);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* Container */
#SITE_CONTAINER {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Headings */
h1 {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(102, 126, 234, 0.5);
  animation: glow 3s ease-in-out infinite alternate;
  line-height: 1.2;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

@keyframes glow {
  from { filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.3)); }
  to { filter: drop-shadow(0 0 40px rgba(102, 126, 234, 0.6)); }
}

h2 {
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

h3 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
  margin: 2rem 0 1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

/* Page-specific h1 styles */
.page-title {
  font-size: clamp(2rem, 6vw, 4rem);
  margin-bottom: 3rem;
}

/* Paragraphs */
p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  max-width: 800px;
}

/* Links */
a {
  color: var(--text-primary);
  text-decoration: none;
  position: relative;
  transition: all var(--transition-speed);
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width var(--transition-speed);
}

a:hover::after {
  width: 100%;
}

a:hover {
  color: #667eea;
}

/* Glass Card */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 2rem;
  margin: 1rem 0;
  max-width: 900px;
  width: 100%;
  backdrop-filter: blur(10px);
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.3);
}

.card h2 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-secondary);
}

/* Navigation */
#HEADER_NAV {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 2rem;
  padding: 0.5rem 1rem;
  backdrop-filter: blur(10px);
  display: none;
}

#HEADER_NAV ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

#HEADER_NAV a {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  transition: all var(--transition-speed);
}

#HEADER_NAV a:hover {
  background: var(--primary-gradient);
}

#HEADER_NAV a::after {
  display: none;
}

/* Footer Navigation */
#FOOTER_NAV {
  margin-top: 4rem;
  padding: 2rem 0;
  width: 100%;
}

#FOOTER_NAV ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

#FOOTER_NAV li {
  display: inline-block;
}

#FOOTER_NAV a {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  display: block;
  border-radius: 0.5rem;
  transition: all var(--transition-speed);
}

#FOOTER_NAV a:hover {
  background: var(--card-bg);
}

/* Footer */
footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--card-border);
  width: 100%;
  text-align: center;
}

footer p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Form Elements */
form {
  width: 100%;
  max-width: 600px;
  margin: 2rem auto;
}

form div {
  margin-bottom: 1.5rem;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}

input,
textarea {
  width: 100%;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-speed);
  backdrop-filter: blur(10px);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

button[type="submit"] {
  padding: 1rem 3rem;
  background: var(--primary-gradient);
  border: none;
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-speed);
  font-family: inherit;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 3px solid var(--card-border);
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .lang-switcher {
    top: 1rem;
    right: 1rem;
  }

  #SITE_CONTAINER {
    padding: 3rem 1rem 1rem;
  }

  #FOOTER_NAV ul {
    flex-direction: column;
    gap: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  form {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .lang-switcher {
    top: 0.5rem;
    right: 0.5rem;
  }

  .lang-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }

  #SITE_CONTAINER {
    padding: 2.5rem 0.75rem 1rem;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  body::before {
    display: none;
  }

  .lang-switcher,
  #HEADER_NAV {
    display: none;
  }
}
