/* AYATORI 職業カタログ - Main Styles */
* {
  box-sizing: border-box;
}

/* 画像の読み込み最適化 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 画像の遅延読み込み対応 */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[data-src].loaded {
  opacity: 1;
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f6f9fc;
  color: #333;
  line-height: 1.6;
}

html {
  scroll-behavior: auto;
}

/* スクロールエフェクト */
.scroll-effect {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.scroll-effect.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-effect-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease-out;
}

.scroll-effect-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.scroll-effect-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease-out;
}

.scroll-effect-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scroll-effect-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s ease-out;
}

.scroll-effect-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.scroll-effect-fade {
  opacity: 0;
  transition: opacity 1s ease-out;
}

.scroll-effect-fade.visible {
  opacity: 1;
}

/* ローディングアニメーション */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-container {
  text-align: center;
  color: white;
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(1) {
  animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
  animation-delay: 0.3s;
  transform: scale(0.8);
}

.spinner-ring:nth-child(3) {
  animation-delay: 0.6s;
  transform: scale(0.6);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin: 1rem 0;
  background: linear-gradient(45deg, #fff, #f0f8ff, #fff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* グローバルナビゲーション */
.global-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1c1c40;
  text-decoration: none;
  letter-spacing: 0.1em;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.nav-menu li a {
  color: #1c1c40;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-menu li a:hover {
  color: #ff7755;
}

.nav-menu li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff7755;
  transition: width 0.3s ease;
}

.nav-menu li a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: #1c1c40;
  margin: 3px 0;
  transition: 0.3s;
}

/* ヘッダーにナビゲーション分のマージンを追加 */
.anime-header {
  margin-top: 70px;
}

/* Anime-style header */
.anime-header {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
  color: white;
  text-align: center;
  padding: 3em 0;
  margin-bottom: 2em;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* Anime background with animated gradient */
.anime-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
  animation: backgroundShift 8s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%, 100% { 
    background-position: 0% 50%, 100% 50%, 50% 50%;
  }
  33% { 
    background-position: 100% 50%, 0% 50%, 50% 50%;
  }
  66% { 
    background-position: 50% 50%, 50% 50%, 0% 50%;
  }
}

header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2em;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3em;
  align-items: center;
}

/* Hero content */
.hero-content {
  text-align: left;
  z-index: 10;
  position: relative;
}

.hero-text {
  animation: slideInLeft 1s ease-out;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b9d, #f093fb);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
  animation: bounceIn 1.2s ease-out;
}

.anime-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, #fff, #f0f8ff, #fff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.anime-subtitle {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.3rem;
  line-height: 1.8;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.anime-cta {
  font-size: 1.2rem;
  padding: 1.2em 2.5em;
  border-radius: 50px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border: none;
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
  animation: bounceIn 1s ease-out 0.6s both;
  transition: all 0.3s ease;
}

.anime-cta:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
  background: linear-gradient(45deg, #ff5252, #26a69a);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hero illustration */
.hero-illustration {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  height: 100vh;
  width: 100%;
  max-width: 800px;
}

/* Key visual with main character */
.key-visual {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slideInRight 1s ease-out 0.3s both;
  z-index: 1;
}

.main-character-placeholder {
  font-size: 8rem;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 3;
  animation: float 3s ease-in-out infinite;
}

.hero-main-image {
  width: 500px;
  height: 500px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 3;
  animation: float 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.hero-main-image:hover {
  transform: scale(1.05);
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.character-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 30%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 3s ease-in-out infinite;
  z-index: 2;
}

@keyframes glowPulse {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Typography */
h1, h2, h3 {
  margin: 0 0 1rem 0;
  font-weight: 600;
}

h2 {
  font-size: 1.5rem;
  color: #1c1c40;
  margin-top: 1em;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, #ff7755, #4a90e2);
  border-radius: 2px;
}

p {
  line-height: 1.8;
  color: #333;
  margin: 0 0 1rem 0;
}

/* Section Layout */
section {
  padding: 4em 2em;
  position: relative;
  margin-bottom: 0;
}

/* Alternating section backgrounds */
section:nth-child(odd) {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

section:nth-child(even) {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.section-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding: 0 2em;
}

/* Buttons */
.cta-button {
  display: inline-block;
  background: #ff7755;
  color: white;
  padding: 1em 2em;
  margin-top: 1em;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(255, 119, 85, 0.2);
}

.cta-button:hover {
  background: #e65a3a;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 119, 85, 0.3);
}

/* Category Cards */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.category-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff7755, #4a90e2, #ff7755);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  width: 120px;
  height: 120px;
  max-width: 100%;
}

.category-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.category-image:hover {
  transform: scale(1.05);
}

/* カテゴリアイコンのレスポンシブ対応 */
@media (max-width: 768px) {
  .category-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .category-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

.category-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
}

.category-card p {
  color: #666;
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.category-roles {
  font-size: 1.1rem;
  font-weight: 600;
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: inline-block;
}

/* Role Cards */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.role-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
  overflow: hidden;
}

.role-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* 職業カテゴリ別の色分け */
.role-card.web-impl {
  border-left: 5px solid #667eea;
}

.role-card.web-impl:hover {
  border-color: #667eea;
}

.role-card.content {
  border-left: 5px solid #4ecdc4;
}

.role-card.content:hover {
  border-color: #4ecdc4;
}

.role-card.data {
  border-left: 5px solid #ff6b6b;
}

.role-card.data:hover {
  border-color: #ff6b6b;
}

.role-card.visual {
  border-left: 5px solid #f093fb;
}

.role-card.visual:hover {
  border-color: #f093fb;
}

.role-card.system {
  border-left: 5px solid #ff7755;
}

.role-card.system:hover {
  border-color: #ff7755;
}

.role-card.project {
  border-left: 5px solid #764ba2;
}

.role-card.project:hover {
  border-color: #764ba2;
}

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.role-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  flex-shrink: 0;
}

.role-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.role-image:hover {
  transform: scale(1.1);
}

/* ロールアイコンのレスポンシブ対応 */
@media (max-width: 768px) {
  .role-icon {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .role-icon {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}

.role-id {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.role-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.role-subtitle {
  font-size: 0.9rem;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 1rem;
}

.role-description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.role-stats {
  margin: 1.5rem 0;
}

.stat {
  margin-bottom: 0.8rem;
}

.stat-label {
  font-size: 0.8rem;
  color: #666;
  display: block;
  margin-bottom: 0.3rem;
}

.stat-bar {
  background: #e2e8f0;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.stat-fill {
  background: linear-gradient(90deg, #667eea, #764ba2);
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.role-character {
  font-size: 0.9rem;
  color: #999;
  text-align: right;
  margin-top: 1rem;
  font-style: italic;
}

/* Diagnosis CTA Section */
#diagnosis-cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
}

#diagnosis-cta h2 {
  color: white;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

#diagnosis-cta h2::after {
  background: rgba(255, 255, 255, 0.3);
}

#diagnosis-cta p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

#diagnosis-cta .cta-button {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  font-size: 1.2rem;
  padding: 1.2em 2.5em;
  border-radius: 50px;
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

#diagnosis-cta .cta-button:hover {
  background: linear-gradient(45deg, #ff5252, #26a69a);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.diagnosis-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-item {
  text-align: center;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-item h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-item p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin: 0;
}

/* Footer */
footer {
  background: linear-gradient(135deg, #1c1c40 0%, #2a4a7a 100%);
  color: white;
  margin-top: 4em;
  padding: 3em 2em 1em;
  width: 100%;
  box-sizing: border-box;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: #ff7755;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin: 0.5rem 0;
  padding: 0;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #ff7755;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* トップに戻るボタン */
.scroll-to-top-btn {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Decorative elements */
.decoration-dots {
  position: absolute;
  width: 100px;
  height: 100px;
  opacity: 0.1;
  pointer-events: none;
}

.decoration-dots.top-right {
  top: 2rem;
  right: 2rem;
  background: radial-gradient(circle, #ff7755 2px, transparent 2px);
  background-size: 20px 20px;
}

.decoration-dots.bottom-left {
  bottom: 2rem;
  left: 2rem;
  background: radial-gradient(circle, #4a90e2 2px, transparent 2px);
  background-size: 15px 15px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  section {
    padding: 3em 1em;
  }
  
  .anime-header {
    padding: 2em 0;
    min-height: 80vh;
  }
  
  .anime-header .container {
    padding: 0 1.5em;
    grid-template-columns: 1fr;
    gap: 2em;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .anime-title {
    font-size: 2.2rem;
  }
  
  .anime-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-illustration {
    height: 60vh;
    max-width: 600px;
  }
  
  .main-character-placeholder {
    font-size: 6rem;
  }
  
  .hero-main-image {
    width: 400px;
    height: 400px;
    max-width: 100%;
  }
  
  .character-glow {
    width: 350px;
    height: 350px;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  .section-content {
    padding: 0 1em;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .roles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .diagnosis-features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-nav {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* ナビゲーションのレスポンシブ */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: left 0.3s ease;
    gap: 1rem;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
}

@media screen and (max-width: 600px) {
  section {
    padding: 2em 1em;
  }
  
  .anime-header {
    padding: 1.5em 0;
    min-height: 70vh;
  }
  
  .anime-header .container {
    padding: 0 1em;
    gap: 1.5em;
  }
  
  .anime-title {
    font-size: 2rem;
  }
  
  .anime-subtitle {
    font-size: 1rem;
  }
  
  .hero-illustration {
    height: 50vh;
    max-width: 500px;
  }
  
  .main-character-placeholder {
    font-size: 5rem;
  }
  
  .hero-main-image {
    width: 300px;
    height: 300px;
    max-width: 100%;
  }
  
  .character-glow {
    width: 300px;
    height: 300px;
  }
  
  h2 {
    font-size: 1.2rem;
  }
  
  .anime-cta {
    padding: 1em 2em;
    font-size: 1rem;
  }
  
  .category-card {
    padding: 1.5rem;
  }
  
  .category-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .role-card {
    padding: 1.5rem;
  }
  
  .role-icon {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  
  .roles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  #diagnosis-cta h2 {
    font-size: 1.8rem;
  }
  
  .scroll-to-top-btn {
    bottom: 80px;
    right: 15px;
    width: 45px;
    height: 45px;
  }
}

/* Additional animations for role cards */
.role-card:nth-child(1) { animation-delay: 0.1s; }
.role-card:nth-child(2) { animation-delay: 0.2s; }
.role-card:nth-child(3) { animation-delay: 0.3s; }
.role-card:nth-child(4) { animation-delay: 0.4s; }
.role-card:nth-child(5) { animation-delay: 0.5s; }
.role-card:nth-child(6) { animation-delay: 0.6s; }
.role-card:nth-child(7) { animation-delay: 0.7s; }
.role-card:nth-child(8) { animation-delay: 0.8s; }
.role-card:nth-child(9) { animation-delay: 0.9s; }
.role-card:nth-child(10) { animation-delay: 1.0s; }
.role-card:nth-child(11) { animation-delay: 1.1s; }

/* Section decorations */
section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff7755, #4a90e2, #ff7755);
}

/* Link Styles */
a {
  color: #ff7755;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #e65a3a;
}

/* Strong text */
strong {
  color: #1c1c40;
  font-weight: 600;
}

/* 左右フロート広告ユニット */
.float-ad-left,
.float-ad-right {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  width: 160px;
  max-width: 160px;
  transition: all 0.3s ease;
}

.float-ad-left {
  left: 20px;
}

.float-ad-right {
  right: 20px;
}

.ad-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  position: relative;
}

.ad-label {
  position: absolute;
  top: 5px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  z-index: 1001;
}

/* 広告のホバーエフェクト */
.float-ad-left:hover,
.float-ad-right:hover {
  transform: translateY(-50%) scale(1.02);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* 広告の非表示ボタン */
.ad-close {
  position: absolute;
  top: 5px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  transition: all 0.3s ease;
}

.ad-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

/* レスポンシブ対応 */
@media (max-width: 1400px) {
  .float-ad-left,
  .float-ad-right {
    width: 160px;
    max-width: 160px;
  }
  
  .float-ad-left {
    left: 10px;
  }
  
  .float-ad-right {
    right: 10px;
  }
}

@media (max-width: 1200px) {
  .float-ad-left,
  .float-ad-right {
    display: none;
  }
}

/* タブレット表示での調整 */
@media (max-width: 1024px) and (min-width: 769px) {
  .float-ad-left,
  .float-ad-right {
    display: block;
    width: 160px;
    max-width: 160px;
    top: 60%;
  }
  
  .float-ad-left {
    left: 5px;
  }
  
  .float-ad-right {
    right: 5px;
  }
}

/* モバイル表示では完全に非表示 */
@media (max-width: 768px) {
  .float-ad-left,
  .float-ad-right {
    display: none !important;
  }
}

/* 広告のアニメーション */
@keyframes adSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

.float-ad-left {
  animation: adSlideIn 0.6s ease-out 1s both;
}

.float-ad-right {
  animation: adSlideIn 0.6s ease-out 1.2s both;
}

/* 広告の表示制御 */
.ad-hidden {
  display: none !important;
}

/* 広告のコンテンツ調整 */
.adsbygoogle {
  display: block !important;
  width: 100%;
  height: 600px;
  max-width: 160px;
  margin: 0 auto;
}

/* 広告エリアの最小高さ確保 */
.ad-container {
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}