@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --background: 240 10% 98%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 262 83% 58%;
  --primary-foreground: 210 40% 98%;
  --secondary: 220 14.3% 95.9%;
  --secondary-foreground: 220.9 39.3% 11%;
  --muted: 220 14.3% 95.9%;
  --muted-foreground: 220 8.9% 46.1%;
  --accent: 262 83% 58%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 220 13% 91%;
  --input: 220 13% 91%;
  --ring: 262 83% 58%;
  --radius: 0.75rem;
}

.dark {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --popover: 222.2 84% 4.9%;
  --popover-foreground: 210 40% 98%;
  --primary: 210 40% 98%;
  --primary-foreground: 222.2 47.4% 11.2%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 217.2 32.6% 17.5%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 212.7 26.8% 83.9%;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  color: hsl(var(--foreground));
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
  font-size: 1.2rem; /* ベースフォントサイズを1.2倍に */
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, 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% 80%, rgba(120, 200, 255, 0.3) 0%, transparent 50%);
  z-index: -2;
  animation: floatingOrbs 20s ease-in-out infinite;
}

#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}

.floating-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.floating-element {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(5px);
  animation: floatUpDown 6s ease-in-out infinite;
}

.floating-element-1 {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 8s;
}

.floating-element-2 {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 15%;
  animation-delay: -2s;
  animation-duration: 10s;
}

.floating-element-3 {
  width: 60px;
  height: 60px;
  top: 40%;
  left: 80%;
  animation-delay: -4s;
  animation-duration: 7s;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
.header {
  text-align: center;
  padding: 8rem 0 2rem;
}

.title {
  font-size: 4.2rem; /* 3.5rem × 1.2 */
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 30%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(255, 255, 255, 0.5);
  position: relative;
}

.title a {
  color: inherit;
  text-decoration: none;
  background: inherit;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  border-radius: 2px;
  animation: shimmer 3s ease-in-out infinite;
}

.subtitle {
  font-size: 1.65rem; /* 1.375rem × 1.2 */
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Card Component */
.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.card-header {
  padding: 1.5rem 1.5rem 0;
}

.card-content {
  padding: 1.5rem;
}

.card-footer {
  padding: 0 1.5rem 1.5rem;
}

/* Form Container */
.form-container, .result-container {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.form-container::before,
.result-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

/* Description Section */
.description-section {
  padding: 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
}

.description-section h2 {
  font-size: 1.8rem; /* 1.5rem × 1.2 */
  font-weight: 600;
  margin-bottom: 1rem;
  color: hsl(var(--primary));
}

.description-section p {
  color: hsl(var(--muted-foreground));
  line-height: 1.7;
  margin-bottom: 0.75rem;
  font-size: 1.2rem; /* 1rem × 1.2 */
}

.description-section h3 {
  font-size: 1.5rem; /* 1.25rem × 1.2 */
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
  color: hsl(var(--primary));
}

.description-section ul {
  margin: 1rem 0 1.5rem 1.5rem;
  color: hsl(var(--muted-foreground));
}

.description-section li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.description-section strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

/* Form Styles */
.birthdate-form {
  padding: 1.5rem;
}

.form-section h3 {
  font-size: 1.65rem; /* 1.375rem × 1.2 */
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: hsl(var(--foreground));
  text-align: center;
}

/* Select Group Styles */
.select-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.select-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
}

.select-item label {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  display: none; /* ラベルを非表示 */
}

.select-item select {
  width: 100%;
  min-width: 120px;
  padding: 0.875rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 1.2rem; /* 1rem × 1.2 */
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  transition: all 0.2s ease;
  font-weight: 500;
  cursor: pointer;
}

.select-item select:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.2);
}

.select-item select:hover {
  border-color: hsl(var(--primary));
}

/* Legacy input group styles for compatibility */
.input-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

.input-group input {
  width: 90px;
  padding: 0.875rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 1.125rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  text-align: center;
  transition: all 0.2s ease;
  font-weight: 500;
}

.input-group input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.2);
}

.input-group label {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 1.125rem;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 1.2rem; /* 1rem × 1.2 */
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 50%, #f9a8d4 100%);
  color: white;
  padding: 0.875rem 2rem;
  height: 3.6rem; /* 3rem × 1.2 */
}

.btn-primary:hover {
  background: linear-gradient(135deg, #db2777 0%, #ec4899 50%, #f472b6 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn-outline {
  border: 2px solid hsl(var(--border));
  background: transparent;
  color: hsl(var(--foreground));
  padding: 0.875rem 2rem;
  height: 3rem;
}

.btn-outline:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  border-color: hsl(var(--accent));
}

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 50%, #f9a8d4 100%);
  background-size: 200% 200%;
  animation: gradientMove 3s ease infinite;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1.35rem; /* 1.125rem × 1.2 */
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 4.2rem; /* 3.5rem × 1.2 */
  position: relative;
  overflow: hidden;
}

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

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(236, 72, 153, 0.4);
}

.reset-btn {
  width: 100%;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  padding: 1rem 2rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 3rem;
  margin-top: 1rem;
}

.reset-btn:hover {
  background: hsl(var(--muted));
  transform: translateY(-1px);
}

/* Result Styles */
.result-header {
  text-align: center;
  padding: 2rem 1.5rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
}

.animal-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.animal-image {
  margin-bottom: 0.5rem;
}

.animal-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: var(--radius);
}

.animal-name {
  font-size: 2.7rem; /* 2.25rem × 1.2 */
  font-weight: 700;
  color: hsl(var(--primary));
  text-align: center;
  line-height: 1.2;
}

/* Details Section */
.details-section {
  padding: 1.5rem;
}

.details-section h2 {
  font-size: 1.8rem; /* 1.5rem × 1.2 */
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: hsl(var(--primary));
  text-align: center;
}

.detail-item {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 1.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.detail-item h3 {
  font-size: 1.35rem; /* 1.125rem × 1.2 */
  font-weight: 600;
  margin-bottom: 0.875rem;
  color: #1f2937;
  letter-spacing: -0.025em;
}

.detail-item p {
  color: #4b5563;
  line-height: 1.75;
  font-size: 1.14rem; /* 0.95rem × 1.2 */
  margin: 0;
}

/* Error Message */
.error-message {
  background: hsl(var(--destructive) / 0.1);
  border: 1px solid hsl(var(--destructive) / 0.2);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.error-message p {
  color: hsl(var(--destructive));
  font-size: 0.875rem;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0.75rem;
  }
  
  .title {
    font-size: 3rem; /* 2.5rem × 1.2 */
  }
  
  .subtitle {
    font-size: 1.5rem; /* 1.25rem × 1.2 */
  }
  
  .form-container, .result-container {
    margin: 0 0.5rem;
  }
  
  .animal-img {
    width: 160px;
    height: 160px;
  }
  
  .animal-name {
    font-size: 1.8rem; /* 1.5rem × 1.2 */
  }
  
  .input-group {
    gap: 0.5rem;
  }
  
  .input-group input {
    width: 70px;
    padding: 0.5rem;
  }
  
  .select-group {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .select-item {
    width: 100%;
    max-width: 200px;
  }
  
  .btn-large {
    margin: 0 2.5rem !important;
    min-width: 0 !important;
    max-width: 280px !important;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 6rem 0 1.5rem;
  }
  
  .title {
    font-size: 2.1rem; /* 1.75rem × 1.2 */
  }
  
  .animal-img {
    width: 140px;
    height: 140px;
  }
  
  .detail-item {
    padding: 1rem;
  }
}

/* Animation utilities */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes floatingOrbs {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  33% {
    transform: translateY(-20px) rotate(120deg);
    opacity: 0.9;
  }
  66% {
    transform: translateY(10px) rotate(240deg);
    opacity: 0.5;
  }
}

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

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

@keyframes sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatUpDown {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(120deg);
  }
  66% {
    transform: translateY(10px) rotate(240deg);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* 結果ページ専用スタイル */
.breadcrumb {
  margin-bottom: 2rem;
  margin-top: 10px;
  margin-left: 10px;
  font-size: 1.08rem; /* 0.9rem × 1.2 */
}

.breadcrumb a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #6b7280;
}

.breadcrumb span {
  color: #6b7280;
  font-weight: 500;
}

.animal-number-badge {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(10px);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-section {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.action-section .btn {
  min-width: 200px;
}

.btn-large {
  padding: 1.25rem 3rem !important;
  font-size: 1.5rem !important; /* 1.25rem × 1.2 */
  height: 4.8rem !important; /* 4rem × 1.2 */
  min-width: 360px !important; /* 300px × 1.2 */
}

@media (max-width: 768px) {
  .btn-large {
    min-width: 0 !important;
  }
}

.related-content {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
  text-align: center;
}

.related-content h2 {
  color: hsl(var(--primary));
  margin-bottom: 1rem;
  font-size: 1.8rem; /* 1.5rem × 1.2 */
}

.related-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.related-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(262 83% 68%));
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.3s ease;
}

.related-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px hsl(var(--primary) / 0.4);
}

/* Focus visible for accessibility */
.btn:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.banner-area {
  margin: 2rem 0;
  text-align: center;
}

.header-banner {
  position:fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  text-align: center;
  background-color: #fff;
  padding: 2px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}