.map-container {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 15px;
  width: 1200px;
  height: 800px;
  gap: 15px;
  background: var(--main-container-bg);
  border: var(--main-border);
  border-radius: var(--border-radius);
  box-shadow: var(--container-shadow);
  z-index: 10;
}

/* container-header in main */
/* screen-border in main */

.map-content {
  position: relative;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--content-bg);
  border: var(--main-border);
  border-radius: var(--screen-border-radius);
}

#globe {
  width: 100%;
  height: 100%;
  display: block;
}

.map-stats {
  display: flex;
  flex-wrap: wrap; 
  text-transform: uppercase;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  padding: 15px 0;
  gap: 15px;
  font-family: var(--screen-font-family);
  color: var(--screen-text-color-main);
  font-size: var(--main-font-size);
}
#spinner-count,
#country-count,
#spins {
  color: var(--screen-text-color);
}

.map-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flat-button-frame.flat-button-frame-map-icon {
  position: absolute;
  left: 0;
}
.flat-btn.map-icon {
  color: transparent;
  cursor: pointer;
  background-image: url('/Images/oiia.png');
  background-color: lime;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.flat-btn.map-icon:active {
  background-image: url('/Images/oiia.png');
  background-color: lime;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.flat-btn.disabled {
  cursor: not-allowed;
  pointer-events: none;
  background-image: url('/Images/oiia_spin.gif');
  background-color: lime;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* flat-btn in main */

.tabs-arrows {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

#tabs {
  padding: 10px 0;
  font-family: var(--screen-font-family);
  display: flex;
  text-transform: uppercase;
  align-items: center;
  justify-content: center;
  border-radius: var(--mini-screen-border-radius);
  background-color: var(--content-bg);
  color: var(--screen-text-color);
  font-size: var(--main-font-size);
}
.tab {
  text-align: center;
  opacity: 0;
  transition: all 0.3s ease;
  display: none;
  min-width: 100px;
}
.tab.active {
  display: block;
  opacity: 1;
}
.tab.prev {
  transform: translateX(-100%);
}
.tab.next {
  transform: translateX(100%);
}
.tab-text {
  display: inline-block;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  transform: translateY(0);
  opacity: 1;
}
.tab-text.slide-out {
  transform: translateY(-100%);
  opacity: 0;
}
.tab-text.slide-in {
  transform: translateY(100%);
  opacity: 0;
}

#tooltip {
  font-family: var(--screen-font-family);
  font-size: var(--main-font-size);
  color: var(--screen-text-color);
  position: absolute;
  pointer-events: none;
  background: var(--content-bg);
  padding: 15px;
  border-radius: var(--mini-screen-border-radius);
  display: none;
  z-index: 11;
  border: var(--screen-border);
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
  max-width: min(250px, calc(100vw - 20px));
  text-align: center;
}

/* Event header content styles */
.logo-text.event-title {
  font-size: 1rem;
}
.header.event-expanded {
  height: auto;
  flex-direction: column;
  align-items: center;
}
.event-header-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  position: relative;
}
.event-header-video-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}
.event-header-video {
  border: 2px solid #164409;
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  border-radius: 8px;
}
.event-header-video-list {
  background: #d4ffc2;
  border: 2px solid #164409;
  border-radius: 0.75em;
  padding: 15px;
  max-height: 150px;
  overflow-y: auto;
  box-shadow:
  0 1px 2px rgba(0, 0, 0, 0.2),
  inset 0 6px 12px rgba(0, 0, 0, 0.6);
}
.event-header-list-title {
  color: #164409;
  font-size: 1rem;
  margin-bottom: 8px;
  text-align: center;
}
.event-header-list-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.event-header-list-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}
.event-header-list-item {
  color: white;
  cursor: pointer;
  font-size: 1rem;
  border: 2px solid #164409;
  position: relative;
  overflow: hidden;
  min-height: 60px;
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.event-header-list-text {
  background: rgba(0, 0, 0, 0.5);
  position: relative;
  text-shadow:
  -0.5px -0.5px 0 #000,
   0.5px -0.5px 0 #000,
  -0.5px  0.5px 0 #000,
   0.5px  0.5px 0 #000;
}
.event-header-close-button {
  margin-top: 10px;
}

@media (max-width: 768px) {
  .map-container {
    height: 550px;
    width: calc(100vw - 20px);
    padding: 10px;
    gap: 10px;
  }

  #globe {
    object-fit: contain;
  }

  .button3d.map-icon {
    font-size: 0.7rem;
  }
  .map-stats {
    font-size: var(--mobile-font-size);
    gap: 10px;
    padding: 10px 0;
  }
  #tabs {
    padding: 0.3em;
  }
  .tab {
    font-size: 0.7rem;
    min-width: 80px;
  }

  .event-header-list-item {
    font-size: 0.7rem;
    min-height: 50px;
    min-width: 40px;
  }
  .event-header-video-list {
    background: #d4ffc2;
    padding: 5px;
  }
  .header.event-expanded .header-limit {
    width: 95%;
    max-width: 95%;
  }
  .event-header-content {
    padding: 15px 10px;
    gap: 12px;
  }
  .event-header-video {
    max-width: 90%;
    max-height: 200px;
  }
  .event-header-video-container {
    gap: 10px;
    flex-wrap: wrap;
  }
  .event-header-nav-button {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  .event-header-list-container {
    gap: 6px;
  }
  .event-header-list-title {
    font-size: 0.9rem;
  }
}

canvas {
  border-radius: 8px;
  background: transparent;
  cursor: grab;
  position: relative;
}

canvas:active {
  cursor: grabbing;
}

/* Ensure easter egg text is readable on smaller screens */
@media (max-width: 768px) {
  .map-container {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .map-container {
    font-size: 0.8rem;
  }
}