:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --modal-bg: rgba(216, 136, 15, 0.818);
  --border-color: #000000;
  --button-bg: #a8740b;
  --button-text: #000000;
  --loading-bg: #f0f0f0;
}

body.dark-mode {
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
  --modal-bg: rgba(139, 87, 10, 0.9);
  --border-color: #ffffff;
  --button-bg: #2a2a2a;
  --button-text: #ffffff;
  --loading-bg: #4e4d4d;
}

*{
      padding: 0;
      margin: 0;
      box-sizing: border-box;
      font-family: "Lato", sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

#experience{
      position:fixed;
      height: 100%;
      width: 100%;
      top: 0;
      left: 0;
      overflow: hidden;
      background-color: var(--bg-color);
      transition: background-color 0.3s ease;
}

#experience-canvas{
      width: 100%;
      height: 100%;
}
/* Utilities */
.hidden{
      display: none;
}

/* Dark Mode Toggle - Crossy Road Style */
.dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: linear-gradient(145deg, #D88808, #a8740b);
  color: #FFF;
  border: 4px solid #8B5A08;
  border-radius: 12px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  font-size: 28px;
  box-shadow: 
    0 6px 0 #6B4406,
    0 8px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(0);
}

.dark-mode-toggle:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 10px 0 #6B4406,
    0 12px 16px rgba(0, 0, 0, 0.4);
}

.dark-mode-toggle:active {
  transform: translateY(2px);
  box-shadow: 
    0 4px 0 #6B4406,
    0 6px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .dark-mode-toggle {
  background: linear-gradient(145deg, #8B5710, #5A3808);
  border-color: #3D2506;
  box-shadow: 
    0 6px 0 #2A1A04,
    0 8px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .dark-mode-toggle:hover {
  box-shadow: 
    0 10px 0 #2A1A04,
    0 12px 16px rgba(0, 0, 0, 0.4);
}

body.dark-mode .dark-mode-toggle:active {
  box-shadow: 
    0 4px 0 #2A1A04,
    0 6px 8px rgba(0, 0, 0, 0.3);
}

#experience-canvas {
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  transition: background-color 0.3s ease;
}


/* Modal */
.modal{
      z-index: 1000;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 100%;
      max-width: 700px;
}

.modal-wrapper{
      position: relative;
      width: 100%;
      height: 100%;
      background-color: var(--modal-bg);
      border: 2px solid var(--border-color);
      color: white;
      padding: 35px;
      border-radius: 10px;
}


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

.modal-project-visit-button{
      padding: 10px 15px;
      background-color: var(--button-bg);
      color: var(--button-text);
      font-weight: bold;
      border-radius: 5px;
      cursor: pointer;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 150px;
      margin-top: 20px;
      border: 2px solid var(--border-color);
      text-decoration: none;
}

.modal-exit-button{
      padding: 10px 15px;
      background-color: var(--button-bg);
      color: var(--button-text);
      font-weight: bold;
      border-radius: 5px;
      cursor: pointer;
      display: flex;
      justify-content: center;
      align-items: center;
      border: 2px solid var(--border-color);
}


/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85); /* Semi-transparent dark */
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  z-index: 1000;
}

.loading-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 36px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.instructions {
  z-index: 1000;
  position: absolute;
  top: 90%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-color);
  font-size: 26px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Mobile controls */

.mobile-control {
  z-index: 500;
  position: absolute;
  top: 85%;
  left: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  background: linear-gradient(145deg, #E89F1D, #D88808);
  height: 64px;
  width: 64px;
  display: none;
  justify-content: center;
  align-items: center;
  border: 4px solid #8B5A08;
  border-radius: 12px;
  padding: 8px;
  transition: all 0.15s ease;
  box-shadow: 
    0 6px 0 #6B4406,
    0 8px 15px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  transform-origin: center;
}

.mobile-control:active {
  transform: translate(-50%, -50%) translateY(4px);
  box-shadow: 
    0 2px 0 #6B4406,
    0 4px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(0, 0, 0, 0.2);
  background: linear-gradient(145deg, #D88808, #C67A07);
}

.mobile-control svg rect {
  fill: #FFFFFF;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.left-arrow {
  transform: translate(calc(-100% - 38px), -50%) rotate(270deg);
}

.left-arrow:active {
  transform: translate(calc(-100% - 38px), -50%) translateY(4px) rotate(270deg);
}

.right-arrow {
  transform: translate(38px, -50%) rotate(90deg);
}

.right-arrow:active {
  transform: translate(38px, -50%) translateY(4px) rotate(90deg);
}

.up-arrow {
  transform: translate(-50%, calc(-100% - 38px)) rotate(0deg);
}

.up-arrow:active {
  transform: translate(-50%, calc(-100% - 38px)) translateY(4px) rotate(0deg);
}

.down-arrow {
  transform: translate(-50%, 38px) rotate(180deg);
}

.down-arrow:active {
  transform: translate(-50%, 38px) translateY(4px) rotate(180deg);
}


/* Media Queries */

@media (max-width: 900px) {
  .mobile-control {
    display: flex;
  }
}

@media (max-width: 519px) {
  .enter-button,
  .instructions {
    font-size: 24px;
  }
}

@media (max-width: 396px) {
  .modal-title {
    font-size: 26px;
  }
}