/* ============================================================
   Cyprus Shipping Kiosk — Main Styles
   Target: 1080 × 1920 portrait, Philips 32BDL3751T
   Production-ready: all paths relative, all assets local
   ============================================================ */

:root {
  --navy: #0B2545;
  --navy-deep: #08203F;
  --navy-light: #1A3D6B;
  --gold: #C9A961;
  --gold-bright: #D4AF37;
  --gold-soft: #E5C36A;
  --white: #FFFFFF;
  --ice-blue: #E8F1F8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  background: var(--navy);
  color: white;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

/* ============================================================
   ROOT CONTAINER — fills 1080×1920 on real kiosk
   On desktop preview, fits to viewport with scale
   ============================================================ */
#app {
  width: 1080px;
  height: 1920px;
  position: relative;
  overflow: hidden;
  background: var(--navy);
  transform-origin: top left;
}

/* Auto-scale to fit viewport on desktop preview
   On real kiosk (1080×1920) this has no effect since scale = 1 */
@media (max-width: 1080px), (max-height: 1920px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0d0d;
  }

  #app {
    /* Use CSS scale via custom property for clean scaling */
    transform: scale(var(--preview-scale, 0.5));
    transform-origin: center center;
    flex-shrink: 0;
    border: 14px solid #2a2a2a;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
  }
}

/* ============================================================
   SCREENS — full-screen layers
   ============================================================ */
.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  background: var(--navy);  /* Default solid background so no bleed-through */
  z-index: 1;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

/* ============================================================
   ATTRACT SCREEN
   ============================================================ */
.attract-screen {
  background: var(--navy);
  cursor: pointer;
}

.attract-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Slow Ken Burns zoom for subtle motion in the background */
  animation: ken-burns 25s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  0%   { transform: scale(1.0)  translate(0, 0); }
  100% { transform: scale(1.06) translate(-1%, -1.5%); }
}

/* === Floating particles overlay (bubbles rising) === */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}

.particle {
  position: absolute;
  bottom: -40px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(212,175,55,0.3));
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
  opacity: 0;
  animation: float-up 12s linear infinite;
}

@keyframes float-up {
  0%   { opacity: 0; transform: translateY(0) translateX(0) scale(0.6); }
  10%  { opacity: 0.7; }
  50%  { transform: translateY(-50vh) translateX(20px) scale(1); }
  90%  { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(-100vh) translateX(-20px) scale(0.5); }
}

/* Spread particles across the screen with different timings */
.particle:nth-child(1)  { left:  5%; animation-delay:  0s;   animation-duration: 14s; width: 8px;  height: 8px; }
.particle:nth-child(2)  { left: 15%; animation-delay:  2s;   animation-duration: 11s; width: 14px; height: 14px; }
.particle:nth-child(3)  { left: 25%; animation-delay:  5s;   animation-duration: 13s; width: 10px; height: 10px; }
.particle:nth-child(4)  { left: 35%; animation-delay:  1s;   animation-duration: 15s; width: 16px; height: 16px; }
.particle:nth-child(5)  { left: 45%; animation-delay:  7s;   animation-duration: 10s; width: 9px;  height: 9px;  }
.particle:nth-child(6)  { left: 55%; animation-delay:  3s;   animation-duration: 12s; width: 13px; height: 13px; }
.particle:nth-child(7)  { left: 65%; animation-delay:  6s;   animation-duration: 14s; width: 11px; height: 11px; }
.particle:nth-child(8)  { left: 75%; animation-delay:  4s;   animation-duration: 11s; width: 8px;  height: 8px;  }
.particle:nth-child(9)  { left: 85%; animation-delay:  8s;   animation-duration: 13s; width: 15px; height: 15px; }
.particle:nth-child(10) { left: 95%; animation-delay:  0.5s; animation-duration: 12s; width: 10px; height: 10px; }
.particle:nth-child(11) { left: 10%; animation-delay:  9s;   animation-duration: 15s; width: 7px;  height: 7px;  }
.particle:nth-child(12) { left: 30%; animation-delay: 11s;   animation-duration: 10s; width: 12px; height: 12px; }
.particle:nth-child(13) { left: 50%; animation-delay: 10s;   animation-duration: 13s; width: 9px;  height: 9px;  }
.particle:nth-child(14) { left: 70%; animation-delay:  2.5s; animation-duration: 14s; width: 11px; height: 11px; }
.particle:nth-child(15) { left: 90%; animation-delay:  5.5s; animation-duration: 12s; width: 14px; height: 14px; }

/* === Animated wave at the bottom === */
.attract-wave {
  position: absolute;
  bottom: 0;
  left: -10%;
  width: 120%;
  height: 100px;
  z-index: 4;
  pointer-events: none;
  opacity: 0.4;
}

.attract-wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

.attract-wave .wave-path {
  animation: wave-slide 8s ease-in-out infinite;
  transform-origin: center;
}

.attract-wave .wave-path-2 {
  animation: wave-slide-2 10s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes wave-slide {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-30px); }
}

@keyframes wave-slide-2 {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(30px); }
}

/* === The TAP TO BEGIN block === */
.tap-hint {
  position: absolute;
  bottom: 160px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
  animation: pulse-hint 2.5s ease-in-out infinite;
}

/* Ripple rings around the icon circle */
.tap-hint .ripple-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tap-hint .ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  margin-left: -60px;
  margin-top: -60px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  animation: ripple 2.6s ease-out infinite;
  opacity: 0;
}

.tap-hint .ripple-2 { animation-delay: 0.6s; }
.tap-hint .ripple-3 { animation-delay: 1.2s; }

@keyframes ripple {
  0%   { transform: scale(0.8); opacity: 0.8; border-width: 3px; }
  100% { transform: scale(1.8); opacity: 0;   border-width: 1px; }
}

.tap-hint .icon-circle {
  position: relative;
  z-index: 2;
  width: 120px;
  height: 120px;
  border: 3px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  box-shadow:
    0 0 80px rgba(255, 255, 255, 0.4),
    0 0 40px rgba(212, 175, 55, 0.3);
  animation: icon-glow 3s ease-in-out infinite;
}

@keyframes icon-glow {
  0%, 100% {
    box-shadow:
      0 0 80px rgba(255, 255, 255, 0.4),
      0 0 40px rgba(212, 175, 55, 0.3);
  }
  50% {
    box-shadow:
      0 0 120px rgba(255, 255, 255, 0.6),
      0 0 60px rgba(212, 175, 55, 0.5);
  }
}

.tap-hint .icon-circle svg {
  width: 56px;
  height: 56px;
  fill: white;
}

.tap-hint .label {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 4px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.8);
  /* Gold shimmer pulse */
  background: linear-gradient(90deg,
    rgba(255,255,255,1)   0%,
    rgba(255,255,255,1)   30%,
    rgba(255, 235, 180, 1) 50%,
    rgba(255,255,255,1)   70%,
    rgba(255,255,255,1)   100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 200% 0; }
  50%      { background-position: -100% 0; }
}

.tap-hint .sub {
  font-size: 26px;
  font-weight: 400;
  opacity: 0.95;
  margin-top: 14px;
  letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
}

@keyframes pulse-hint {
  0%, 100% { opacity: 0.75; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-12px); }
}

/* ============================================================
   MENU SCREEN
   ============================================================ */
.menu-screen {
  background:
    radial-gradient(ellipse 1000px 700px at 50% -10%, rgba(212, 175, 55, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 800px 500px at 80% 100%, rgba(26, 61, 107, 0.5) 0%, transparent 60%),
    linear-gradient(to bottom, #08203F 0%, #0B2545 40%, #0E2F58 80%, #1A3D6B 100%);
}

.menu-header {
  padding: 110px 80px 50px;
  text-align: center;
}

.menu-header .greeting {
  font-size: 26px;
  color: var(--gold-bright);
  letter-spacing: 6px;
  text-transform: uppercase;
  opacity: 0.95;
  margin-bottom: 22px;
  font-weight: 500;
}

.menu-header .title {
  font-size: 84px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 28px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.menu-header .title .gold {
  color: var(--gold-bright);
}

.menu-header .tagline {
  font-size: 28px;
  color: var(--ice-blue);
  font-weight: 400;
  opacity: 0.85;
  line-height: 1.5;
  max-width: 820px;
  margin: 0 auto;
}

.menu-header .divider {
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  margin: 44px auto 0;
}

.menu-grid {
  padding: 40px 80px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.menu-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(201, 169, 97, 0.4);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 36px 100px 36px 36px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
  overflow: hidden;
}

.menu-btn::after {
  content: "→";
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-bright);
  font-size: 42px;
  opacity: 0.6;
  transition: all 0.2s;
}

.menu-btn:active {
  transform: scale(0.97);
  background: rgba(201, 169, 97, 0.18);
  border-color: var(--gold-bright);
}

.menu-btn:active::after {
  opacity: 1;
  transform: translateY(-50%) translateX(8px);
}

.menu-btn .number {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-soft));
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Icon-style number (replaces digit with SVG icon) */
.menu-btn .number svg {
  width: 44px;
  height: 44px;
  fill: var(--navy-deep);
}

.menu-btn .text {
  flex: 1;
  line-height: 1.2;
  min-width: 0;
}

.menu-btn .text .main {
  display: block;
  font-size: 30px;
  font-weight: 600;
  color: white;
}

.menu-btn .text .small {
  display: block;
  font-size: 19px;
  font-weight: 400;
  color: var(--ice-blue);
  opacity: 0.75;
  margin-top: 6px;
  letter-spacing: 0.3px;
}

.menu-screen.active .menu-btn {
  animation: slide-in 0.5s ease backwards;
}

.menu-screen.active .menu-btn:nth-child(1) { animation-delay: 0.10s; }
.menu-screen.active .menu-btn:nth-child(2) { animation-delay: 0.18s; }
.menu-screen.active .menu-btn:nth-child(3) { animation-delay: 0.26s; }
.menu-screen.active .menu-btn:nth-child(4) { animation-delay: 0.34s; }
.menu-screen.active .menu-btn:nth-child(5) { animation-delay: 0.42s; }

@keyframes slide-in {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   SECTION SCREENS — shared structure
   ============================================================ */
.section-screen {
  background:
    linear-gradient(to bottom,
      #0B2545 0%,
      #0B2545 60%,
      #0F2D52 100%);
  display: flex;
  flex-direction: column;
}

.section-header {
  min-height: 160px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 169, 97, 0.3);
  display: flex;
  align-items: center;
  padding: 20px 60px;
  flex-shrink: 0;
  z-index: 50;
}

.section-header .header-icon {
  width: 64px;
  height: 64px;
  margin-left: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.section-header .header-icon svg {
  width: 36px;
  height: 36px;
  fill: var(--navy-deep);
}

.back-btn {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(201, 169, 97, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.back-btn:active {
  transform: scale(0.92);
  background: rgba(201, 169, 97, 0.25);
}

.back-btn svg {
  width: 44px;
  height: 44px;
  fill: var(--gold-bright);
}

.section-title-block {
  margin-left: 32px;
  flex: 1;
  min-width: 0;
}

.section-title-block .label {
  font-size: 20px;
  color: var(--gold-bright);
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 4px;
}

.section-title-block .name {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #0B2545;
}

/* Custom scrollbar (subtle) */
.section-body::-webkit-scrollbar {
  width: 8px;
}
.section-body::-webkit-scrollbar-track {
  background: transparent;
}
.section-body::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 97, 0.3);
  border-radius: 4px;
}

/* ============================================================
   PLACEHOLDER (for Sections 1-4 until built)
   ============================================================ */
.section-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 100px;
  min-height: 100%;
}

.section-placeholder .icon {
  width: 220px;
  height: 220px;
  border: 4px solid rgba(201, 169, 97, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 60px;
  color: var(--gold-bright);
  font-size: 110px;
}

.section-placeholder .heading {
  font-size: 54px;
  font-weight: 700;
  margin-bottom: 24px;
  color: white;
}

.section-placeholder .text {
  font-size: 26px;
  color: var(--ice-blue);
  line-height: 1.5;
  max-width: 720px;
  opacity: 0.8;
}

/* ============================================================
   IDLE WARNING BAR
   ============================================================ */
.idle-warning {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gold-bright);
  z-index: 999;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 5s linear;
  opacity: 0;
  box-shadow: 0 -2px 12px rgba(212, 175, 55, 0.6);
}

.idle-warning.active {
  opacity: 0.9;
  transform: scaleX(1);
}

/* ============================================================
   LOGOS — Branding elements
   ============================================================ */

/* Republic of Cyprus logo in section header (top right) */
.section-header .header-logo {
  margin-left: 24px;
  height: 100px;
  width: auto;
  flex-shrink: 0;
  align-self: center;
  /* Transparent PNG — display as-is */
}

/* Maritime Cyprus logo in menu footer (bottom) */
.menu-footer {
  position: relative;
  z-index: 2;
  padding: 20px 80px 60px;
  text-align: center;
}

.menu-footer-logo {
  height: 90px;
  width: auto;
  max-width: 420px;
  /* Transparent PNG, already gold — display as-is */
  opacity: 0.95;
}
