/* リセットCSS */

html {
  background-color: #fff;
  -webkit-overflow-scrolling: touch;
}

body::before {
  display: none !important;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ベース設定 */
body {
  font-family: "M PLUS Rounded 1c", "Bubblegum Sans", "Arial Rounded MT Bold",
    sans-serif;
  background: linear-gradient(135deg, #ffb3c1 0%, #ffc8dd 50%, #ffb3c1 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ヘッダー */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  padding: 20px 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(255, 182, 193, 0.3);
}

/* ナビゲーションメニュー */
.nav-menu {
  display: none;
}

.menu-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 40px;
}

.menu-item {
  text-decoration: none;
  color: #ff69b4;
  font-size: 18px;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.menu-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 182, 193, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.menu-item:hover::before {
  width: 100%;
  height: 100%;
}

.menu-item:hover {
  color: #fff;
  background: linear-gradient(135deg, #ff69b4, #ffb3c1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 105, 180, 0.3);
}

.menu-item.active {
  background: linear-gradient(135deg, #ff69b4, #ffb3c1);
  color: #fff;
}

/* モバイルメニューボタン */
.mobile-menu-btn {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 35px;
  height: 30px;
  cursor: pointer;
  z-index: 1002;
  padding: 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  background: rgba(255, 182, 193, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background: linear-gradient(90deg, #ff69b4, #ffb3c1);
  border-radius: 3px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-btn span:nth-child(1) {
  top: 8px;
}

.mobile-menu-btn span:nth-child(2) {
  top: 50%;
  transform: translate(-50%, -50%);
}

.mobile-menu-btn span:nth-child(3) {
  bottom: 8px;
}

.mobile-menu-btn.active {
  background: rgba(255, 105, 180, 0.2);
}

.mobile-menu-btn.active span {
  background: linear-gradient(90deg, #ff1493, #ff69b4);
}

.mobile-menu-btn.active span:nth-child(1) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

.mobile-menu-btn.active span:nth-child(3) {
  bottom: 50%;
  transform: translate(-50%, 50%) rotate(-45deg);
}

/* モバイルメニュー */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* Fallback then dynamic viewport to avoid iOS Safari overflow */
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 230, 240, 0.98) 50%,
    rgba(255, 240, 250, 0.98) 100%
  );
  backdrop-filter: blur(20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  /* Safe area paddings for iPhone notch/home bar */
  padding-right: 20px;
  padding-left: 20px;
  padding-top: calc(70px + env(safe-area-inset-top));
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: 0 10px 40px rgba(255, 105, 180, 0.2);
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.deco-emoji {
  position: absolute;
  font-size: 2.5rem;
  opacity: 0.15;
  animation: floatDeco 6s ease-in-out infinite;
}

.deco-1 {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.deco-2 {
  top: 25%;
  right: 15%;
  animation-delay: 1.5s;
}

.deco-3 {
  bottom: 25%;
  left: 15%;
  animation-delay: 3s;
}

.deco-4 {
  bottom: 15%;
  right: 10%;
  animation-delay: 4.5s;
}

.mobile-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 80px;
  position: relative;
}

.mobile-menu-list::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    #ffb3c1,
    #ff69b4,
    #ffb3c1,
    transparent
  );
  border-radius: 3px;
}

.mobile-menu-item {
  display: inline-block;
  text-decoration: none;
  color: #ff69b4;
  padding: 18px 40px;
  margin: 5px 0;
  border-radius: 30px;
  transition: all 0.3s ease;
  text-align: center;
  font-size: 20px;
  min-width: 220px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.9),
    rgba(255, 240, 250, 0.9)
  );
  box-shadow: 5px 5px 15px rgba(255, 182, 193, 0.2),
    -5px -5px 15px rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
  font-weight: bold;
  letter-spacing: 1px;
}

.mobile-menu-item::before {
  content: "✨";
  position: absolute;
  top: 50%;
  left: -30px;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s ease;
}

.mobile-menu-item::after {
  content: "✨";
  position: absolute;
  top: 50%;
  right: -30px;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s ease;
}

.mobile-menu-item:hover::before,
.mobile-menu-item:hover::after {
  opacity: 1;
}

.mobile-menu-item:hover::before {
  left: 10px;
}

.mobile-menu-item:hover::after {
  right: 10px;
}

.mobile-menu-item:hover,
.mobile-menu-item.active {
  background: linear-gradient(135deg, #ff69b4, #ffb3c1);
  color: #fff;
  transform: scale(1.08) rotate(-1deg);
  box-shadow: 0 8px 25px rgba(255, 105, 180, 0.4),
    inset 0 0 20px rgba(255, 255, 255, 0.3);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.mobile-menu.active .mobile-menu-item {
  animation: slideInBounce 0.6s ease forwards;
  opacity: 0;
}

.mobile-menu-item:nth-child(1) {
  animation-delay: 0.1s;
}
.mobile-menu-item:nth-child(2) {
  animation-delay: 0.2s;
}
.mobile-menu-item:nth-child(3) {
  animation-delay: 0.3s;
}
.mobile-menu-item:nth-child(4) {
  animation-delay: 0.4s;
}
.mobile-menu-item:nth-child(5) {
  animation-delay: 0.5s;
}

/* メインコンテンツ */
.main-content {
  padding-top: 100px;
  padding-bottom: 50px;
  min-height: 100vh;
}

/* ページタイトル */
.page-title-container {
  text-align: center;
  margin-bottom: 30px;
  animation: fadeInDown 0.8s ease;
}

.page-title {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.title-en {
  font-family: "Bubblegum Sans", cursive;
  font-size: 3.5rem;
  color: #fff;
  text-shadow: 3px 3px 0px #ff69b4, 6px 6px 0px rgba(255, 105, 180, 0.5),
    9px 9px 20px rgba(255, 105, 180, 0.3);
  letter-spacing: 3px;
  animation: float 3s ease-in-out infinite;
}

.title-jp {
  font-size: 1.2rem;
  color: #ff69b4;
  background: rgba(255, 255, 255, 0.8);
  padding: 5px 20px;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(255, 105, 180, 0.2);
}

.news-subtitle {
  font-size: 1rem;
  color: #fff;
  margin-top: 10px;
  text-shadow: 1px 1px 3px rgba(255, 105, 180, 0.5);
}

/* カテゴリフィルター */
.category-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
  padding: 0 20px;
  animation: fadeIn 1s ease;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 25px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid transparent;
  border-radius: 25px;
  color: #ff69b4;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(255, 182, 193, 0.2);
}

.filter-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 15px rgba(255, 105, 180, 0.3);
}

.filter-btn.active {
  background: linear-gradient(135deg, #ff69b4, #ffb3c1);
  color: #fff;
  border-color: #ff69b4;
}

.filter-icon {
  font-size: 1.2rem;
}

/* ニュースセクション */
.news-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.news-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 40px;
}

/* ニュースアイテム */
.news-item {
  display: flex;
  gap: 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(255, 182, 193, 0.3),
    inset 0 0 30px rgba(255, 240, 250, 0.5);
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease backwards;
  position: relative;
  overflow: hidden;
}

.news-item::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 182, 193, 0.1) 0%,
    transparent 70%
  );
  animation: rotate 20s linear infinite;
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 105, 180, 0.4),
    inset 0 0 40px rgba(255, 240, 250, 0.7);
}

/* 日付部分 */
.news-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 15px;
  background: linear-gradient(135deg, #ff69b4, #ffb3c1);
  border-radius: 15px;
  color: #fff;
  text-align: center;
  position: relative;
  z-index: 1;
}

.date-year {
  font-size: 0.8rem;
  opacity: 0.9;
}

.date-month {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
}

.date-day {
  font-size: 2rem;
  font-weight: bold;
  line-height: 1;
}

/* ニュースコンテンツ */
.news-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.news-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.news-category {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: bold;
  color: #fff;
}

.category-exhibition {
  background: linear-gradient(135deg, #ff69b4, #ff8fa3);
}

.category-award {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
}

.category-media {
  background: linear-gradient(135deg, #87ceeb, #b0e0e6);
}

.category-other {
  background: linear-gradient(135deg, #dda0dd, #e6b8ea);
}

.news-new {
  display: inline-block;
  padding: 3px 10px;
  background: #ff1493;
  color: #fff;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: bold;
  animation: pulse 2s ease-in-out infinite;
}

.news-title {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 10px;
  font-weight: bold;
}

.news-text {
  font-size: 1rem;
  line-height: 1.7;
  color: #666;
  margin-bottom: 15px;
}

.news-footer {
  display: flex;
  justify-content: flex-end;
}

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ff69b4;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.news-link:hover {
  color: #ff1493;
  transform: translateX(5px);
}

/* ローディング */
.loading-spinner {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  border: 5px solid rgba(255, 182, 193, 0.3);
  border-top: 5px solid #ff69b4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ニュースがない場合 */
.no-news {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(255, 182, 193, 0.3);
}

.no-news-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 20px;
}

.no-news p {
  font-size: 1.2rem;
  color: #999;
}

/* もっと見るボタン */
.load-more-container {
  text-align: center;
  margin-top: 40px;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 40px;
  background: linear-gradient(135deg, #ff69b4, #ffb3c1);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(255, 105, 180, 0.3);
}

.load-more-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 105, 180, 0.4);
}

.btn-icon {
  font-size: 1.3rem;
  animation: bounce 1s ease-in-out infinite;
}

/* ページ装飾 */
.page-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-emoji {
  position: absolute;
  font-size: 2rem;
  opacity: 0.3;
  animation: floatAround 15s ease-in-out infinite;
}

.emoji-1 {
  top: 20%;
  left: 5%;
  animation-delay: 0s;
}

.emoji-2 {
  top: 40%;
  right: 5%;
  animation-delay: 3s;
}

.emoji-3 {
  bottom: 30%;
  left: 10%;
  animation-delay: 6s;
}

.emoji-4 {
  bottom: 20%;
  right: 10%;
  animation-delay: 9s;
}

.emoji-5 {
  top: 60%;
  left: 50%;
  animation-delay: 12s;
}

/* アニメーション */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

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

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

@keyframes floatAround {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(30px, -30px) rotate(90deg);
  }
  50% {
    transform: translate(-20px, 20px) rotate(180deg);
  }
  75% {
    transform: translate(40px, 10px) rotate(270deg);
  }
}

@keyframes floatDeco {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-20px) rotate(10deg) scale(1.1);
  }
  50% {
    transform: translateY(10px) rotate(-5deg) scale(0.95);
  }
  75% {
    transform: translateY(-10px) rotate(5deg) scale(1.05);
  }
}

@keyframes slideInBounce {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  60% {
    opacity: 1;
    transform: translateY(5px) scale(1.02);
  }
  80% {
    transform: translateY(-2px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* レスポンシブデザイン */
@media (min-width: 768px) {
  .nav-menu {
    display: block;
  }

  .mobile-menu-btn {
    display: none;
  }

  .mobile-menu {
    display: none;
  }
}

@media (max-width: 767px) {
  .title-en {
    font-size: 2.5rem;
  }

  .title-jp {
    font-size: 1rem;
  }

  .news-subtitle {
    font-size: 0.9rem;
  }

  .category-filter {
    gap: 10px;
  }

  .filter-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .filter-icon {
    font-size: 1rem;
  }

  .news-item {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
  }

  .news-date {
    flex-direction: row;
    gap: 10px;
    width: 100%;
    padding: 10px;
  }

  .date-year,
  .date-month,
  .date-day {
    font-size: 1rem;
  }

  .news-title {
    font-size: 1.1rem;
  }

  .news-text {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding-top: 80px;
    padding-bottom: 30px;
  }

  .title-en {
    font-size: 2rem;
  }

  .category-filter {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 15px;
    font-size: 0.85rem;
  }

  .news-section {
    padding: 0 15px;
  }

  .news-item {
    padding: 15px;
  }

  .news-title {
    font-size: 1rem;
  }

  .news-text {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .load-more-btn {
    padding: 12px 30px;
    font-size: 1rem;
  }

  .float-emoji {
    font-size: 1.5rem;
  }
}

/* カスタムスクロールバー */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff69b4, #ffb3c1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ff1493, #ff69b4);
}
