:root {
  --accent: #FFCC66;
  --bg-dark: #0C2340;
  --text-light: #F5F5F5;
  --text-muted: rgba(245, 245, 245, 0.7);
}

/* API Loading: hide dynamic content until API data arrives */
.api-loading {
  opacity: 0 !important;
  transition: opacity 0.3s ease-in-out;
}

.api-ready {
  opacity: 1 !important;
  transition: opacity 0.3s ease-in-out;
}

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

body {
  background-color: var(--bg-dark);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
}

/* Scaling container to preserve 1920x1080 layout */
#scaling-container {
  width: 1920px;
  height: 1080px;
  position: relative;
  background-color: var(--bg-dark);
  overflow: hidden;
  flex-shrink: 0;
}

/* Background Image Layer */
.bg-image {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  object-fit: cover;
  z-index: 0;
  display: none;
}

/* Gradient overlay */
.bg-gradient-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  background: linear-gradient(180deg, rgba(12, 35, 64, 0.8) 0%, rgba(12, 35, 64, 0.45) 40%, rgba(12, 35, 64, 0.88) 75%, var(--bg-dark) 100%);
  z-index: 1;
}

/* Header */
header {
  position: absolute;
  width: 1920px;
  height: 120px;
  left: 0;
  top: 0;
  background: rgba(12, 35, 64, 0.75);
  border-bottom: 2.33px solid #FFCC66;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 80px;
}

.brand-container {
  width: 180px;
  height: 68px;
  display: flex;
  align-items: center;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.welcome-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 26px;
  display: flex;
  align-items: center;
  color: #F5F5F5;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.welcome-text strong {
  font-weight: 800;
  color: var(--text-light);
  margin-left: 8px;
}

.header-separator {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 26px;
  color: rgba(245, 245, 245, 0.4);
  user-select: none;
}

.header-right {
  display: flex;
  align-items: center;
}

.header-right>* {
  margin-right: 30px;
}

.header-right>*:last-child {
  margin-right: 0;
}

.room-badge {
  box-sizing: border-box;
  padding: 0 20px;
  height: 44px;
  background: rgba(255, 204, 102, 0.15);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--accent);
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
}

.room-badge span:first-child {
  margin-right: 8px;
}

.weather-container {
  display: flex;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 22px;
  color: var(--text-light);
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
}

.weather-container>*:first-child {
  margin-right: 8px;
}

.weather-icon {
  font-size: 24px;
  color: var(--accent);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clock-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 32px;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
}

/* Hero Section */
.hero-section {
  position: absolute;
  width: 1030px;
  left: 80px;
  top: 204px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 10;
}

.hero-section>* {
  margin-bottom: 20px;
}

.hero-section>*:last-child {
  margin-bottom: 0;
}

.hero-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 54px;
  line-height: 59px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--text-light);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.95), 0 0 25px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.hero-title-sub {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 29px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.95), 0 0 25px rgba(0, 0, 0, 0.8);
  opacity: 0.9;
  flex-shrink: 0;
}

.hero-desc {
  width: 964px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 40px;
  color: var(--text-light);
  opacity: 1;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.95), 0 0 25px rgba(0, 0, 0, 0.8);
  flex-shrink: 0;
}

.hero-desc-en {
  display: block;
  font-size: 20px;
  line-height: 30px;
  margin-top: 10px;
  opacity: 0.8;
}

.map-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 12px;
  width: 372px;
  height: 110px;
  background: rgba(12, 35, 64, 0.85);
  border: 5px solid rgba(255, 204, 102, 0.15);
  flex-shrink: 0;
  margin-top: 30px;
  cursor: pointer;
  outline: none;
  transition: transform 0.1s ease-in-out, border-color 0.1s ease-in-out, background-color 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}

.map-card.focused {
  border: 5px solid var(--accent);
  box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.6), 0px 0px 20px rgba(255, 204, 102, 0.3);
  background: rgba(12, 35, 64, 0.9);
  transform: translateY(-8px);
}

.map-card>*:first-child {
  margin-right: 20px;
}

.map-preview-container {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  width: 140px;
  height: 95px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
}

.map-preview-img {
  width: 137.33px;
  height: 92.33px;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  opacity: 0.65;
}

.map-pin-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(12, 35, 64, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-pin-overlay svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.6));
}

.map-card-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 27px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.map-card-text-en {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
}

.map-card-text-vi {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 17px;
  text-transform: uppercase;
  color: var(--text-light);
  opacity: 0.8;
  margin-top: 2px;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
}

/* Slideshow Section */
.slideshow-section {
  position: absolute;
  width: 840px;
  height: 400px;
  right: 15px;
  top: 185px;
  z-index: 10;
}

.slide-card {
  box-sizing: border-box;
  position: absolute;
  width: 640px;
  height: 360px;
  left: 100px;
  top: 20px;
  border: none;
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 204, 102, 0.1);
  border-radius: 20px !important;
  overflow: hidden !important;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.8s ease, z-index 0.8s step-end;
  -webkit-transition: -webkit-transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.8s ease, z-index 0.8s step-end;
  will-change: transform, opacity;
}

/* Fix EXIF orientation for slideshow images on WebOS 5+ */
.slide-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Apply EXIF rotation data - works on Chromium 79+ (WebOS 5) */
  image-orientation: from-image;
  -webkit-image-orientation: from-image;
  display: block;
  border-radius: 0;
}

.slide-pos-active {
  transform: translate(0, 0) scale(1);
  -webkit-transform: translate(0, 0) scale(1);
  opacity: 1;
  z-index: 3;
}

.slide-pos-left {
  transform: translate(-180px, 0) scale(0.85);
  -webkit-transform: translate(-180px, 0) scale(0.85);
  opacity: 0.6;
  z-index: 1;
}

.slide-pos-right {
  transform: translate(180px, 0) scale(0.85);
  -webkit-transform: translate(180px, 0) scale(0.85);
  opacity: 0.6;
  z-index: 1;
}

.slide-pos-hidden {
  transform: translate(0, 0) scale(0.7);
  -webkit-transform: translate(0, 0) scale(0.7);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

.slide-indicators {
  position: absolute;
  right: 150px;
  bottom: 45px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  z-index: 20;
  height: 16.8px;
}

.slide-indicators>* {
  margin-right: 12px;
}

.slide-indicators>*:last-child {
  margin-right: 0;
}

.indicator-dot {
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50% !important;
  transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, width 0.3s ease, height 0.3s ease;
  -webkit-transition: -webkit-transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.indicator-dot.active {
  width: 16.8px;
  height: 16.8px;
  background: var(--accent);
  border: 1px solid var(--accent);
}

/* Bottom Menu Tiles */
.tiles-container {
  position: absolute;
  height: 290px;
  left: 65px;
  right: 65px;
  bottom: 140px;
  z-index: 10;
}

.main-nav {
  position: relative;
  width: 1790px;
  height: 290px;
}

.nav-tile {
  box-sizing: border-box;
  position: absolute;
  width: 293px;
  height: 270px;
  top: 0;
  background: #0C2340;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 30px 16px;
  overflow: hidden;
  transition: transform 0.1s ease-in-out, border-color 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
  will-change: transform, border-color;
  cursor: pointer;
  outline: none;
}

.tile-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.8;
  z-index: 0;
  transition: opacity 0.2s ease-in-out;
  display: none;
}

.tile-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(12, 35, 64, 0.5);
  z-index: 1;
  transition: opacity 0.2s ease-in-out;
}

.tile-content {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 30px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
}

.tile-icon-wrapper {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-svg {
  width: 100%;
  height: 100%;
  transition: stroke 0.2s ease-in-out;
}

.tile-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-light);
  text-align: left;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
  transition: color 0.2s ease-in-out;
  white-space: normal;
}

.tile-title-sub {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 17px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
  transition: color 0.2s ease-in-out;
}

.nav-tile.focused .tile-title-sub {
  color: rgba(255, 204, 102, 0.8) !important;
}

/* Position Mapping (Fixed in PX) */
.nav-tile[data-action="promotion"] {
  left: 0px;
}

.nav-tile[data-action="service"] {
  left: 299px;
}

.nav-tile[data-action="facilities"] {
  left: 598px;
}

.nav-tile[data-action="tv"] {
  left: 897px;
}

.nav-tile[data-action="info"] {
  left: 1196px;
}

.nav-tile[data-action="notification"] {
  left: 1495px;
}

/* Card Active / Focused Styling */
.nav-tile.focused {
  top: -12px;
  border: 5px solid var(--accent);
  box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.6), 0px 0px 20px rgba(255, 204, 102, 0.3);
}

.nav-tile.focused .tile-bg {
  opacity: 1;
}

.nav-tile.focused .tile-overlay {
  opacity: 0;
}

.nav-tile.focused .tile-svg {
  stroke: var(--accent) !important;
}

.nav-tile.focused .tile-title {
  color: var(--accent) !important;
}

/* Footer Hint Section */
footer {
  box-sizing: border-box;
  position: absolute;
  height: 90px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(12, 35, 64, 0.8);
  border-top: 1.33px solid rgba(255, 204, 102, 0.3);
  z-index: 10;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 80px;
}

.footer-text {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 36px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  letter-spacing: 0.5px;
}

.gold-symbol {
  color: var(--accent);
  font-weight: 700;
  margin: 0 4px;
}

/* Toast */
#toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: opacity .3s;
  font-size: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}