/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", helvetica, "Apple SD Gothic Neo",
    sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

.container-fluid {
  padding: 0;
  max-width: 1300px;
  margin: 0 auto;
}

/* Sidebar Styles */
.sidebar {
  background-color: #fff;
  border-right: 1px solid #e9ecef;
  min-height: 100vh;
  padding: 20px 0;
}

.sidebar-menu {
  padding: 0 20px;
}

.menu-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #007bff;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  margin-bottom: 5px;
}

.menu-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  color: #666;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.menu-link:hover {
  background-color: #f8f9fa;
  color: #333;
}

.menu-item.active .menu-link {
  background-color: #007bff;
  color: white;
  font-weight: 600;
}

.menu-link i {
  font-size: 12px;
  opacity: 0.7;
}

/* Main Content Styles */
.main-content {
  background-color: #fff;
  min-height: 100vh;
  padding: 30px;
}

/* Page Header */
.page-header {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.event-filter {
  min-width: 200px;
}

.event-select {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  background-color: white;
}

.event-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Events Grid */
.events-section {
  margin-bottom: 50px;
}

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

.event-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.event-card-image {
  height: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  padding: 20px;
}

.event-card-image.purple-theme {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.event-card-image.pink-theme {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.event-card-image.blue-theme {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.event-card-image.green-theme {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.event-card-image.orange-theme {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.event-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.event-dday {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background-color: #4285f4;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.event-dday.ended {
  background-color: #6c757d;
}

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

.event-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-period {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.event-description {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}

.event-status.ongoing {
  background-color: #d4edda;
  color: #155724;
}

.event-status.ended {
  background-color: #f8d7da;
  color: #721c24;
}

/* No Events */
.no-events {
  text-align: center;
  padding: 80px 20px;
  color: #666;
}

.no-events-content i {
  font-size: 64px;
  color: #ddd;
  margin-bottom: 20px;
}

.no-events-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #333;
}

.no-events-content p {
  font-size: 14px;
  color: #666;
}

/* Pagination */
.pagination-section {
  margin-top: 40px;
}

.pagination {
  margin: 0;
}

.pagination .page-link {
  color: #666;
  border: 1px solid #dee2e6;
  padding: 8px 12px;
  font-size: 14px;
  text-decoration: none;
}

.pagination .page-link:hover {
  background-color: #e9ecef;
  border-color: #dee2e6;
  color: #333;
}

.pagination .page-item.active .page-link {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
}

.pagination .page-item.disabled .page-link {
  color: #6c757d;
  background-color: #fff;
  border-color: #dee2e6;
}

/* Event Detail Styles */
.breadcrumb-section {
  margin-bottom: 30px;
}

.breadcrumb {
  background: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-item a {
  color: #007bff;
  text-decoration: none;
}

.breadcrumb-item.active {
  color: #6c757d;
}

.event-detail-section {
  margin-bottom: 50px;
}

.event-detail-header {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-detail-banner {
  height: 300px;
  border-radius: 12px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.event-detail-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: start;
}

.event-detail-title {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin-bottom: 15px;
  line-height: 1.3;
}

.event-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.meta-item i {
  color: #007bff;
}

.event-detail-summary {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
}

.event-detail-dday {
  text-align: center;
}

.dday-badge {
  background-color: #4285f4;
  color: white;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  margin: 0 auto 10px;
}

.dday-badge.ended {
  background-color: #6c757d;
}

.dday-text {
  font-size: 14px;
  color: #666;
  font-weight: 600;
}

.event-detail-content {
  background: white;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-section {
  margin-bottom: 40px;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-section h3 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.content-section p {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 15px;
}

.content-section ul {
  padding-left: 20px;
  margin-bottom: 15px;
}

.content-section li {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 8px;
}

.highlight-box {
  background-color: #f8f9fa;
  border-left: 4px solid #007bff;
  padding: 20px;
  border-radius: 6px;
  margin: 20px 0;
}

.highlight-box h4 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.highlight-box p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.event-detail-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 50px;
}

.btn-participate {
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
}

.btn-share,
.btn-back {
  padding: 12px 20px;
  font-size: 14px;
}

/* Related Events */
.related-events-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 25px;
  text-align: center;
}

.related-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.related-event-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}

.related-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-event-image {
  height: 120px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 15px;
}

.related-event-content {
  padding: 15px;
}

.related-event-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-event-period {
  font-size: 12px;
  color: #666;
}

/* Participation Modal */
.participation-form {
  padding: 20px 0;
}

.participation-info {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #555;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item i {
  color: #007bff;
  width: 16px;
}

.participation-agreement {
  border-top: 1px solid #e9ecef;
  padding-top: 20px;
}

.form-check {
  margin-bottom: 15px;
}

.form-check-label {
  font-size: 14px;
  color: #333;
}

.terms-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.terms-link:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container-fluid {
    padding: 0;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    z-index: 1050;
    transition: left 0.3s ease;
  }

  .sidebar.show {
    left: 0;
  }

  .main-content {
    padding: 20px 15px;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .event-filter {
    width: 100%;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .event-detail-info {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .event-detail-header,
  .event-detail-content {
    padding: 20px;
  }

  .event-detail-actions {
    flex-direction: column;
    align-items: center;
  }

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

@media (max-width: 576px) {
  .page-title {
    font-size: 20px;
  }

  .event-card-content {
    padding: 15px;
  }

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

  .event-detail-title {
    font-size: 22px;
  }

  .event-detail-meta {
    flex-direction: column;
    gap: 10px;
  }

  .event-detail-banner {
    height: 200px;
    font-size: 18px;
  }
}

/* Animation Effects */
.event-card {
  animation: fadeInUp 0.5s ease;
}

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

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

/* Focus States */
.event-card:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}
