* {
  font-family: "Pretendard", sans-serif;
}

@font-face {
    font-family: 'Isamanru';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-10@1.0/GongGothicMedium.woff') format('woff');
    font-weight: normal;
    font-display: swap;
}

body {
  font-weight: normal;
  background-color: #f4f4f9;
}

/* 모바일에서 하단 여백 추가 */
@media only screen and (max-width: 768px) {
  body {
    padding-bottom: 30px;
  }
}

.calendar-container {
  width: 100%;
  margin: 110px auto 0;
  padding: 0 10%;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.left-container {
  display: flex;
  flex-direction: column;
}

.coupon {
  margin-bottom: 70px;
  background-color: #f0f0f0;
  width: 200px;
  text-align: center;
  padding: 10px;
  border-radius: 5px;
  border: #c0c0c0 1px solid;
}

.overflow {
  background-color: #f0f0f0;
  width: 200px;
  text-align: center;
  padding: 10px;
  border-radius: 5px;
  border: #c0c0c0 1px solid;
}

.overflow a {
  color: black;
  text-decoration: none;
}

.overflow a:visited {
  color: black;
}

.crown {
  background-color: #f0f0f0;
  width: 200px;
  text-align: center;
  padding: 10px;
  border-radius: 5px;
  border: #c0c0c0 1px solid;
  margin-top: 35px;
}

.index-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  background-color: #2c3e50;
  color: #fff;
  padding: 10px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  width: calc(100% + 20px);
  display: block;
  margin: -10px 0 10px -10px;
  box-sizing: border-box;
}

.exchange-rate,
.result-display {
  margin-top: 15px;
  font-size: 16px;
}

label {
  display: block;
  margin: 5px 0;
  font-size: 14px;
}

select,
input[type="number"] {
  width: 75%;
  padding: 5px;
  margin-top: 5px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.result-display p {
  font-weight: bold;
  color: #333;
  font-size: 15px;
}

#exchange-rate {
  width: 50px;
  padding: 5px;
  font-size: 16px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
}

#exchange-rate::-webkit-outer-spin-button,
#exchange-rate::-webkit-inner-spin-button,
#currency-input::-webkit-outer-spin-button,
#currency-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.coupon-list {
  position: relative;
  padding-bottom: 15px;
}

.coupon-list:last-child {
  margin-bottom: 0;
  padding-bottom: 5px;
}

.coupon-list::after {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  height: 1px;
  margin-top: 10px;
  background-color: #c0c0c0;
}

.coupon-list:last-child::after {
  content: none;
}

.coupon-name {
  margin-top: 10px;
  font-weight: bold;
}

.coupon-period {
  font-size: 12px;
  margin-bottom: 10px;
}

.coupon-number {
  cursor: pointer;
}

.today-day {
  font-size: 13px;
}

.tooltip-coupon {
  font-family: "Isamanru", sans-serif;
  position: absolute;
  background-color: #1c233a;
  color: #fff;
  padding: 10px;
  border-radius: 5px;
  font-size: 14px;
  display: none;
  z-index: 1000;
  text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black,
    1px 1px 0 black;
}

.tooltip-coupon span {
  font-family: "Isamanru", sans-serif;
}

@media screen and (max-width: 768px) {
  .tooltip-coupon {
    width: max-content;
    box-sizing: border-box;
  }
}

.show-items {
  margin-bottom: 10px;
  display: inline-block;
  background-color: green;
  color: white;
  border-radius: 5px;
  padding: 2px 4px;
  font-size: 13px;
  cursor: pointer;
  margin-left: 5px;
}

.locations-today a {
  display: inline-block;
  margin-bottom: 10px;
}

.locations-today a:last-child {
  margin-bottom: 0;
}

.locations-today {
  margin-top: 10px;
}

.result-display .kakao-link img {
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  transition: opacity 0.2s;
}

.result-display .kakao-link img:hover {
  opacity: 0.8;
}

.fc-col-header-cell {
  background-color: #f0f0f0;
  color: #333;
}

.fc-daygrid-day {
  background-color: #fff;
}

.fc-col-header-cell.fc-day-sun,
.fc-day-sun {
  color: red;
}

.fc-col-header-cell.fc-day-sat,
.fc-day-sat {
  color: blue;
}

.fc-event {
  border-radius: 5px;
  margin: 0 5px 5px 5px;
  border: none;
  font-size: 12px;
}

.fc-currentMonth-button,
.fc-customText-button {
  background: none;
  border: none;
  color: inherit;
  cursor: default;
  pointer-events: none;
}

.fc-currentMonth-button:hover,
.fc-customText-button:hover {
  background: none;
}

/* 모바일 전용: ≤768px */
@media only screen and (max-width: 768px) {
  .calendar-container {
    flex-direction: column;
    align-items: center;
    padding: 10px;
    gap: 20px;
    margin: 80px auto 0;
    padding-bottom: 120px; /* 하단 여백 추가 */
  }

  #calendar-placeholder {
    width: 100%;
    margin: 0;
  }

  .calendar-placeholder {
    width: 100%;
    padding: 0;
  }

  .calendar-container > .coupon-kakaopay-container {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .calendar-container > .left-container {
    order: 2;
    align-items: center;
    gap: 15px;
  }

  .left-container .index-title,
  .coupon-kakaopay-container .index-title {
    text-align: center;
  }
}

.custom-tooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  padding: 8px 12px;
  background: rgba(40,40,40,0.95);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: normal;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  margin-top: 8px;
  max-width: 300px;
  white-space: normal;
  word-wrap: break-word;
}

.tooltip-arrow {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(40,40,40,0.95);
}

/* 레이드 타이머 스크롤바 슬림 스타일 */
#raid-timers::-webkit-scrollbar {
  width: 2px;
}
#raid-timers::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 3px;
}
#raid-timers::-webkit-scrollbar-track {
  background: transparent;
}
#raid-timers {
  scrollbar-width: thin;
  scrollbar-color: #222 transparent;
} 

/* Custom Alert Styles */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.custom-alert-box {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
  width: 300px;
}

.custom-alert-box h3 {
  margin-top: 0;
  color: #2c3e50;
}

.custom-alert-box p {
  margin-bottom: 20px;
}

.custom-alert-box button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background-color: #2c3e50;
  color: white;
  cursor: pointer;
  font-size: 1rem;
}

.custom-alert-box button:hover {
  background-color: #1a2533;
}

/* Raid Timer Settings */
.raid-alarm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #666;
  padding: 0;
}

.settings-button:hover {
  color: #333;
}

.raid-timer-controls {
  position: relative; /* For positioning the popup */
}

.settings-panel {
  position: absolute;
  left: 100%; /* Position to the right of the parent */
  top: 0;
  margin-left: 5px; /* Add some space */
  z-index: 1001; /* Ensure it's above other elements like ads */
  background-color: #fff; /* Change background to stand out */
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  border-radius: 4px;
  padding: 25px 10px 10px 10px; /* Add padding-top for close button */
  width: 255px; /* Give it a fixed width */
}

.popup-close-button {
  position: absolute;
  top: 2px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #aaa;
  cursor: pointer;
}

.popup-close-button:hover {
  color: #333;
}

.setting-item {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

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

.setting-item label {
  font-size: 11px;
  margin-right: 5px;
  width: 60px; /* Align labels */
}

.setting-item input[type="range"] {
  flex-grow: 1;
  width: auto; /* Override default width */
  height: 5px;
}

#alarm-duration-value {
  font-size: 11px;
  margin-left: 10px;
  width: 30px; /* Allocate space */
}

/* Map Modal Styles */
.map-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.map-modal-content {
  position: relative;
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
  max-width: 90%;
  max-height: 90%;
}

.map-modal-close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 25px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  z-index: 1;
}

#map-modal-image {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  margin: 0 auto;
  margin-top: 30px;
}

/* Calendar Placeholder Styles */
.calendar-placeholder {
  width: 65%;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.calendar-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#event-calendar {
  flex: 1 1 auto;
}

.calendar-empty-message {
  margin: 0;
  font-size: 14px;
  color: #666;
  text-align: center;
}

.side-ad-wrapper {
  position: absolute;
  top: 0;
  width: 160px;
  height: 600px;
  z-index: 999;
}

.side-ad-wrapper.left {
  left: 10px;
}

.side-ad-wrapper.right {
  right: 10px;
}

.side-ad {
  width: 160px;
  height: 600px;
}