@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800;900&display=swap');

:root {
  --wood-dark: #5c3a21;
  --wood-light: #8b5a33;
  --wood-border: #3a2211;
  --gold: #fbc02d;
  --silver: #e0e0e0;
  --green: #4caf50;
  --text-main: #fff;
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }

body {
  font-family: 'Poppins', sans-serif;
  background-color: #4da6ff;
  color: var(--text-main);
  overflow: hidden;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

/* Background Video */
.bg-video {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  object-fit: cover;
  z-index: -1;
}

#app {
  display: flex; flex-direction: column;
  height: 100vh; width: 100vw;
  position: relative;
}

/* Top Bar Boards */
.top-bar {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 10px; z-index: 10;
}
.user-info-board {
  background: url('../images/header-left.webp') center / 100% 100% no-repeat;
  width: 180px; height: 90px;
  position: relative;
}
.balance-container {
  position: absolute;
  top: 25px; left: 30px;
  display: flex; flex-direction: column; gap: 6px;
}
.balance-row {
  display: flex; align-items: center;
  font-weight: 900; font-size: 16px; color: white;
  text-shadow: 1px 1px 2px black;
}
.balance-row img { width: 22px; height: 22px; margin-right: 8px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)); }

.top-right-board {
  background: url('../images/header-right.webp') center / 100% 100% no-repeat;
  width: 150px; height: 80px;
  position: relative;
}
.top-right-content {
  position: absolute;
  top: 36px; right: 45px;
  display: flex; gap: 8px; align-items: center;
}
.flag-btn, .menu-btn {
  background: #d32f2f;
  border: 2px solid #b71c1c;
  border-radius: 6px; color: white;
  width: 32px; height: 28px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900;
}
.menu-btn { background: #b07e5b; border-color: #5c3a21; font-size: 18px; }

/* Main Content */
#main-content {
  flex: 1; position: relative; overflow-y: auto; padding-bottom: 90px;
}
.view { display: none; padding: 15px; animation: fadeIn 0.3s ease; height: 100%; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.bottom-nav {
  position: fixed; bottom: -1px; left: 0; width: 100%;
  background: transparent url('../images/bgNav.webp') top center / 100% auto no-repeat;
  height: 92px;
  display: flex; justify-content: space-around; align-items: center;
  padding: 5px 5px 0px 5px; z-index: 100;
}
.nav-item {
  background: transparent; border: none; color: white;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 900;
  text-shadow: 1px 1px 2px rgba(0,0,0,1); cursor: pointer;
  transition: transform 0.2s; width: 20%; height: 100%;
}
.nav-item svg, .nav-item img { width: 44px; height: 44px; margin-top: 8px; margin-bottom: -2px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.6)); transition: transform 0.2s; object-fit: contain; }
.nav-item.active svg, .nav-item.active img { transform: translateY(-2px) scale(1.1); filter: drop-shadow(0 4px 4px rgba(0,0,0,0.8)); }
.nav-item.active span { color: var(--gold); }

/* Custom Wood Panels for Content */
.wood-panel {
  background: url('../images/info-wood.webp') center / 100% 100% no-repeat;
  padding: 30px 20px;
  color: white; text-align: center;
  font-weight: 800; text-shadow: 1px 1px 2px #000;
  margin-bottom: 15px;
}

/* Modals Overlay & Styles */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 1; transition: opacity 0.3s ease;
}
.modal-overlay.hidden {
  opacity: 0; pointer-events: none;
}
.modal-content {
  width: 90%; max-width: 360px;
  display: flex; flex-direction: column; align-items: center;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-content.hidden { display: none; }

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-title {
  color: white; font-size: 28px; font-weight: 900;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 4px 4px rgba(0,0,0,0.5);
  margin-bottom: 20px; letter-spacing: 1px;
}

.wood-btn {
  background: linear-gradient(to bottom, #a6612c, #7d3f11);
  border: 2px solid #552706;
  border-radius: 10px;
  color: white; font-family: 'Poppins', sans-serif; font-weight: 900;
  font-size: 16px; text-shadow: 1px 1px 2px black;
  display: flex; align-items: center;
  padding: 10px 15px; cursor: pointer;
  box-shadow: inset 0 2px 2px rgba(255,255,255,0.2), 0 4px 6px rgba(0,0,0,0.5);
  transition: transform 0.1s, filter 0.1s;
}
.wood-btn:active { transform: scale(0.95); filter: brightness(0.9); }

.lang-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%;
}
.lang-grid .wood-btn { justify-content: flex-start; gap: 10px; font-size: 15px; padding: 12px 10px; }
.lang-grid .wood-btn.wide { grid-column: 1 / -1; justify-content: center; }
.lang-grid .wood-btn.active { color: var(--gold); border-color: var(--gold); }
.lang-grid .flag { font-size: 22px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)); }

.menu-list {
  display: flex; flex-direction: column; gap: 12px; width: 100%;
}
.menu-list .wood-btn.large {
  justify-content: center; font-size: 20px; padding: 15px;
}
