/* ============================================
   STYLE.CSS - メインスタイルシート
   ============================================ */

/* ---- CSS Variables ---- */
:root {
  --bg:        #0f172a;
  --bg-2:      #1e293b;
  --bg-3:      #0d1425;
  --primary:   #6366f1;
  --primary-l: #818cf8;
  --primary-d: #4f46e5;
  --accent:    #22c55e;
  --accent-l:  #4ade80;
  --text:      #ffffff;
  --text-2:    #cbd5e1;
  --text-3:    #64748b;
  --border:    rgba(99,102,241,0.25);
  --card-bg:   rgba(30,41,59,0.85);
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 8px 32px rgba(0,0,0,0.4);
  --font-display: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
  --font-body:    'Noto Sans JP', sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ---- Noise overlay ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  padding-bottom: 60px;
}

/* ---- Section Header ---- */
.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #fff 30%, var(--primary-l));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-subtitle {
  font-size: 0.78rem;
  color: var(--text-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  margin: 32px auto;
  max-width: 300px;
  border: none;
  opacity: 0.5;
}

/* ---- Card ---- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(99,102,241,0.25);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}

.btn:hover::after { background: rgba(255,255,255,0.08); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-d) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.45);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(99,102,241,0.65);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-l);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(99,102,241,0.12);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #16a34a 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(34,197,94,0.4);
}

.btn-accent:hover {
  box-shadow: 0 8px 32px rgba(34,197,94,0.6);
  transform: translateY(-2px);
}

.btn-full { width: 100%; }

/* ---- Nav Back Button ---- */
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 0.85rem;
  padding: 10px 0;
  transition: color 0.2s;
}

.nav-back:hover { color: var(--primary-l); }

.nav-back svg { width: 18px; height: 18px; }

/* ---- Tags ---- */
.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border: 1px solid;
}

.tag-primary { background: rgba(99,102,241,0.15); border-color: var(--primary); color: var(--primary-l); }
.tag-accent  { background: rgba(34,197,94,0.12);  border-color: var(--accent);  color: var(--accent-l);  }

/* ---- Glowing ring decoration ---- */
.glow-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  pointer-events: none;
  animation: spin-ring 12s linear infinite;
}

/* ---- Loading bar ---- */
.loading-bar-wrap {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto;
}

.loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width 0.1s linear;
}

/* ============================================
   WELCOME PAGE
   ============================================ */
#welcome-page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 100;
  overflow: hidden;
}

#particles-js {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.welcome-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.welcome-thanks {
  font-size: 0.82rem;
  letter-spacing: 0.3em;
  color: var(--accent-l);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeInDown 0.8s ease 0.3s forwards;
}

.welcome-logo {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 12vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  opacity: 0;
  animation: welcome-text 1.4s ease 0.6s forwards;
}

.welcome-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeIn 0.6s ease 1.6s forwards;
}

.welcome-loading-text {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--text-3);
  text-transform: uppercase;
}

/* spinning ring */
.welcome-ring {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px dashed rgba(99,102,241,0.25);
  animation: spin-ring 20s linear infinite;
  pointer-events: none;
}

.welcome-ring-2 {
  width: 480px;
  height: 480px;
  border: 1px solid rgba(34,197,94,0.1);
  animation: spin-ring 30s linear infinite reverse;
}

/* ============================================
   MAIN PAGE — HERO
   ============================================ */
.hero-section {
  position: relative;
  padding: 14px 0 24px;
  text-align: center;
}

/* Swiper override */
.profile-swiper {
  width: 200px;
  height: 200px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 6px rgba(99,102,241,0.15), 0 0 40px rgba(99,102,241,0.4);
  animation: pulse-glow 3s ease-in-out infinite, float 4s ease-in-out infinite;
}

.profile-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin-bottom: 6px;
}

.profile-title {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--accent-l);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.profile-bio {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.8;
  max-width: 320px;
  margin: 0 auto 24px;
}

/* ---- SNS Links ---- */
.sns-grid {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.sns-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  min-width: 76px;
}

.sns-btn:hover {
  border-color: var(--primary);
  background: rgba(99,102,241,0.12);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.3);
}

.sns-btn svg { width: 24px; height: 24px; }
.sns-btn span { font-size: 0.68rem; letter-spacing: 0.08em; color: var(--text-3); }

/* ---- Main Nav Buttons ---- */
.main-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}

.main-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.main-nav-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px 0 0 4px;
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.main-nav-btn:hover::before { transform: scaleY(1); }

.main-nav-btn:hover {
  border-color: var(--primary);
  background: rgba(30,41,59,0.95);
  transform: translateX(4px);
  box-shadow: 0 8px 32px rgba(99,102,241,0.2);
}

.main-nav-btn-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.nav-icon-costume  { background: rgba(99,102,241,0.2);  }
.nav-icon-schedule { background: rgba(34,197,94,0.15);  }
.nav-icon-other    { background: rgba(248,113,113,0.15); }

.nav-label {
  display: flex;
  flex-direction: column;
}

.nav-label-main {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.nav-label-sub {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 2px;
  letter-spacing: 0.05em;
}

.nav-arrow {
  color: var(--text-3);
  transition: transform 0.3s, color 0.3s;
}

.main-nav-btn:hover .nav-arrow {
  transform: translateX(4px);
  color: var(--primary-l);
}

/* ============================================
   ITEMS (COSTUME) PAGE
   ============================================ */
.items-header {
  padding: 40px 0 28px;
}

.costume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.costume-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.costume-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 40px rgba(99,102,241,0.3);
}

.costume-thumb {
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
}

.costume-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.costume-card:hover .costume-thumb img {
  transform: scale(1.08);
}

.costume-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(99,102,241,0.2) 0%, rgba(34,197,94,0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.costume-info {
  padding: 12px 14px;
}

.costume-name {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.costume-meta {
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 3px;
}

/* ============================================
   COSTUME DETAIL PAGE
   ============================================ */
.costume-detail-header {
  padding: 40px 0 24px;
}

.costume-detail-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.costume-detail-desc {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 24px;
}

/* Lightbox-style gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 32px;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-item:hover {
  border-color: var(--primary);
  transform: scale(1.03);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.1); }

.gallery-item:first-child {
  grid-column: span 3;
  aspect-ratio: 4/3;
}

/* Lightbox overlay */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(8px);
}

/* ============================================
   SCHEDULE PAGE
   ============================================ */
.schedule-header {
  padding: 40px 0 24px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-2);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot-blue  { background: #3b82f6; box-shadow: 0 0 6px rgba(59,130,246,0.6); }
.legend-dot-red   { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.6);  }
.legend-dot-green { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.6);  }

/* FullCalendar overrides */
.fc {
  font-family: var(--font-body);
  font-size: 0.82rem;
}

.fc-theme-standard td,
.fc-theme-standard th,
.fc-theme-standard .fc-scrollgrid {
  border-color: var(--border) !important;
}

.fc .fc-toolbar {
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.fc .fc-toolbar-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.fc .fc-button {
  background: rgba(99,102,241,0.2) !important;
  border: 1px solid var(--primary) !important;
  color: var(--primary-l) !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 0.78rem !important;
  box-shadow: none !important;
  transition: background 0.2s !important;
}

.fc .fc-button:hover {
  background: rgba(99,102,241,0.4) !important;
}

.fc .fc-button-active, .fc .fc-button:disabled {
  background: var(--primary) !important;
  color: #fff !important;
}

.fc .fc-daygrid-day {
  background: transparent;
}

.fc .fc-day-today {
  background: rgba(99,102,241,0.08) !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
  background: var(--primary);
  border-radius: 50%;
  color: #fff;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.fc .fc-daygrid-day-number {
  color: var(--text-2);
  font-size: 0.8rem;
  padding: 4px 6px;
}

.fc .fc-col-header-cell-cushion {
  color: var(--text-3);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fc-event {
  border: none !important;
  border-radius: 4px !important;
  font-size: 0.7rem !important;
  padding: 1px 4px !important;
  cursor: pointer;
}

.fc-event-title { font-weight: 600; }

.fc-event-photo    { background: rgba(59,130,246,0.85) !important; }
.fc-event-public   { background: rgba(239,68,68,0.85) !important; }
.fc-event-attend   { background: rgba(34,197,94,0.85) !important; }

/* Upcoming events list */
.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.upcoming-item {
  display: flex;
  align-items: stretch;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 14px 16px;
  transition: all 0.3s ease;
}

.upcoming-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.upcoming-accent {
  width: 4px;
  border-radius: 4px;
  flex-shrink: 0;
  margin: -14px -8px -14px 0;
}

.upcoming-date {
  font-size: 0.72rem;
  color: var(--text-3);
  white-space: nowrap;
  margin-right: 4px;
  min-width: 72px;
}

.upcoming-title {
  font-weight: 600;
  font-size: 0.88rem;
}

.upcoming-sub {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 2px;
}

/* ============================================
   EVENT DETAIL PAGE
   ============================================ */
.event-detail-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
}

.event-detail-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.4;
}

.event-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.event-detail-row:last-child { border-bottom: none; }

.event-detail-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.event-detail-label {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-bottom: 2px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-detail-value {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

/* ============================================
   OTHER PAGE
   ============================================ */
.other-hero {
  padding: 60px 0 40px;
  text-align: center;
}

.other-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 32px;
}

.other-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
}

.other-card-link:hover {
  border-color: var(--primary);
  background: rgba(99,102,241,0.1);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(99,102,241,0.25);
}

.other-card-icon {
  font-size: 2rem;
}

.other-card-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  text-align: center;
  padding: 32px 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--text-3);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ============================================
   RESPONSIVE — wider screens center content
   ============================================ */
@media (min-width: 520px) {
  .container { padding: 0 24px; }
  .profile-swiper { width: 220px; height: 220px; }
}
