/* Zarina TV Showroom Presentation Styles */
/* Chrome 69 Compatible: No flex gap, no aspect-ratio */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}

:root {
  --bg-primary: #141210;
  --bg-secondary: #1E1B18;
  --bg-card: rgba(30, 27, 24, 0.85);
  --text-main: #F4EFE8;
  --text-muted: #A89F94;
  --accent-gold: #C9A96E;
  --accent-gold-light: #E0C895;
  --accent-gold-dark: #9E7D47;
  --border-color: rgba(201, 169, 110, 0.25);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1vw; /* Responsive root scale */
  cursor: none;
}

body.preview-mode {
  cursor: default;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Base screen layer */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
  overflow: hidden;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

/* Safe Area (4% overscan) */
.safe-area {
  position: relative;
  width: 92%;
  height: 92%;
  margin: 4% auto;
}

/* Brand Logo */
.brand-logo {
  max-width: 16rem;
  height: auto;
  display: block;
}

/* Connection Status Indicator */
.connection-badge {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  background: rgba(20, 18, 16, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  z-index: 9999;
  display: none;
  align-items: center;
}
.connection-badge.visible {
  display: flex;
}
.connection-badge .dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #E57373;
  margin-right: 0.6rem;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* ====================================================
   1. IDLE (PORTFOLIO) SCREEN
   ==================================================== */
#screen-idle {
  background-color: var(--bg-primary);
}

.portfolio-media-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.portfolio-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.8s ease;
}

.portfolio-media.ken-burns {
  animation: kenBurns 8s ease-in-out forwards;
}

@keyframes kenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.portfolio-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
  background: radial-gradient(circle, #25211D 0%, #141210 100%);
}

.portfolio-empty h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  color: var(--accent-gold);
  margin-top: 1.5rem;
  letter-spacing: 0.2rem;
}

.portfolio-empty p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
  letter-spacing: 0.1rem;
}

/* Idle Overlay Controls */
.idle-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.idle-logo {
  position: absolute;
  bottom: 4%;
  left: 4%;
  background: rgba(20, 18, 16, 0.7);
  padding: 0.8rem 1.4rem;
  border-radius: 0.4vw;
  border: 1px solid var(--border-color);
}

.idle-code-box {
  position: absolute;
  bottom: 4%;
  right: 4%;
  background: rgba(20, 18, 16, 0.85);
  border: 1px solid var(--border-color);
  padding: 1rem 1.6rem;
  border-radius: 0.4vw;
  text-align: right;
}

.idle-code-box .label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.idle-code-box .code {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.3rem;
  line-height: 1.1;
  margin-top: 0.2rem;
}

.idle-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.3rem;
  background: rgba(201, 169, 110, 0.2);
}

.idle-progress-fill {
  height: 100%;
  background: var(--accent-gold);
  width: 100%;
  transition: width 1s linear;
}

/* ====================================================
   2. WELCOME SCREEN
   ==================================================== */
#screen-welcome {
  background-color: var(--bg-primary);
}

.welcome-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px);
  opacity: 0.25;
  transform: scale(1.05);
}

.welcome-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.welcome-title {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  color: var(--text-main);
  margin-top: 2rem;
  letter-spacing: 0.05rem;
}

.welcome-title strong {
  color: var(--accent-gold);
  font-weight: 600;
}

.welcome-subtitle {
  font-size: 1.6rem;
  color: var(--text-muted);
  margin-top: 1rem;
  letter-spacing: 0.05rem;
}

.welcome-footer {
  margin-top: 3.5rem;
  font-size: 1.1rem;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
}

.welcome-footer span {
  color: var(--text-muted);
  margin-left: 0.8rem;
  margin-right: 0.8rem;
}

/* ====================================================
   3. ROOMS SCREEN
   ==================================================== */
#screen-rooms {
  background-color: var(--bg-primary);
}

.rooms-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.rooms-header h2 {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--accent-gold);
}

.rooms-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: -1rem;
}

.room-card {
  margin: 1rem;
  background: var(--bg-card);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 0.4vw;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease;
  width: 25rem;
}

.room-card.active {
  border-color: var(--accent-gold);
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(201, 169, 110, 0.15);
}

.room-cover {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  background: var(--bg-secondary);
}

.room-info {
  padding: 1.4rem;
  text-align: left;
}

.room-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-main);
}

.room-count {
  font-size: 0.95rem;
  color: var(--accent-gold);
  margin-top: 0.4rem;
}

/* ====================================================
   4. ROOM SLIDE SCREEN
   ==================================================== */
#screen-room {
  background-color: #0c0b0a;
}

.slide-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  filter: blur(25px);
  transform: scale(1.1);
}

.slide-main-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-media-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1);
  transform-origin: center center;
}

.slide-media {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
  border-radius: 0.2vw;
  display: block;
}

/* Compare Mode (Two slides side by side) */
.compare-container {
  display: flex;
  width: 92vw;
  height: 88vh;
}

.compare-pane {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 0.5rem;
}

.compare-divider {
  width: 2px;
  background: var(--accent-gold);
  height: 80%;
  margin: auto 0.5rem;
  opacity: 0.8;
}

.compare-pane .slide-media {
  max-width: 100%;
  max-height: 80vh;
}

.compare-tag {
  margin-bottom: 0.8rem;
  font-size: 1rem;
  padding: 0.3rem 0.9rem;
  border-radius: 0.3vw;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
}

/* Slide HUD (Heads Up Display) */
.slide-hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hud-top-left {
  position: absolute;
  top: 4%;
  left: 4%;
  background: rgba(20, 18, 16, 0.75);
  padding: 0.6rem 1.4rem;
  border-radius: 0.3vw;
  border: 1px solid var(--border-color);
}

.hud-room-name {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-main);
}

.hud-top-right {
  position: absolute;
  top: 4%;
  right: 4%;
  background: rgba(20, 18, 16, 0.75);
  padding: 0.6rem 1.2rem;
  border-radius: 0.3vw;
  border: 1px solid var(--border-color);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.1rem;
}

.hud-bottom-left {
  position: absolute;
  bottom: 4%;
  left: 4%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 65vw;
}

.hud-tag {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 0.2vw;
  text-transform: uppercase;
  letter-spacing: 0.06rem;
  margin-bottom: 0.5rem;
}

.tag-proposal {
  background: var(--accent-gold);
  color: #141210;
}

.tag-current {
  background: #3A3530;
  color: #DDD5CA;
}

.hud-caption {
  font-size: 1.2rem;
  color: var(--text-main);
  background: rgba(20, 18, 16, 0.75);
  padding: 0.5rem 1rem;
  border-radius: 0.3vw;
  border: 1px solid rgba(201, 169, 110, 0.15);
}

.hud-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
}

.hud-progress-fill {
  height: 100%;
  background: var(--accent-gold);
  transition: width 0.3s ease;
}

/* ====================================================
   5. PACKAGES SCREEN
   ==================================================== */
#screen-packages {
  background-color: var(--bg-primary);
}

.packages-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.packages-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.packages-header h2 {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  color: var(--accent-gold);
}

.packages-cards {
  display: flex;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 82rem;
}

.package-card {
  flex: 1;
  margin: 0 1.2rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 0.4vw;
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s ease;
}

.package-card.recommended {
  border: 2px solid var(--accent-gold);
  background: rgba(35, 30, 25, 0.95);
  transform: scale(1.04);
  box-shadow: 0 15px 35px rgba(201, 169, 110, 0.2);
}

.package-rec-badge {
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gold);
  color: #141210;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 1.2rem;
  border-radius: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.package-tier-name {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 1.2rem;
}

.package-price-wrap {
  text-align: center;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(201, 169, 110, 0.15);
  border-bottom: 1px solid rgba(201, 169, 110, 0.15);
  margin-bottom: 1.5rem;
}

.package-price {
  font-family: var(--font-sans);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--accent-gold);
}

.package-features {
  list-style: none;
  flex-grow: 1;
}

.package-features li {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.4;
}

.package-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-gold);
}

.packages-footnote {
  margin-top: 2.5rem;
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
}

/* ====================================================
   6. PAUSE SCREEN
   ==================================================== */
#screen-pause {
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pause-content {
  text-align: center;
  animation: breathe 4s ease-in-out infinite;
}

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

/* ====================================================
   7. THANKS SCREEN
   ==================================================== */
#screen-thanks {
  background-color: var(--bg-primary);
}

.thanks-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.thanks-title {
  font-family: var(--font-serif);
  font-size: 4rem;
  color: var(--text-main);
  margin-top: 2rem;
}

.thanks-title strong {
  color: var(--accent-gold);
}

.thanks-info {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thanks-item {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.thanks-item strong {
  color: var(--accent-gold);
}

/* ====================================================
   UNCONFIGURED TV / ERROR SCREEN
   ==================================================== */
#screen-error {
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-card {
  max-width: 45rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 3rem;
  border-radius: 0.4vw;
  text-align: center;
}

.error-card h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
}

.error-card p {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.error-card code {
  background: rgba(0,0,0,0.5);
  padding: 0.4rem 0.8rem;
  border-radius: 0.2vw;
  color: var(--accent-gold);
  font-family: monospace;
}

/* ====================================================
   PREVIEW CONTROLS BAR (Only visible in preview mode)
   ==================================================== */
.preview-controls {
  display: none;
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 18, 16, 0.9);
  border: 1px solid var(--accent-gold);
  padding: 0.6rem 1.4rem;
  border-radius: 2rem;
  z-index: 10000;
}

body.preview-mode .preview-controls {
  display: flex;
  align-items: center;
}

.preview-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 0.2s ease;
}

.preview-btn:hover {
  background: rgba(201, 169, 110, 0.2);
  color: var(--accent-gold);
}
