/**
 * 通知UIスタイル - 森の掲示板テーマ
 * 牧歌的で自然的なデザイン
 */

/* ========== 木の板の背景 ========== */
.notification-board-container {
  position: relative;
  background: linear-gradient(135deg, #8b6f47 0%, #6b5238 50%, #8b6f47 100%);
  border-radius: 20px;
  box-shadow: 
    0 0 0 4px #5a3f2a,
    0 0 0 8px #8b6f47,
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.notification-board-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.03) 2px,
      rgba(0, 0, 0, 0.03) 4px
    ),
    linear-gradient(
      180deg,
      rgba(139, 111, 71, 0.8) 0%,
      rgba(107, 82, 56, 0.9) 50%,
      rgba(139, 111, 71, 0.8) 100%
    );
  pointer-events: none;
  z-index: 0;
}

/* 木目のパターン */
.wood-grain {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(ellipse at 20% 30%, rgba(0, 0, 0, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 70%, rgba(0, 0, 0, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 40%, rgba(0, 0, 0, 0.06) 0%, transparent 50%);
  opacity: 0.6;
  animation: woodGrainShift 20s ease-in-out infinite;
}

@keyframes woodGrainShift {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(10px) translateY(5px); }
}

/* 装飾用の葉っぱと小枝 */
.board-decoration {
  position: absolute;
  font-size: 24px;
  opacity: 0.4;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

.leaf-1 {
  top: 10px;
  left: 20px;
  animation-delay: 0s;
}

.leaf-2 {
  top: 15px;
  right: 30px;
  animation-delay: 2s;
}

.leaf-3 {
  bottom: 20px;
  left: 15px;
  animation-delay: 4s;
}

.branch-1 {
  top: 50%;
  right: 10px;
  transform: rotate(45deg);
  animation-delay: 1s;
}

.branch-2 {
  bottom: 30px;
  right: 25px;
  transform: rotate(-30deg);
  animation-delay: 3s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(5deg);
  }
}

/* ========== コンテンツエリア ========== */
.notification-board-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255, 248, 235, 0.95);
  backdrop-filter: blur(2px);
}

/* ========== ヘッダー（木の板に彫られた文字） ========== */
.notification-board-header {
  padding: 24px 28px;
  background: linear-gradient(180deg, rgba(139, 111, 71, 0.3) 0%, rgba(107, 82, 56, 0.2) 100%);
  border-bottom: 3px solid #8b6f47;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.board-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.board-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: #5a3f2a;
  text-shadow: 
    2px 2px 0 rgba(255, 255, 255, 0.5),
    0 0 8px rgba(139, 111, 71, 0.3);
  font-family: "Noto Sans JP", sans-serif;
  letter-spacing: 1px;
}

.board-title-icon {
  font-size: 28px;
  animation: titleIconBounce 3s ease-in-out infinite;
}

@keyframes titleIconBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-3px) rotate(-5deg); }
  75% { transform: translateY(-3px) rotate(5deg); }
}

.board-title-text {
  position: relative;
}

.board-title-text::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #8b6f47, transparent);
  opacity: 0.5;
}

.board-subtitle {
  font-size: 13px;
  color: #6b5238;
  font-weight: 600;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.board-count {
  color: #c2410c;
  font-weight: 700;
  font-size: 14px;
  animation: countPulse 2s ease-in-out infinite;
}

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

.board-close-btn {
  background: rgba(139, 111, 71, 0.3);
  border: 2px solid #8b6f47;
  color: #5a3f2a;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.2);
  font-weight: 700;
  line-height: 1;
}

.board-close-btn:hover {
  background: rgba(194, 65, 12, 0.2);
  border-color: #c2410c;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    0 4px 8px rgba(194, 65, 12, 0.3);
}

/* ========== タブ（木の板の切り替え） ========== */
.notification-board-tabs {
  display: flex;
  border-bottom: 3px solid #8b6f47;
  background: linear-gradient(180deg, rgba(255, 248, 235, 0.8) 0%, rgba(250, 240, 220, 0.9) 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.board-tab {
  flex: 1;
  padding: 16px 20px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #6b5238;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  font-family: "Noto Sans JP", sans-serif;
}

.board-tab::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: #8b6f47;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.board-tab.active {
  color: #5a3f2a;
  background: rgba(255, 248, 235, 0.6);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.board-tab.active::before {
  transform: scaleX(1);
}

.board-tab:hover:not(.active) {
  background: rgba(139, 111, 71, 0.1);
  color: #8b6f47;
}

.tab-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.board-tab:hover .tab-icon {
  transform: scale(1.2) rotate(5deg);
}

.board-tab-badge {
  display: inline-block;
  padding: 2px 8px;
  background: linear-gradient(135deg, #c2410c 0%, #dc2626 100%);
  color: #fff;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 
    0 2px 4px rgba(194, 65, 12, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
  animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {
  0%, 100% {
    box-shadow: 
      0 2px 4px rgba(194, 65, 12, 0.4),
      inset 0 1px 2px rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow: 
      0 2px 8px rgba(194, 65, 12, 0.6),
      0 0 12px rgba(194, 65, 12, 0.3),
      inset 0 1px 2px rgba(255, 255, 255, 0.3);
  }
}

/* ========== フィルター（小さな木の板） ========== */
.notification-board-filters {
  padding: 14px 20px;
  border-bottom: 2px solid #d4a574;
  background: linear-gradient(180deg, rgba(255, 248, 235, 0.6) 0%, rgba(250, 240, 220, 0.8) 100%);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.board-filter-btn {
  padding: 8px 16px;
  border: 2px solid #d4a574;
  border-radius: 8px;
  background: rgba(255, 248, 235, 0.8);
  font-size: 13px;
  font-weight: 600;
  color: #6b5238;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.1);
  font-family: "Noto Sans JP", sans-serif;
}

.board-filter-btn:hover {
  background: rgba(212, 165, 116, 0.2);
  transform: translateY(-2px);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    0 4px 8px rgba(0, 0, 0, 0.15);
}

.board-filter-btn.active {
  background: linear-gradient(135deg, #8b6f47 0%, #6b5238 100%);
  color: #fff;
  border-color: #5a3f2a;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 2px 6px rgba(139, 111, 71, 0.4);
}

.filter-icon {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.board-filter-btn:hover .filter-icon {
  transform: rotate(15deg) scale(1.2);
}

.board-mark-all-btn {
  padding: 8px 16px;
  border: 2px solid #84a98c;
  border-radius: 8px;
  background: linear-gradient(135deg, #84a98c 0%, #6b8e6b 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    0 2px 4px rgba(132, 169, 140, 0.4);
  font-family: "Noto Sans JP", sans-serif;
}

.board-mark-all-btn:hover {
  background: linear-gradient(135deg, #6b8e6b 0%, #5a7a5a 100%);
  transform: translateY(-2px);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.4),
    0 4px 8px rgba(132, 169, 140, 0.5);
}

.mark-all-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.board-mark-all-btn:hover .mark-all-icon {
  transform: scale(1.3) rotate(360deg);
}

/* ========== 通知一覧（手紙が貼られた掲示板） ========== */
.notification-board-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 40px,
      rgba(139, 111, 71, 0.03) 40px,
      rgba(139, 111, 71, 0.03) 41px
    ),
    linear-gradient(180deg, rgba(255, 248, 235, 0.4) 0%, rgba(250, 240, 220, 0.6) 100%);
  min-height: 0;
  position: relative;
}

/* スクロールバーのスタイル */
.notification-board-list::-webkit-scrollbar {
  width: 12px;
}

.notification-board-list::-webkit-scrollbar-track {
  background: rgba(139, 111, 71, 0.1);
  border-radius: 6px;
}

.notification-board-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8b6f47 0%, #6b5238 100%);
  border-radius: 6px;
  border: 2px solid rgba(255, 248, 235, 0.3);
}

.notification-board-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6b5238 0%, #5a3f2a 100%);
}

/* ========== 空の状態 ========== */
.board-empty-state {
  padding: 80px 20px;
  text-align: center;
  color: #8b6f47;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: emptyIconFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(139, 111, 71, 0.3));
}

@keyframes emptyIconFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

.empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #6b5238;
  margin-bottom: 8px;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
  font-family: "Noto Sans JP", sans-serif;
}

.empty-subtitle {
  font-size: 14px;
  color: #8b6f47;
  opacity: 0.8;
}

/* ========== 通知カード（手作りの紙） ========== */
.notification-card {
  position: relative;
  background: linear-gradient(180deg, #fffef7 0%, #faf8f0 100%);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 16px;
  border: 2px solid #e8dcc6;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(139, 111, 71, 0.1);
  animation: cardAppear 0.5s ease-out;
  transform-origin: top center;
}

@keyframes cardAppear {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 押しピン */
.notification-card::before {
  content: '📌';
  position: absolute;
  top: -8px;
  left: 20px;
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  animation: pinShine 3s ease-in-out infinite;
  z-index: 2;
}

@keyframes pinShine {
  0%, 100% {
    transform: rotate(0deg) scale(1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  }
  50% {
    transform: rotate(5deg) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.6));
  }
}

/* 紙の質感（テクスチャ） */
.notification-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(139, 111, 71, 0.02) 2px,
      rgba(139, 111, 71, 0.02) 4px
    ),
    radial-gradient(
      circle at 20% 30%,
      rgba(139, 111, 71, 0.03) 0%,
      transparent 50%
    );
  pointer-events: none;
  border-radius: 8px;
}

/* 未読通知のスタイル */
.notification-card.unread {
  background: linear-gradient(180deg, #fff9e6 0%, #fff5d6 100%);
  border-color: #d4a574;
  box-shadow: 
    0 6px 16px rgba(212, 165, 116, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(212, 165, 116, 0.2),
    0 0 0 2px rgba(212, 165, 116, 0.2);
  animation: unreadCardGlow 2s ease-in-out infinite;
}

@keyframes unreadCardGlow {
  0%, 100% {
    box-shadow: 
      0 6px 16px rgba(212, 165, 116, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      inset 0 -1px 0 rgba(212, 165, 116, 0.2),
      0 0 0 2px rgba(212, 165, 116, 0.2);
  }
  50% {
    box-shadow: 
      0 8px 20px rgba(212, 165, 116, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      inset 0 -1px 0 rgba(212, 165, 116, 0.3),
      0 0 0 3px rgba(212, 165, 116, 0.3);
  }
}

/* 優先度別のスタイル */
.notification-card.priority-high {
  border-left: 6px solid #c2410c;
  background: linear-gradient(180deg, #fff5f5 0%, #ffe8e8 100%);
}

.notification-card.priority-high::before {
  content: '🔴📌';
  animation: pinShine 2s ease-in-out infinite;
}

.notification-card.priority-medium {
  border-left: 6px solid #d97706;
  background: linear-gradient(180deg, #fffbf0 0%, #fff8e6 100%);
}

.notification-card.priority-medium::before {
  content: '🟠📌';
}

.notification-card.priority-low {
  border-left: 6px solid #6b7280;
}

/* カテゴリ別のスタイル */
.notification-card.admin {
  border-top: 3px solid #8b6f47;
}

.notification-card.game {
  border-top: 3px solid #84a98c;
}

/* ホバーエフェクト */
.notification-card:hover {
  transform: translateY(-4px) rotate(0.5deg);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(139, 111, 71, 0.15);
  border-color: #d4a574;
}

.notification-card.unread:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 
    0 10px 28px rgba(212, 165, 116, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(212, 165, 116, 0.3),
    0 0 0 3px rgba(212, 165, 116, 0.3);
}

/* ========== 通知カードの内容 ========== */
.notification-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.notification-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 248, 235, 0.9) 0%, rgba(250, 240, 220, 0.9) 100%);
  border: 2px solid #e8dcc6;
  border-radius: 12px;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.notification-card:hover .notification-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    0 4px 8px rgba(0, 0, 0, 0.15);
}

.notification-card.admin .notification-icon {
  background: linear-gradient(135deg, rgba(139, 111, 71, 0.2) 0%, rgba(107, 82, 56, 0.3) 100%);
  border-color: #8b6f47;
}

.notification-card.game .notification-icon {
  background: linear-gradient(135deg, rgba(132, 169, 140, 0.2) 0%, rgba(107, 142, 107, 0.3) 100%);
  border-color: #84a98c;
}

.notification-content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.notification-title {
  font-size: 16px;
  font-weight: 700;
  color: #5a3f2a;
  margin-bottom: 6px;
  line-height: 1.4;
  text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8);
  font-family: "Noto Sans JP", sans-serif;
  letter-spacing: 0.5px;
}

.notification-card.unread .notification-title {
  color: #8b6f47;
  font-weight: 800;
}

.notification-message {
  font-size: 13px;
  color: #6b5238;
  line-height: 1.6;
  margin-bottom: 10px;
  opacity: 0.9;
  font-family: "Noto Sans JP", sans-serif;
}

.notification-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #8b6f47;
  flex-wrap: wrap;
}

.notification-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(139, 111, 71, 0.15);
  border: 1px solid rgba(139, 111, 71, 0.3);
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.notification-card.admin .notification-category {
  background: rgba(139, 111, 71, 0.2);
  border-color: #8b6f47;
  color: #6b5238;
}

.notification-card.game .notification-category {
  background: rgba(132, 169, 140, 0.2);
  border-color: #84a98c;
  color: #5a7a5a;
}

.notification-priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.notification-priority-badge.high {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.notification-priority-badge.medium {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #fcd34d;
}

.notification-priority-badge.low {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #4b5563;
  border: 1px solid #d1d5db;
}

.notification-unread-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 50%;
  box-shadow: 
    0 0 8px rgba(251, 191, 36, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
  animation: indicatorPulse 2s ease-in-out infinite;
  z-index: 2;
}

@keyframes indicatorPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 
      0 0 8px rgba(251, 191, 36, 0.6),
      inset 0 1px 2px rgba(255, 255, 255, 0.5);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.3);
    box-shadow: 
      0 0 16px rgba(251, 191, 36, 0.8),
      inset 0 1px 2px rgba(255, 255, 255, 0.6);
  }
}

/* ========== モバイル対応 ========== */
@media (max-width: 768px) {
  .notification-board-container {
    max-width: 95vw !important;
    width: calc(100% - 16px) !important;
    max-height: 95vh !important;
    height: 90vh !important;
  }

  .notification-board-header {
    padding: 16px 20px;
  }

  .board-title {
    font-size: 20px;
  }

  .board-title-icon {
    font-size: 24px;
  }

  .notification-card {
    padding: 14px 16px;
  }

  .notification-icon {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .notification-title {
    font-size: 15px;
  }

  .notification-message {
    font-size: 12px;
  }

  .board-decoration {
    font-size: 18px;
  }
}
