@font-face {
  font-family: "OldEnglishPixelRegular";
  src: url("src/fonts/OldEnglishGothicPixelRegular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Pixelzone";
  src: url("src/fonts/Pixelzone.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Minecraft";
  src: url("src/fonts/MinecraftRegular.otf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

:root {
  /* Colors */
  --primary: #7b183c;
  --secondary: #ff6b6b;
  --accent: #ffb6c1;
  --dark: #121212;
  --light: #ffffff;
  --muted: #aaaaaa;

  /* Fonts */
  --font-pixel: "OldEnglishPixelRegular", sans-serif;
  --font-text: "Minecraft", sans-serif;

  /* Font Sizes */
  --fs-h1: 60px;
  --fs-h2: 48px;
  --fs-h3: 32px;
  --fs-body: 24px;
  --fs-small: 20px;
  --fs-xs: 16px;

  /* Spacing */
  --spacing: 20px;
  --spacing-sm: 10px;
  --spacing-lg: 40px;

  /* Border Radius */
  --radius: 10px;
  --radius-sm: 5px;

  /* Transitions */
  --transition: 0.3s ease;
  --transition-slow: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Shadow */
  --shadow: 2px 2px 8px #000000;
  --shadow-lg: 0 0 40px var(--primary), 0 0 80px rgba(123, 24, 60, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--dark);
  overflow-x: hidden;
  color: var(--light);
}
img {
  -webkit-user-drag: none;
}

h1 {
  position: relative;
  text-align: center;
  font-family: var(--font-pixel);
  font-size: var(--fs-h1);
  font-weight: normal;
  pointer-events: none;
  text-shadow: 3px 3px 3px #000000;
  z-index: 5;
}

.hidden {
  left: -60% !important;
  transform: translateX(-60%);
  opacity: 0;
}
.active {
  filter: brightness(1.3) drop-shadow(0 0 20px var(--primary)) !important;
}

div a:hover {
  transform: scale(1.1);
  transition: transform var(--transition);
}

#startingDialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  backdrop-filter: blur(3px);
  pointer-events: auto;
}

.startingDialogContent {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  background-color: var(--dark);
  border: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  font-family: var(--font-text);
  font-size: var(--fs-body);
  color: var(--light);
  animation: modalSlideIn var(--transition-slow);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.startingDialogContent h2 {
  font-family: var(--font-pixel);
  font-size: var(--fs-h2);
  color: var(--secondary);
  margin: 0 0 20px 0;
  text-shadow: 3px 3px 3px #000000;
}
.startingDialogContent p {
  margin: 0 0 15px 0;
  line-height: 1.6;
  color: var(--light);
  text-shadow: 2px 2px 2px #000000;
  flex-grow: 1;
}

.startingDialogButtonsRow {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-sm);
  justify-content: center;
  margin-top: var(--spacing-lg);
}

.startingDialogSquareBtn,
.startingDialogExploreBtn {
  font-family: var(--font-text);
  background-color: var(--primary);
  color: var(--light);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 0 15px rgba(123, 24, 60, 0.4);
  transition: all var(--transition);
  text-shadow: 2px 2px 2px #000000;
}
.startingDialogSquareBtn:hover,
.startingDialogExploreBtn:hover {
  background-color: #a32e4b;
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 25px rgba(123, 24, 60, 0.6);
}
.startingDialogSquareBtn:active,
.startingDialogExploreBtn:active {
  transform: scale(0.95);
}

.startingDialogSquareBtn {
  width: 120px;
  height: 120px;
  padding: 0;
  font-size: var(--fs-small);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
  flex-shrink: 0;
}
.startingDialogExploreBtn {
  display: block;
  width: 100%;
  padding: 15px 30px;
  font-size: var(--fs-body);
  margin-top: 15px;
  flex-shrink: 0;
}

.guide {
  position: fixed;
  bottom: var(--spacing);
  right: 100px;
  z-index: 20;
  pointer-events: none;
}

.talkingHead {
  width: 400px;
  height: auto;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.talkingHead img {
  width: 100%;
  height: auto;
  pointer-events: none;
  transition: opacity var(--transition);
}

.chatBubble {
  position: fixed;
  bottom: 100px;
  max-width: 280px;
  padding: 15px;
  background-color: rgba(18, 18, 18, 0.95);
  border: 2px solid var(--primary);
  color: var(--light);
  border-radius: var(--radius);
  font-family: var(--font-text);
  font-size: var(--fs-small);
  pointer-events: none;
  box-shadow: var(--shadow);
  text-align: left;
  line-height: 1.4;
  transition: all var(--transition);
}
.chatBubble p {
  margin: 0;
  padding: 0;
}
.chatBubble::after {
  content: "";
  position: absolute;
  bottom: -15px;
  right: 30px;
  border-width: 8px;
  border-style: solid;
  border-color: rgba(18, 18, 18, 0.95) transparent transparent transparent;
}

@keyframes characterAnimation {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.1);
  }
}
#guideCharacter {
  animation: characterAnimation 0.5s infinite;
}

.guideControls {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  margin-top: 10px;
  pointer-events: auto;
}

.guideBtn {
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  color: var(--light);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-text);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.guideBtn:hover {
  background-color: #a32e4b;
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.6);
}
.guideBtn:active {
  transform: scale(0.95);
}
.guidePanelBtn {
  width: 50px;
  font-weight: bold;
}

.guidePanel {
  position: fixed;
  bottom: var(--spacing);
  right: -450px;
  width: 400px;
  height: 80vh;
  background-color: rgba(18, 18, 18, 0.98);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  z-index: 19;
  transition: right var(--transition-slow);
  overflow: hidden;
  box-shadow: -5px 5px 20px #000000;
  pointer-events: auto;
}
.guidePanel.expanded {
  right: var(--spacing);
}

.guidePanelContent {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: var(--spacing);
  box-sizing: border-box;
  color: var(--light);
  font-family: var(--font-text);
  font-size: var(--fs-xs);
}
.guidePanelContent h2 {
  font-family: var(--font-text);
  font-size: var(--fs-h3);
  color: var(--secondary);
  margin: 0 0 5px 0;
  text-shadow: 2px 2px 2px #000000;
}
.guidePanelSubtitle {
  color: var(--muted);
  font-size: var(--fs-xs);
  margin: 0 0 20px 0;
  font-style: italic;
}

.guideTipsList {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.guideTip {
  background-color: rgba(123, 24, 60, 0.3);
  padding: 12px;
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.guideTip:hover {
  background-color: rgba(123, 24, 60, 0.5);
  border-left-width: 5px;
}
.guideTip h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: var(--accent);
  font-family: var(--font-text);
}
.guideTip p {
  margin: 0;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--light);
}

.guidePanelFooter {
  margin-top: var(--spacing);
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: var(--fs-xs);
  color: #888888;
}

.languageToggle {
  position: fixed;
  top: var(--spacing);
  left: var(--spacing);
  display: flex;
  gap: var(--spacing-sm);
  z-index: 18;
  pointer-events: auto;
}

.langBtn {
  width: 45px;
  height: 45px;
  padding: 0;
  font-size: var(--fs-small);
  font-weight: bold;
  font-family: var(--font-text);
  background-color: var(--primary);
  color: var(--light);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.langBtn:hover {
  background-color: #a32e4b;
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.6);
}
.langBtn:active {
  transform: scale(0.95);
}
.langBtn.active {
  background-color: var(--secondary);
  border-color: var(--accent);
  color: var(--dark);
}

.themeSelector {
  position: fixed;
  top: var(--spacing);
  left: var(--spacing);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 17;
  pointer-events: auto;
  transition: all var(--transition-slow);
}
.themeSelector.mainView {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
}
.themeSelector.sideView {
  top: var(--spacing);
  left: 75px;
  width: auto;
  transform: none;
  height: 45px;
  gap: var(--spacing-sm);
}

.themeSelectorWrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing);
  width: 100%;
}
.themeSelector.sideView .themeSelectorWrapper {
  flex-direction: row;
  gap: var(--spacing-sm);
  height: 100%;
}

.themeSelectorHeading {
  font-family: var(--font-text);
  font-size: var(--fs-h3);
  color: var(--secondary);
  margin: 0;
  text-shadow: 2px 2px 2px #000000;
  opacity: 0;
  transition: opacity var(--transition);
}
.themeSelector.mainView .themeSelectorHeading {
  opacity: 1;
}

.themeSelectorContent {
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all var(--transition);
}
.themeSelector.mainView .themeSelectorContent {
  flex-direction: column;
  gap: var(--spacing);
}

.themCarouselNav {
  display: flex;
  gap: var(--spacing-sm);
}
.themeSelector.mainView .themCarouselNav {
  order: -1;
}

.themeNavBtn {
  width: 35px;
  height: 35px;
  background-color: var(--primary);
  color: var(--light);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-text);
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.themeSelector.mainView .themeNavBtn {
  width: 50px;
  height: 50px;
  font-size: 20px;
}
.themeNavBtn:hover {
  background-color: #a32e4b;
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.6);
}
.themeNavBtn:active {
  transform: scale(0.95);
}

.themeCarouselContainer {
  display: flex;
  align-items: center;
  gap: 10px;
}
.themeSelector.mainView .themeCarouselContainer {
  flex-direction: column;
  gap: 15px;
}

.themeDisplay {
  width: 100px;
  height: 100px;
  background-color: rgba(123, 24, 60, 0.3);
  border: 2px solid var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(123, 24, 60, 0.4);
}
.themeSelector.mainView .themeDisplay {
  width: 180px;
  height: 180px;
}
.themeSelector.sideView .themeDisplay {
  width: 45px;
  height: 45px;
  border: 1px solid var(--primary);
}
.themeDisplay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.themeLabel {
  font-family: var(--font-text);
  font-size: var(--fs-small);
  color: var(--accent);
  text-align: center;
  min-width: 60px;
  pointer-events: none;
  text-shadow: 2px 2px 2px #000000;
}
.themeSelector.mainView .themeLabel {
  font-size: var(--fs-body);
}
.themeSelector.sideView .themeLabel,
.themeSelector.sideView .themCarouselNav,
.themeSelector.sideView .themeSelectorHeading {
  display: none;
}

#banners {
  position: fixed;
  top: -40%;
  right: 5%;
  display: flex;
  gap: var(--spacing);
  z-index: 3;
  transition: all 0.5s ease;
  cursor: pointer;
  text-align: center;
}

.banner {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}
.banner:hover {
  transform: scale(1.1);
}
.banner img {
  width: 200px;
  height: auto;
  display: block;
  pointer-events: auto;
}
.banner .navTitle {
  font-family: var(--font-pixel);
  font-size: 36px;
  color: var(--light);
  margin-top: -70px;
  position: relative;
  z-index: 2;
  pointer-events: none;
  text-shadow: 3px 3px 3px #000000;
}

.slider {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  text-align: center;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  transition: all 1.5s ease;
  width: 50%;
  overflow-y: auto;
  gap: 30px;
}
.slider.hidden {
  top: 50%;
  left: 10%;
  transform: translateX(-50%);
  opacity: 0;
}

#projects {
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.station {
  width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.station:hover {
  transform: scale(1.1);
  transition: transform var(--transition);
}
.station.selected {
  background-color: rgba(123, 24, 60, 0.4);
  border: 2px solid var(--primary);
}
.station > img {
  box-shadow: var(--shadow);
  width: 120px;
  height: 120px;
  object-fit: contain;
}
.station > div {
  margin-top: 8px;
  pointer-events: none;
  text-shadow: 2px 2px 2px #000000;
  text-align: center;
  font-size: var(--fs-xs);
  line-height: 1.3;
}

#about {
  gap: 40px;
  align-items: flex-start;
}
#about div {
  width: 55%;
  height: auto;
  text-align: left;
  pointer-events: none;
  font-size: var(--fs-xs);
  line-height: 1.5;
  overflow-y: auto;
  max-height: 60vh;
  padding-right: 10px;
}
#about img {
  width: 200px;
  height: auto;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.stationModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 25;
  backdrop-filter: blur(3px);
}
.stationModal.show {
  display: flex;
}

.stationModalImage {
  flex-shrink: 0;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 30px;
}
.stationModalImage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  box-shadow:
    0 0 20px var(--primary),
    0 0 40px rgba(123, 24, 60, 0.2);
  border-radius: 8px;
}

.stationModalContent {
  background-color: var(--dark);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 30px;
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
  position: relative;
  animation: modalSlideIn var(--transition-slow);
  box-shadow: 0 0 30px var(--primary);
  color: var(--light);
  font-family: var(--font-text);
  font-size: var(--fs-body);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.stationCloseBtn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  color: var(--light);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  font-size: 24px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.stationCloseBtn:hover {
  background-color: #a32e4b;
  transform: scale(1.1);
}
.stationCloseBtn:active {
  transform: scale(0.95);
}

.stationModalHeader {
  margin-bottom: var(--spacing);
}
.stationModalHeader h2 {
  font-family: var(--font-text);
  font-size: var(--fs-h2);
  color: var(--secondary);
  margin: 0;
  text-shadow: 2px 2px 2px #000000;
}
.stationPeriod {
  color: var(--accent);
  font-size: var(--fs-small);
  margin: 5px 0;
}
.stationTitle {
  color: var(--light);
  font-size: var(--fs-body);
  margin: 5px 0;
}

.stationModalSection {
  margin-top: var(--spacing);
}
.stationModalSection h3 {
  font-family: var(--font-text);
  font-size: var(--fs-h3);
  color: var(--secondary);
  margin: 0 0 10px 0;
}
.stationModalSection p {
  margin: 0;
  line-height: 1.6;
}

.techTagsContainer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}
.techTag {
  display: inline-block;
  background-color: rgba(123, 24, 60, 0.5);
  border: 1px solid var(--primary);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 15px;
  font-size: var(--fs-xs);
  font-family: var(--font-text);
  transition: all var(--transition);
}
.techTag:hover {
  background-color: rgba(123, 24, 60, 0.8);
  border-color: var(--accent);
  color: var(--light);
}

@media (max-width: 768px) {
  :root {
    --fs-h1: 48px;
    --fs-h2: 36px;
    --fs-h3: 24px;
    --fs-body: 20px;
    --spacing: 15px;
    --spacing-sm: 8px;
  }

  .themeSelector.sideView {
    display: none;
  }
  
  .startingDialogContent {
    max-width: 95%;
    max-height: 95vh;
    padding: var(--spacing);
  }
  
  .startingDialogContent h2 {
    font-size: var(--fs-h3);
    margin: 0 0 15px 0;
  }
  
  .startingDialogContent p {
    font-size: var(--fs-xs);
    margin: 0 0 10px 0;
  }
  
  .startingDialogSquareBtn {
    width: 90px;
    height: 90px;
    font-size: var(--fs-xs);
  }
  
  .startingDialogExploreBtn {
    padding: 12px 20px;
    font-size: var(--fs-xs);
  }
  
  .startingDialogButtonsRow {
    gap: var(--spacing-sm);
    margin-top: var(--spacing);
  }
  .talkingHead {
    display: none;
  }
  .guide {
    right: 10px;
    bottom: 10px;
  }
  .chatBubble {
    bottom: 20px;
    max-width: 150px;
    font-size: var(--fs-xs);
  }
  #banners {
    top: -180px;
    right: 50%;
    translate: 50%;
    gap: 10px;
  }
  .banner img {
    width: 120px;
  }
  .banner .navTitle {
    font-size: 20px;
    margin-top: -40px;
  }
  .slider {
    width: 90vw;
    flex-direction: row;
    gap: 15px;
    font-size: var(--fs-small);
  }
  .slider.hidden {
    top: 200px;
    left: 50%;
    transform: translateX(-50%);
  }
  #about {
    top: 450px;
    gap: 15px;
    flex-direction: column-reverse;
    align-items: center;
  }
  #about div {
    width: 100%;
    font-size: var(--fs-xs);
  }
  #about img {
    width: 150px;
  }
  #contact {
    top: 400px;
  }
  #projects {
    gap: 10px 25px;
    top: 450px;
    max-width: 95vw;
    justify-content: space-evenly;
  }
  .station {
    width: 150px;
  }
  .station > img {
    width: 150px;
    height: 150px;
  }
  .station .stationTitle {
    display: none;
  }
  .station:hover {
    transform: none;
  }
  .stationModalImage {
    width: 150px;
    height: 150px;
    margin-right: 0;
  }
  .stationModalContent {
    gap: 15px;
    padding: var(--spacing);
  }
  .stationModalHeader {
    text-align: center;
  }
  .stationModalHeader h2 {
    font-size: var(--fs-body);
  }
  .stationModalSection h3 {
    font-size: var(--fs-small);
  }
  #contact {
    top: 300px;
  }
  .guide {
    display: none;
  }
  .startingDialogSquareBtn {
    width: 90px;
    height: 90px;
    font-size: var(--fs-xs);
  }
  .startingDialogExploreBtn {
    padding: 12px 20px;
  }
  .langBtn {
    width: 40px;
    height: 40px;
    font-size: var(--fs-xs);
  }
  div a:hover {
    transform: none;
  }
  .banner:hover {
    transform: none;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --fs-h1: 48px;
    --fs-h2: 32px;
    --fs-h3: 24px;
    --fs-body: 22px;
  }

  .slider {
    width: 70%;
    gap: 20px;
  }.slider.hidden {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  #about {
    gap: 80px;
    flex-direction: column;
  }
  #about div {
    width: 100%;
  }
  #about img {
    width: 200px;
  }
  #banners {
    top: -250px;
  }
  .banner img {
    width: 150px;
  }
  .banner .navTitle {
    font-size: 28px;
    margin-top: -50px;
  }
  .guide {
    display: none;
  }
  .guidePanel {
    width: 350px;
    right: -350px;
  }
  #guideCharacter {
    display: none;
  }
  #projects {
    top: 55%;
    gap: 15px 30px;
  }
  .station {
    font-size: var(--fs-xs);
    width: 200px
  }
  .station > img {
    width: 150px;
    height: 150px;
  }
  .stationTitle {
    font-size: var(--fs-xs);
  }
  .stationModalImage {
    width: 200px;
    height: 200px;
  }
}
