/* ============================================ */
/* 애니메이션 정의                              */
/* ============================================ */
@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes slideAnimation {
  0%, 23% { transform: translateX(0); }
  25%, 48% { transform: translateX(-25%); }
  50%, 73% { transform: translateX(-50%); }
  75%, 98% { transform: translateX(-75%); }
  100% { transform: translateX(0); }
}

/* ============================================ */
/* 기본 스타일                                  */
/* ============================================ */
body {
  font-family: 'Pretendard', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #563495, #31205d, #16437b, #57e2a6);
  background-size: 400% 400%;
  animation: gradientAnimation 20s ease infinite;
  color: #fff;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #64ffda;
}

/* ============================================ */
/* Hero 섹션                                    */
/* ============================================ */
.hero {
  text-align: center;
  padding: 100px 40px 80px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 25px;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #64ffda, #563495, #57e2a6);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 50px;
  color: #64ffda;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 25px;
  animation: fadeInDown 0.8s ease;
}

.hero-badge svg {
  animation: rotate 3s linear infinite;
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-size: 4em;
  margin: 0 0 15px 0;
  background: linear-gradient(135deg, #fff 0%, #64ffda 50%, #a8b8d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeIn 1s ease 0.2s both;
  letter-spacing: -1px;
}

.hero h3 {
  color: #a8b8d0;
  font-weight: 500;
  margin-top: 10px;
  font-size: 1.3em;
  animation: fadeIn 1s ease 0.4s both;
}

.hero-description {
  color: #a8b8d0;
  font-size: 1.1em;
  line-height: 1.8;
  max-width: 700px;
  margin: 30px auto;
  animation: fadeIn 1s ease 0.6s both;
}

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

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 40px 0;
  animation: fadeIn 1s ease 0.8s both;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1em;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.hero-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.hero-btn:hover::before {
  width: 300px;
  height: 300px;
}

.hero-btn svg {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.hero-btn:hover svg {
  transform: scale(1.1) rotate(5deg);
}

.hero-btn.primary {
  background: linear-gradient(135deg, #57e2a6, #16437b);
  color: #fff;
  border: 2px solid transparent;
  box-shadow: 0 5px 20px rgba(87, 226, 166, 0.3);
}

.hero-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(87, 226, 166, 0.5);
  color: #fff;
}

.hero-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #64ffda;
  border: 2px solid rgba(100, 255, 218, 0.3);
}

.hero-btn.secondary:hover {
  background: rgba(100, 255, 218, 0.1);
  border-color: #64ffda;
  transform: translateY(-3px);
  color: #64ffda;
}

/* ============================================ */
/* Stats 섹션                                   */
/* ============================================ */
.stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 50px 0 0;
  animation: fadeIn 1s ease 1s both;
}

.stat-item {
  text-align: center;
  padding: 25px 30px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #64ffda, transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.stat-item:hover::before {
  transform: translateX(100%);
}

.stat-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(100, 255, 218, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-icon {
  color: #64ffda;
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}

.stat-item:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
}

.number {
  font-size: 2.5em;
  font-weight: bold;
  background: linear-gradient(135deg, #64ffda, #57e2a6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 10px 0;
}

.label {
  color: #a8b8d0;
  font-size: 0.9em;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ============================================ */
/* 서버 모니터링 카드                            */
/* ============================================ */
.monitoring-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 25px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 20px;
}

.monitoring-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.monitoring-icon {
  margin-right: 20px;
  color: #57e2a6;
}

.monitoring-content {
  flex-grow: 1;
}

.monitoring-content h4 {
  margin: 0 0 5px 0;
  color: #fff;
  font-weight: 600;
}

.monitoring-content p {
  margin: 0;
  color: #a8b8d0;
  font-size: 0.9em;
}

.btn-monitoring {
  background: linear-gradient(135deg, #57e2a6, #16437b);
  color: #fff;
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-monitoring:hover {
  color: #fff;
  text-decoration: none;
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(87, 226, 166, 0.4);
}

/* ============================================ */
/* 포스터 섹션                                   */
/* ============================================ */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin: 40px 0 80px;
}

.poster-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.poster-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(100, 255, 218, 0.3);
}

.poster-image {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: linear-gradient(135deg, #563495, #16437b);
}

.poster-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.poster-card:hover .poster-image img {
  transform: scale(1.05);
}

.poster-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 45px;
  height: 45px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(100, 255, 218, 0.5);
}

.poster-number {
  color: #64ffda;
  font-size: 1.3em;
  font-weight: bold;
}

.poster-content {
  padding: 25px;
}

.poster-title {
  font-size: 1.5em;
  margin: 0 0 12px 0;
  color: #fff;
  background: linear-gradient(135deg, #64ffda 0%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.poster-description {
  color: #a8b8d0;
  font-size: 0.95em;
  line-height: 1.6;
  margin: 0 0 20px 0;
  min-height: 60px;
}

.poster-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.1), rgba(87, 226, 166, 0.1));
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 25px;
  color: #64ffda;
  font-weight: 600;
  font-size: 0.95em;
  transition: all 0.3s ease;
  text-decoration: none;
}

.poster-btn:hover {
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.2), rgba(87, 226, 166, 0.2));
  border-color: #64ffda;
  transform: translateX(5px);
  color: #64ffda;
}

.poster-btn svg {
  transition: transform 0.3s ease;
}

.poster-btn:hover svg {
  transform: translateX(3px);
}

/* ============================================ */
/* 연구 분야 섹션                                */
/* ============================================ */
.section-title {
  text-align: center;
  font-size: 2.5em;
  margin: 80px 0 40px;
  background: linear-gradient(135deg, #fff 0%, #a8b8d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin: 60px 0;
}

.research-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 15px;
  transition: transform 0.3s;
}

.research-item:hover {
  transform: translateY(-5px);
}

.research-item h2 {
  margin: 0 0 15px 0;
  color: #fff;
}

.research-item h5 {
  color: #a8b8d0;
  margin: 0;
  font-weight: normal;
}

.typhoon-years {
  margin-top: 20px;
}

.typhoon-years h4 {
  margin-top: 15px;
  margin-bottom: 8px;
  color: #a8b8d0;
}

.typhoon-years p {
  margin: 5px 0 15px 0;
  line-height: 1.6;
}

.typhoon-years a {
  display: inline-block;
  margin-right: 5px;
  transition: color 0.2s;
}

.typhoon-years a:hover {
  color: #64ffda;
  text-decoration: underline;
}

/* ============================================ */
/* AI 예측 카드                                 */
/* ============================================ */
.ai-prediction-card {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  margin: 40px 0;
  padding: 30px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.ai-prediction-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #64ffda, #563495);
}

.ai-prediction-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

.ai-prediction-flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: flex-start;
}

.ai-prediction-info {
  flex: 1;
  min-width: 300px;
}

.ai-prediction-visual {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-top: 30px;
}

.ai-prediction-title {
  background: linear-gradient(135deg, #64ffda 0%, #a8b8d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2.5em;
  margin: 0 0 10px 0;
}

.ai-prediction-subtitle {
  color: #64ffda;
  margin-top: 5px;
  margin-bottom: 20px;
  font-size: 1.1em;
}

.ai-prediction-info .stats {
  justify-content: flex-start;
  margin: 25px 0;
  gap: 15px;
}

.ai-prediction-info .stat-item {
  font-size: 0.9em;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 140px;
}

.ai-prediction-info .stat-item .number {
  font-size: 1.3em;
  font-weight: 700;
  color: #64ffda;
  background: none;
  -webkit-text-fill-color: #64ffda;
  margin: 0 0 5px 0;
}

.ai-prediction-info .stat-item .label {
  font-size: 0.75em;
  line-height: 1.4;
}

.ai-prediction-info .model-info {
  justify-content: flex-start;
}

.ai-button-container {
  margin-top: 20px;
  text-align: center;
}

.ai-button {
  display: inline-block;
  padding: 12px 25px;
  background: rgba(100, 255, 218, 0.1);
  border-radius: 8px;
  transition: all 0.3s;
  border: 1px solid rgba(100, 255, 218, 0.3);
  font-weight: bold;
}

.ai-button:hover {
  background: rgba(100, 255, 218, 0.2);
  transform: translateY(-2px);
}

.model-info {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.model-badge {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 8px 15px;
  font-size: 0.9em;
  color: #a8b8d0;
}

.confidence-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  margin: 25px auto 5px;
  overflow: hidden;
}

.confidence-level {
  height: 100%;
  width: 65%;
  background: linear-gradient(90deg, #64ffda, #563495);
  border-radius: 5px;
}

.confidence-text {
  color: #a8b8d0;
  font-size: 0.9em;
  margin-top: 5px;
}

/* ============================================ */
/* 태풍 선택 네비게이션                          */
/* ============================================ */
.typhoon-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  max-width: 100%;
  width: 100%;
}

.typhoon-nav {
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64ffda;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
}

.typhoon-nav:hover {
  background: rgba(100, 255, 218, 0.2);
  transform: scale(1.1);
}

.typhoon-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.typhoon-slider {
  overflow: hidden;
  flex: 1;
  border-radius: 10px;
  padding-right: 5px;
}

.typhoon-track {
  display: flex;
  gap: 8px;
  transition: transform 0.3s ease;
  transform: translateX(0);
}

.typhoon-button {
  padding: 15px 25px;
  background: rgba(22, 67, 123, 0.4);
  color: #a8b8d0;
  border: 1px solid rgba(87, 226, 166, 0.2);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  margin: 0;
  white-space: nowrap;
  font-size: 1.1em;
  flex-shrink: 0;
}

.typhoon-button:hover {
  background: rgba(22, 67, 123, 0.7);
  color: #fff;
  transform: translateY(-2px);
}

.typhoon-button.active {
  background: linear-gradient(135deg, #57e2a6, #16437b);
  color: #fff;
  border: 1px solid #57e2a6;
  box-shadow: 0 0 15px rgba(87, 226, 166, 0.5);
}

/* ============================================ */
/* 이미지 슬라이더                               */
/* ============================================ */
.slider-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  height: 280px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider {
  display: flex;
  width: 400%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  width: 25%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.slide-caption {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 5px;
  font-size: 0.9em;
}

.slider-nav {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s;
}

.slider-dot.active {
  background: #64ffda;
}

.slider.animated {
  animation: slideAnimation 20s infinite;
}

.slider.animated:hover {
  animation-play-state: paused;
}

/* ============================================ */
/* 반응형 디자인                                 */
/* ============================================ */
@media (max-width: 768px) {
  .typhoon-selector {
    max-width: 450px;
  }
  
  .typhoon-button {
    padding: 5px 8px;
    font-size: 0.75em;
    min-width: 65px;
  }
  
  .typhoon-nav {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .ai-prediction-flex-container {
    flex-direction: column;
  }
  
  .ai-prediction-info, 
  .ai-prediction-visual {
    width: 100%;
  }
  
  .ai-prediction-info .stats {
    justify-content: center;
  }
  
  .ai-prediction-info .model-info {
    justify-content: center;
  }

  /* 포스터 반응형 */
  .poster-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .poster-image {
    height: 300px;
  }

  .poster-title {
    font-size: 1.3em;
  }

  .poster-description {
    font-size: 0.9em;
    min-height: auto;
  }

  /* 히어로 반응형 */
  .hero {
    padding: 60px 25px;
  }

  .hero h1 {
    font-size: 2.5em;
  }

  .hero h3 {
    font-size: 1.1em;
  }

  .hero-description {
    font-size: 1em;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .stats {
    flex-direction: column;
    gap: 15px;
  }

  .stat-item {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .typhoon-selector {
    max-width: 360px;
  }
  
  .typhoon-button {
    padding: 4px 6px;
    font-size: 0.7em;
    min-width: 55px;
  }
  
  .typhoon-nav {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
}
