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

body {
  margin: 0;
  padding: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui,
    Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    sans-serif;
  background-color: #262b30;
  color: #eaf0f6;
  min-height: 100vh;
}

/* Main Container */
.event-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  padding-bottom: 120px;
}

.event-card {
  background-color: #262b30;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Event Poster */
.event-poster-container {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.event-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 16px 16px 0 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.event-poster:hover {
  transform: scale(1.02);
}

/* Image Popup Modal */
.image-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  cursor: pointer;
}

.image-popup-overlay.active {
  display: flex;
}

.image-popup-content {
  position: relative;
  width: 85vw;
  height: 85vh;
  cursor: default;
  overflow: hidden;
}

.image-popup-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  transition: transform 0.1s ease-out;
  transform-origin: center center;
}

.image-popup-image:active {
  cursor: grabbing;
}

.image-popup-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10001;
}

.image-popup-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.image-popup-close::before {
  content: "×";
  font-weight: bold;
}

/* Mobile responsive for popup */
@media (max-width: 768px) {
  .image-popup-content {
    width: 90vw;
    height: 90vh;
  }

  .image-popup-close {
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 28px;
  }
}

.group {
  position: absolute;
  width: 75px;
  height: 69px;
  top: 20px;
  right: 20px;
  z-index: 2;
}

/* Event Title */
.event-title {
  font-size: 28px;
  font-weight: 600;
  color: #eaf0f6;
  margin: 24px 20px 16px 20px;
  line-height: 1.3;
}

/* Event Details */
.event-details {
  margin: 0 20px 20px 20px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-item .material-icons {
  color: #ffffff;
  font-size: 20px;
  flex-shrink: 0;
}

.event-time,
.location-text {
  font-size: 16px;
  color: #ffffff;
  margin: 0;
  line-height: 1.4;
  word-wrap: break-word;
}

/* Timezone */
.timezone-text {
  font-size: 12px;
  color: #e9e9e9;
  text-align: center;
  margin: 0 20px 20px 20px;
  font-weight: 300;
}

/* Creator Info */
.creator-info {
  margin: 0 20px 24px 20px;
}

.creator-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.creator-photo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
}

.creator-name {
  font-size: 18px;
  color: #ffffff;
  font-weight: 500;
}

/* Attendees Section */
.attendees-section {
  margin: 0 20px 24px 20px;
}

.creator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.attendees-header {
  display: flex;
  /* justify-content: space-between; */
  align-items: center;
  margin-bottom: 12px;
}

.hosted-by {
  font-size: 14px;
  color: #e9e9e9;
  font-weight: 300;
}

.total-attendees {
  font-size: 14px;
  color: #e9e9e9;
  font-weight: 300;
}

.attendees-container {
  position: relative;
  height: 50px;
}

.attendees-profiles {
  position: relative;
  height: 100%;
}

.attendees-profile-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid white;
  position: absolute;
  top: 0;
  object-fit: cover;
}

/* Action Buttons */
.action-buttons {
  margin: 0 20px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-contact-2 {
  background: linear-gradient(
    325deg,
    rgba(0, 122, 255, 1) 0%,
    rgba(84, 84, 251, 1) 50%,
    rgba(143, 109, 229, 1) 100%
  );
  display: flex;
  width: 100%;
  height: 60px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: transform 0.2s ease;
  color-scheme: light;
}

.btn-contact-2:hover {
  transform: translateY(-2px);
}

.text-wrapper-5 {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui,
    Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    sans-serif;
  font-weight: 600;
  color: white !important;
  font-size: 18px;
  text-align: center;
  letter-spacing: -0.5px;
}

.div-wrapper {
  background-color: #eaf0f6 !important;
  border: 2px solid #eaf0f6 !important;
  display: flex;
  width: 100%;
  height: 60px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.2s ease;
  color-scheme: light;
}

.div-wrapper:hover {
  background-color: #d1d8e0;
  transform: translateY(-2px);
}

.div-wrapper:hover .text-wrapper-6 {
  color: #262b30;
}

.text-wrapper-6 {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui,
    Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    sans-serif;
  font-weight: 600;
  color: #262b30 !important;
  font-size: 18px;
  text-align: center;
  letter-spacing: -0.5px;
  transition: color 0.2s ease;
}

/* Description Section */
.description-section {
  margin: 0 20px 24px 20px;
}

.event-description {
  background: linear-gradient(
    335deg,
    rgba(100, 110, 121, 1) 0%,
    rgba(52, 58, 64, 1) 50%,
    rgba(0, 0, 0, 1) 100%
  );
  border-radius: 12px;
  padding: 20px;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui,
    Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    sans-serif;
  font-weight: 300;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-line; /* Preserve line breaks */
}

/* Custom scrollbar styling */
.event-description::-webkit-scrollbar {
  width: 8px;
}

.event-description::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.event-description::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 4px;
}

.event-description::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* Additional Info */
.additional-info {
  font-size: 14px;
  color: #e9e9e9;
  text-align: center;
  margin: 0 20px 24px 20px;
  font-weight: 300;
}

/* Escape Logo */
.escape-logo-bottom {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

.escape-logo-bottom a {
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  background-color: rgba(38, 43, 48, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.escape-logo-bottom a:hover {
  background-color: rgba(38, 43, 48, 1);
  transform: translateY(-2px);
}

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

  .event-card {
    max-width: 100%;
    border-radius: 12px;
  }

  .event-poster-container {
    height: 320px;
  }

  .event-title {
    font-size: 24px;
    margin: 20px 16px 12px 16px;
  }

  .event-details {
    margin: 0 16px 16px 16px;
  }

  .detail-item {
    gap: 10px;
    margin-bottom: 10px;
  }

  .detail-item .material-icons {
    font-size: 18px;
    color: #ffffff;
  }

  .event-time,
  .location-text {
    font-size: 14px;
    color: #ffffff;
  }

  .timezone-text {
    margin: 0 16px 16px 16px;
  }

  .creator-info {
    margin: 0 16px 20px 16px;
  }

  .attendees-section {
    margin: 0 16px 20px 16px;
  }

  .action-buttons {
    margin: 0 16px 20px 16px;
  }

  .btn-contact-2,
  .div-wrapper {
    height: 56px;
  }

  .text-wrapper-5,
  .text-wrapper-6 {
    font-size: 16px;
  }

  .description-section {
    margin: 0 16px 20px 16px;
  }

  .event-description {
    padding: 16px;
    font-size: 14px;
    white-space: pre-line; /* Preserve line breaks */
  }

  /* Custom scrollbar styling for mobile */
  .event-description::-webkit-scrollbar {
    width: 6px;
  }

  .event-description::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
  }

  .event-description::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 3px;
  }

  .event-description::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8);
  }

  .additional-info {
    margin: 0 16px 20px 16px;
  }
}

@media (max-width: 480px) {
  .event-container {
    padding: 12px;
  }

  .event-poster-container {
    height: 260px;
  }

  .event-title {
    font-size: 20px;
    margin: 16px 12px 10px 12px;
  }

  .event-details {
    margin: 0 12px 12px 12px;
  }

  .detail-item {
    gap: 8px;
    margin-bottom: 8px;
  }

  .detail-item .material-icons {
    font-size: 16px;
    color: #ffffff;
  }

  .event-time,
  .location-text {
    font-size: 13px;
    color: #ffffff;
  }

  .timezone-text {
    margin: 0 12px 12px 12px;
    font-size: 11px;
  }

  .creator-info {
    margin: 0 12px 16px 12px;
  }

  .creator-photo {
    width: 40px;
    height: 40px;
  }

  .creator-name {
    font-size: 16px;
    color: #ffffff;
  }

  .attendees-section {
    margin: 0 12px 16px 12px;
  }

  .action-buttons {
    margin: 0 12px 16px 12px;
  }

  .btn-contact-2,
  .div-wrapper {
    height: 52px;
  }

  .text-wrapper-5,
  .text-wrapper-6 {
    font-size: 15px;
  }

  .description-section {
    margin: 0 12px 16px 12px;
  }

  .event-description {
    padding: 12px;
    font-size: 13px;
    white-space: pre-line; /* Preserve line breaks */
  }

  /* Custom scrollbar styling for small mobile */
  .event-description::-webkit-scrollbar {
    width: 6px;
  }

  .event-description::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
  }

  .event-description::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 3px;
  }

  .event-description::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8);
  }

  .additional-info {
    margin: 0 12px 16px 12px;
    font-size: 12px;
  }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .event-container {
    padding: 12px;
  }

  .event-poster-container {
    height: 240px;
  }

  .event-card {
    max-width: 600px;
  }
}

/* Large screens */
@media (min-width: 1200px) {
  .event-card {
    max-width: 600px;
  }

  .event-poster-container {
    height: 450px;
  }

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

  .event-time,
  .location-text {
    font-size: 18px;
    color: #ffffff;
  }

  .btn-contact-2,
  .div-wrapper {
    height: 70px;
  }

  .text-wrapper-5,
  .text-wrapper-6 {
    font-size: 20px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .btn-contact-2,
  .div-wrapper {
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .event-card {
    border: 2px solid #ffffff;
  }

  .btn-contact-2 {
    border: 2px solid #ffffff;
  }

  .div-wrapper {
    border: 2px solid #ffffff;
  }
}

/* App Store Links */
.app-store-links {
  text-align: center;
  margin-top: 50px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.app-store-btn {
  display: inline-block;
  transition: transform 0.3s ease;
  color-scheme: light;
}

.app-store-btn:hover {
  transform: translateY(-2px);
}

.app-store-btn img {
  height: 40px;
  width: auto;
  filter: none !important;
}

.app-store-btn img[alt="Get it on Google Play"] {
  height: 60px;
  margin-top: -10px;
}

/* Escape Logo */
.escape-logo {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.escape-logo a {
  text-decoration: none;
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  background-color: rgba(38, 43, 48, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.escape-logo img {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.escape-logo a:hover {
  background-color: rgba(38, 43, 48, 1);
  transform: translateY(-2px);
}

/* Event Not Found */
.event-not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 40px 20px;
  background-color: #262b30;
  color: #eaf0f6;
}

.error-icon {
  font-size: 64px;
  margin-bottom: 24px;
}

.event-not-found h2 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #ffffff;
}

.event-not-found p {
  font-size: 18px;
  color: #e9e9e9;
  margin-bottom: 32px;
  max-width: 400px;
  line-height: 1.5;
}

.error-actions {
  margin-top: 24px;
}

.app-download-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.app-download-btn {
  display: inline-block;
  transition: transform 0.3s ease;
}

.app-download-btn:hover {
  transform: translateY(-2px);
}

.app-download-btn img {
  height: 40px;
  width: auto;
}

.app-download-btn img[alt="Get it on Google Play"] {
  height: 60px;
  margin-top: -10px;
}
