/**
 * Fun UI Styles
 * 楽しくてワクワクする、分かりやすいUIスタイル
 */

/* ===== Hero Sections ===== */
.fun-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
}

.fun-hero-small {
  min-height: 40vh;
  background: var(--gradient-primary);
  color: white;
  text-align: center;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(251, 191, 36, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(244, 114, 182, 0.1) 0%, transparent 50%);
}

.floating-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-element {
  position: absolute;
  font-size: 3rem;
  opacity: 0.8;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.floating-element:nth-child(1) { top: 10%; left: 10%; animation-delay: var(--delay, 0s); }
.floating-element:nth-child(2) { top: 20%; right: 15%; animation-delay: var(--delay, 0s); }
.floating-element:nth-child(3) { bottom: 20%; left: 20%; animation-delay: var(--delay, 0s); }
.floating-element:nth-child(4) { bottom: 30%; right: 10%; animation-delay: var(--delay, 0s); }
.floating-element:nth-child(5) { top: 50%; left: 50%; animation-delay: var(--delay, 0s); }

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: #15803d;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Fun Sections ===== */
.fun-section {
  padding: 4rem 0;
  position: relative;
}

.fun-section:nth-child(even) {
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--color-primary-800);
}

.text-center {
  text-align: center;
}

/* ===== Event Preview Card ===== */
.event-date-big {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--gradient-sunset);
  color: white;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.date-icon {
  font-size: 2rem;
  animation: wiggle 2s ease-in-out infinite;
}

/* ===== Countdown Styles ===== */
.countdown-fancy {
  text-align: center;
  margin: 2rem 0;
}

.countdown-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-primary-700);
}

.countdown-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.countdown-item {
  background: white;
  border: 3px solid var(--color-primary-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  min-width: 80px;
  text-align: center;
  transition: all 0.3s var(--animation-bounce);
}

.countdown-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary-600);
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.25rem;
}

.countdown-separator {
  font-size: 2rem;
  color: var(--color-primary-400);
  font-weight: 700;
}

/* ===== Quick Stats ===== */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-primary-100);
  transition: all 0.3s var(--animation-smooth);
}

.stat-card:hover {
  border-color: var(--color-primary-300);
  background: var(--color-primary-50);
}

.stat-icon {
  font-size: 2rem;
}

.stat-info {
  flex: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: #666;
}

.stat-value {
  font-weight: 700;
  color: var(--color-primary-700);
}

/* ===== About Cards Grid ===== */
.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* ===== Topics Cloud ===== */
.topics-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 2rem 0;
}

.topic-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s var(--animation-bounce);
  cursor: default;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  animation: fade-in 0.5s ease forwards;
}

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

.topic-tag--primary {
  background: var(--gradient-primary);
  color: white;
}

.topic-tag--yellow {
  background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
  color: #92400e;
}

.topic-tag--pink {
  background: linear-gradient(135deg, #fce7f3 0%, #f472b6 100%);
  color: white;
}

.topic-tag--blue {
  background: linear-gradient(135deg, #dbeafe 0%, #60a5fa 100%);
  color: white;
}

.topic-tag--orange {
  background: linear-gradient(135deg, #fed7aa 0%, #fb923c 100%);
  color: white;
}

.topic-tag--purple {
  background: linear-gradient(135deg, #e9d5ff 0%, #a78bfa 100%);
  color: white;
}

.topic-tag--cyan {
  background: linear-gradient(135deg, #cffafe 0%, #22d3ee 100%);
  color: #164e63;
}

/* ===== Fun Controls ===== */
.fun-controls {
  background: white;
  padding: 2rem 0;
  border-bottom: 3px solid var(--color-primary-100);
  position: sticky;
  top: 80px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.controls-wrapper {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Search Box */
.fun-search {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.search-box {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 2px solid var(--color-primary-200);
  border-radius: var(--radius-full);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
  background: white;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  opacity: 0.6;
}

/* Filter Group */
.filter-group {
  display: flex;
  gap: 0.5rem;
}

.fun-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-primary-200);
  border-radius: var(--radius-lg);
  background: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 150px;
}

.fun-select:hover {
  border-color: var(--color-primary-300);
  background: var(--color-primary-50);
}

.fun-select:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

/* View Toggle */
.fun-toggle {
  display: flex;
  background: var(--color-primary-100);
  border-radius: var(--radius-lg);
  padding: 0.25rem;
}

.toggle-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.25rem;
  color: var(--color-primary-600);
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.5);
}

.toggle-btn.active {
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--color-primary-700);
}

/* ===== Events Grid ===== */
.events-header {
  margin-bottom: 2rem;
}

.events-count {
  font-size: 1.125rem;
  color: var(--color-primary-700);
  font-weight: 600;
}

.events-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}

.events-grid.grid-view {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.events-grid.list-view {
  grid-template-columns: 1fr;
}

.events-grid.list-view .fun-card {
  max-width: 100%;
}

.events-grid.list-view .fun-card--event {
  display: flex;
  flex-direction: row;
}

.events-grid.list-view .fun-card__icon-wrapper {
  width: 120px;
  flex-shrink: 0;
}

/* ===== Fun Loading State ===== */
.fun-loading {
  text-align: center;
  padding: 4rem 2rem;
}

.loading-animation {
  margin-bottom: 2rem;
}

.loading-icon {
  font-size: 4rem;
  color: var(--color-primary-500);
  display: inline-block;
}

/* ===== Fun Empty State ===== */
.fun-empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-icon {
  font-size: 5rem;
  margin-bottom: 2rem;
  opacity: 0.5;
}

/* ===== Fun Pagination ===== */
.fun-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--color-primary-200);
  border-radius: var(--radius-lg);
  background: white;
  color: var(--color-primary-700);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(.disabled) {
  background: var(--color-primary-50);
  border-color: var(--color-primary-300);
  transform: translateY(-2px);
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 0.25rem;
}

.page-number {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: white;
  color: var(--color-primary-700);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-number:hover {
  background: var(--color-primary-50);
  border-color: var(--color-primary-200);
}

.page-number.active {
  background: var(--gradient-primary);
  color: white;
  transform: scale(1.1);
}

.page-dots {
  display: inline-flex;
  align-items: center;
  padding: 0 0.5rem;
  color: #999;
}

.pagination-info {
  text-align: center;
  margin-top: 1rem;
  color: #666;
  font-size: 0.875rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .fun-hero {
    min-height: 60vh;
  }
  
  .floating-element {
    font-size: 2rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .countdown-item {
    min-width: 70px;
    padding: 1rem;
  }
  
  .countdown-value {
    font-size: 2rem;
  }
  
  .controls-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  .fun-search {
    min-width: 100%;
  }
  
  .filter-group {
    width: 100%;
    flex-direction: column;
  }
  
  .fun-select {
    width: 100%;
  }
  
  .events-grid.grid-view {
    grid-template-columns: 1fr;
  }
  
  .about-cards {
    grid-template-columns: 1fr;
  }
  
  .topic-tag {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
}