/*
Theme Name: Toyohashi Seichi Map
Theme URI: https://example.com/anime-seichi-map
Author: Seichi Map Dev
Author URI: https://example.com
Description: 豊橋聖地巡礼マップサイト用WordPressテーマ。ユーザー投稿機能、Googleマップ連携、AdSense対応。
Version: 3.1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: anime-seichi
Tags: map, anime, user-submission, responsive, custom-post-type
*/

/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --secondary: #457b9d;
  --secondary-dark: #1d3557;
  --accent: #f4a261;
  --accent-light: #e9c46a;
  --bg: #f8f9fa;
  --bg-card: #ffffff;
  --text: #2b2d42;
  --text-light: #6c757d;
  --text-white: #ffffff;
  --border: #dee2e6;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font-heading: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-body: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --max-width: 1200px;
  --header-height: 70px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   Layout
   ============================================ */
.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.content-area {
  flex: 1;
  padding: 40px 0;
}

.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* ============================================
   Header
   ============================================ */
.site-header {
  background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%);
  color: var(--text-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.site-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-title a {
  color: var(--text-white);
}

.site-title a:hover {
  color: var(--accent-light);
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
}

.main-nav a {
  color: rgba(255,255,255,0.85);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
  background: linear-gradient(135deg, var(--secondary-dark) 0%, #264653 50%, var(--secondary) 100%);
  color: var(--text-white);
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1.5" fill="rgba(255,255,255,0.08)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.06)"/><circle cx="40" cy="70" r="2" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="80" r="1.5" fill="rgba(255,255,255,0.07)"/></svg>');
  background-size: 200px;
  animation: floatBg 30s linear infinite;
}

@keyframes floatBg {
  from { background-position: 0 0; }
  to { background-position: 200px 200px; }
}

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

.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero-title .accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.hero-buttons .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
}

@media (max-width: 768px) {
  .hero-stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    justify-content: initial;
  }
}

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

.hero-stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.hero-stat-label {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 4px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  line-height: 1.4;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230,57,70,0.3);
}

.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: var(--text-white);
  border: 2px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  color: var(--text-white);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: var(--text-white);
}

/* ============================================
   Map Section
   ============================================ */
.map-section {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1rem;
}

#seichi-map,
.mymap-wrapper iframe {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 3px solid var(--border);
}

.mymap-placeholder {
  width: 100%;
  min-height: 400px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 3px solid var(--border);
  background: linear-gradient(135deg, #f0f4f8 0%, #e8ecf0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.mymap-placeholder-inner {
  max-width: 500px;
}

.map-controls {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.map-filter-btn {
  padding: 8px 20px;
  border-radius: 50px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.map-filter-btn:hover,
.map-filter-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(230,57,70,0.05);
}

/* ============================================
   Spot Cards Grid
   ============================================ */
.spots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

.spot-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.spot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.spot-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--border);
}

.spot-card-body {
  padding: 20px;
}

.spot-card-anime {
  display: inline-block;
  background: rgba(230,57,70,0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  margin-bottom: 8px;
}

.spot-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.spot-card-address {
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 12px;
}

.spot-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-light);
}

.spot-card-author {
  font-weight: 600;
}

/* Spot card image wrapper & status overlay */
.spot-card-image-wrap {
  position: relative;
  display: block;
}

.spot-card-status {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 50px;
  color: var(--text-white);
  z-index: 2;
}

.spot-card-status.status-ended {
  background: rgba(0,0,0,0.7);
}

.spot-card-status.status-ongoing {
  background: rgba(46,184,92,0.9);
}

.spot-card-status.status-upcoming {
  background: rgba(69,123,157,0.9);
}

.spot-card-ended .spot-card-image {
  opacity: 0.5;
}

.spot-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* ============================================
   Submission Form
   ============================================ */
.submission-section {
  background: var(--bg-card);
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

.submission-form {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg);
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text);
}

.form-label .required {
  color: var(--primary);
  margin-left: 4px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-card);
  transition: border-color var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(69,123,157,0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-card);
}

.form-file-upload:hover {
  border-color: var(--secondary);
  background: rgba(69,123,157,0.03);
}

.form-file-upload .upload-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.form-file-upload .upload-text {
  color: var(--text-light);
  font-size: 0.9rem;
}

.image-preview {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.image-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
}

.form-notice {
  background: rgba(69,123,157,0.08);
  border-left: 4px solid var(--secondary);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.form-submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.05rem;
}

/* ============================================
   Single Spot
   ============================================ */
.single-spot-header {
  position: relative;
}

.single-spot-image {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  border-radius: var(--radius);
  margin-bottom: 24px;
  background: var(--bg);
}

.single-spot-map {
  width: 100%;
  border-radius: var(--radius);
  margin: 24px 0;
  border: 2px solid var(--border);
  overflow: hidden;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}

.single-spot-map iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.spot-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.detail-meta-item {
  background: var(--bg);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.detail-meta-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-meta-value {
  font-weight: 600;
  font-size: 1rem;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.widget-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.widget li:last-child {
  border-bottom: none;
}

.widget li a {
  color: var(--text);
  font-size: 0.9rem;
}

.widget li a:hover {
  color: var(--primary);
}

/* AdSense Placeholder */
.ad-widget {
  text-align: center;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.8rem;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination .current {
  background: var(--primary);
  color: var(--text-white);
  border-color: var(--primary);
}

/* ============================================
   Gallery & Lightbox
   ============================================ */
.spot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.spot-gallery-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition);
}

.spot-gallery-image:hover {
  opacity: 0.85;
}

.spot-gallery-image:first-child:nth-last-child(1) {
  grid-column: 1 / -1;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  background: var(--bg);
}

/* Lightbox overlay */
.aseichi-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: fadeIn 0.2s ease;
}

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

.aseichi-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  color: white;
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

@media (max-width: 768px) {
  .spot-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .spot-gallery-image {
    height: 160px;
  }
}

/* ============================================
   Access Counter
   ============================================ */
.access-counter {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 12px 0;
  border: 1px solid rgba(255,255,255,0.08);
}

.counter-item {
  flex: 1;
  text-align: center;
  padding: 4px 16px;
}

.counter-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 2px;
}

.counter-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.counter-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.12);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--secondary-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col-title {
  color: var(--text-white);
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

/* ============================================
   Messages / Notices
   ============================================ */
.notice {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.notice-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.notice-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.notice-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* ============================================
   Loading / Spinner
   ============================================ */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

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

/* ============================================
   Comments
   ============================================ */
.comments-area {
  margin-top: 40px;
}

.comment-list {
  list-style: none;
}

.comment {
  padding: 20px;
  margin-bottom: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.comment-author {
  font-weight: 700;
  margin-bottom: 8px;
}

/* ============================================
   Search
   ============================================ */
.search-form {
  display: flex;
  gap: 8px;
}

.search-field {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.search-submit {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
}

/* ============================================
   404
   ============================================ */
.error-404 {
  text-align: center;
  padding: 80px 20px;
}

.error-404 h1 {
  font-size: 6rem;
  color: var(--primary);
  font-weight: 900;
}

/* ============================================
   SNS Share Buttons
   ============================================ */
.share-buttons {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.share-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 12px;
}

.share-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-white);
  transition: all var(--transition);
  text-decoration: none;
  min-height: 50px;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  color: var(--text-white);
  opacity: 0.9;
}

.share-btn:active {
  transform: translateY(0);
}

.share-btn-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.share-btn-label {
  font-size: 0.75rem;
  font-weight: 600;
}

.share-x {
  background: #000000;
}

.share-fb {
  background: #1877f2;
}

.share-line {
  background: #06c755;
}

.share-hatena {
  background: #00a4de;
}

@media (max-width: 768px) {
  .share-icons {
    grid-template-columns: repeat(2, 1fr);
  }

  .share-btn {
    padding: 16px 8px;
    min-height: 54px;
    font-size: 0.9rem;
  }
}

/* ============================================
   Pending Notice
   ============================================ */
.pending-notice {
  max-width: 700px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(244,162,97,0.1) 0%, rgba(230,57,70,0.08) 100%);
  border: 2px solid rgba(244,162,97,0.25);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  text-align: center;
}

.pending-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.pending-text strong {
  color: var(--primary);
  font-size: 1.05rem;
}

/* ============================================
   Event Cards
   ============================================ */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

.event-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.event-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.event-card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.event-card-body {
  padding: 20px;
}

.event-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.event-card-anime {
  display: inline-block;
  background: rgba(102,126,234,0.1);
  color: #667eea;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
}

.event-status-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
}

.status-upcoming {
  background: rgba(69,123,157,0.12);
  color: var(--secondary);
}

.status-ongoing {
  background: rgba(46,184,92,0.12);
  color: #2eb85c;
}

.status-ended {
  background: rgba(108,117,125,0.12);
  color: var(--text-light);
}

.event-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.event-card-title a {
  color: var(--text);
}

.event-card-title a:hover {
  color: var(--primary);
}

.event-card-venue,
.event-card-dates,
.event-card-price {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 6px;
  line-height: 1.5;
}

.event-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 12px;
}

/* Event Detail Page */
.event-detail-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.event-detail-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.event-detail-badge {
  position: absolute;
  top: 16px;
  right: 16px;
}

.event-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.event-info-item {
  background: var(--bg);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.event-info-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 4px;
}

.event-info-value {
  font-weight: 600;
  font-size: 1rem;
}

/* Event submission form */
.event-form-section {
  background: linear-gradient(135deg, #f0f4ff 0%, #fef9f0 100%);
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

/* Tab navigation for forms */
.form-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
}

.form-tab {
  flex: 1;
  padding: 14px 20px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  background: var(--bg-card);
  color: var(--text-light);
  border: none;
  transition: all var(--transition);
}

.form-tab.active {
  background: var(--secondary-dark);
  color: var(--text-white);
}

.form-tab:hover:not(.active) {
  background: var(--bg);
}

.form-panel {
  display: none;
}

.form-panel.active {
  display: block;
}

/* ============================================
   Responsive (Event additions)
   ============================================ */
@media (max-width: 768px) {
  .events-grid {
    grid-template-columns: 1fr;
  }

  .event-detail-image {
    height: 250px;
  }

  .event-info-grid {
    grid-template-columns: 1fr;
  }

  .form-tabs {
    flex-direction: column;
  }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--secondary-dark);
    padding: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 4px;
  }

  .main-nav a {
    display: block;
    padding: 12px 16px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-stat-number {
    font-size: 1.5rem;
  }

  .hero-buttons .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  #seichi-map {
    height: 350px;
  }

  .spots-grid {
    grid-template-columns: 1fr;
  }

  .submission-form {
    padding: 24px 16px;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .single-spot-image {
    max-height: 400px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 50px 0 40px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-buttons {
    gap: 8px;
  }

  .hero-buttons .btn {
    padding: 10px 16px;
    font-size: 0.8rem;
  }

  .hero-stats {
    gap: 10px !important;
  }

  .hero-stat-number {
    font-size: 1.3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .spot-detail-meta {
    grid-template-columns: 1fr;
  }
}
