:root {
  --accent:      #FFAA00;
  --accent2:     #FFAA00;
  --accent-rgb:  255, 170, 0;
  --accent2-rgb: 255, 170, 0;
  --app-bg:      linear-gradient(160deg, #1e1e2e 0%, #0d0d14 100%);
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Montserrat', Arial, sans-serif;
  color: #fff;
  background: #000;
}

body.splash {
  position: relative;
  background: linear-gradient(160deg, #1e1e2e 0%, #0d0d14 100%);
  background: var(--app-bg, linear-gradient(160deg, #1e1e2e 0%, #0d0d14 100%));
}

.splash-overlay {
  display: none;
}

.splash-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5.2vh 5.2vw;
}

.splash-logo {
  width: 20.8vw;
  height: auto;
  margin-bottom: 6.5vh;
  filter: drop-shadow(0 1.3vh 3.9vh rgba(0, 0, 0, 0.6));
  animation: floatLogo 2.6s ease-in-out infinite;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1.56vh); }
}

.progress-wrap {
  width: 41.6vw;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.progress-bar {
  width: 100%;
  height: 0.91vh;
  margin-bottom: 2.6vh;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FFAA00, #FFAA00);
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px;
  transition: width 0.3s ease;
  box-shadow: 0 0 1.95vh rgba(255, 170, 0, 0.7);
  box-shadow: 0 0 1.95vh rgba(var(--accent-rgb), 0.7);
}

.progress-fill.error {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  box-shadow: 0 0 1.95vh rgba(231, 76, 60, 0.7);
}

.progress-text {
  font-size: 1.82vh;
  letter-spacing: 0.26vw;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.85;
}

.splash-version {
  position: absolute;
  bottom: 3.25vh;
  right: 2.6vw;
  font-size: 1.56vh;
  letter-spacing: 0.13vw;
  opacity: 0.5;
  z-index: 3;
}

/* ---------- Privacy Modal ---------- */

.privacy-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(0.78vh);
  -webkit-backdrop-filter: blur(0.78vh);
  animation: fadeIn 0.3s ease;
}

.privacy-modal[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.privacy-box {
  width: 65vw;
  max-height: 82vh;
  background: linear-gradient(160deg, #1c1c24 0%, #14141a 100%);
  border: 0.195vh solid rgba(255, 255, 255, 0.08);
  border-radius: 2.34vh;
  padding: 5.2vh 3.9vw 3.9vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3.9vh 10.4vh rgba(0, 0, 0, 0.6);
}

.privacy-title {
  font-size: 3.12vh;
  font-weight: 700;
  letter-spacing: 0.065vw;
  margin-bottom: 2.6vh;
  color: #fff;
}

.privacy-content {
  flex: 1 1 auto;
  overflow-y: auto;
  font-size: 1.95vh;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  padding-right: 1.3vw;
  margin-bottom: 3.25vh;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 170, 0, 0.6) rgba(255, 255, 255, 0.08);
  scrollbar-color: rgba(var(--accent-rgb), 0.6) rgba(255, 255, 255, 0.08);
}

.privacy-content::-webkit-scrollbar {
  width: 0.78vh;
}

.privacy-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.privacy-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FFAA00, #FFAA00);
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  border-radius: 999px;
}

.privacy-content h1,
.privacy-content h2,
.privacy-content h3,
.privacy-content h4 {
  color: #fff;
  font-weight: 700;
  margin: 2.34vh 0 1.04vh;
  letter-spacing: 0.039vw;
}

.privacy-content h3 { font-size: 2.21vh; }

.privacy-content h1:first-child,
.privacy-content h2:first-child,
.privacy-content h3:first-child,
.privacy-content h4:first-child {
  margin-top: 0;
}

.privacy-content p {
  margin: 0 0 1.3vh;
}

.privacy-content p:empty {
  margin: 0;
  height: 0.52vh;
}

.privacy-content ul,
.privacy-content ol {
  margin: 0 0 1.56vh 1.95vw;
}

.privacy-content li {
  margin-bottom: 0.52vh;
}

.privacy-content a {
  color: #FFAA00;
  color: var(--accent2);
  text-decoration: none;
}

.privacy-actions {
  display: flex;
  justify-content: center;
}

.privacy-btn {
  min-width: 15.6vw;
  /* Horizontal spacing via margin -- flexbox `gap` is unsupported on Tizen. */
  margin: 0 0.78vw;
  padding: 2.08vh 2.86vw;
  font-family: inherit;
  font-size: 1.95vh;
  font-weight: 700;
  letter-spacing: 0.195vw;
  text-transform: uppercase;
  color: #fff;
  border: 0.325vh solid transparent;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.privacy-btn.privacy-accept {
  background: linear-gradient(90deg, #FFAA00, #FFAA00);
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.privacy-btn.privacy-deny {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
}

.privacy-btn:focus,
.privacy-btn:hover {
  transform: scale(1.04);
  border-color: #fff;
}

.privacy-btn.privacy-accept:focus,
.privacy-btn.privacy-accept:hover {
  box-shadow: 0 0 3.12vh rgba(255, 170, 0, 0.75);
  box-shadow: 0 0 3.12vh rgba(var(--accent-rgb), 0.75);
}

.privacy-btn.privacy-deny:focus,
.privacy-btn.privacy-deny:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 2.34vh rgba(255, 255, 255, 0.2);
}

/* ---------- Activation / MAC screen ---------- */

.activation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5.2vh 5.2vw;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(0.78vh);
  -webkit-backdrop-filter: blur(0.78vh);
  animation: fadeIn 0.3s ease;
}

.activation[hidden] {
  display: none;
}

.activation-card {
  width: 52vw;
  background: linear-gradient(160deg, #1c1c24 0%, #14141a 100%);
  border: 0.195vh solid rgba(255, 255, 255, 0.08);
  border-radius: 2.6vh;
  padding: 5.2vh 4.5vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 3.9vh 10.4vh rgba(0, 0, 0, 0.6);
}

.activation-logo {
  width: 13vw;
  height: auto;
  margin-bottom: 3.25vh;
  filter: drop-shadow(0 1.04vh 2.86vh rgba(0, 0, 0, 0.55));
}

.activation-title {
  font-size: 3.12vh;
  font-weight: 700;
  letter-spacing: 0.052vw;
  margin-bottom: 1.3vh;
}

.activation-subtitle {
  font-size: 1.95vh;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 3.9vh;
  max-width: 38vw;
}

/* Expiry / status warning line above the subtitle. */
.activation-status {
  font-size: 2.08vh;
  font-weight: 600;
  color: #ff8a7a;
  margin-bottom: 1.95vh;
}

.activation-status[hidden] {
  display: none;
}

.mac-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.86vh 2.6vw;
  margin-bottom: 3.25vh;
  background: rgba(255, 255, 255, 0.04);
  border: 0.195vh solid rgba(255, 255, 255, 0.1);
  border-radius: 1.56vh;
}

/* Tizen's Chromium predates flexbox `gap`, and the `hidden` attribute loses to
   the author `display:flex` above, so spacing uses margins and hiding is
   declared explicitly. */
.mac-box[hidden] {
  display: none;
}

.mac-label {
  font-size: 1.43vh;
  letter-spacing: 0.26vw;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.04vh;
}

.mac-value {
  font-family: 'Courier New', Courier, monospace;
  font-size: 4.16vh;
  font-weight: 700;
  letter-spacing: 0.39vw;
  color: #FFAA00;
  color: var(--accent2);
  text-shadow: 0 0 2.34vh rgba(255, 170, 0, 0.4);
  text-shadow: 0 0 2.34vh rgba(var(--accent-rgb), 0.4);
}

/* Codes (MAC / device key) beside the QR, so the renew screen fits a TV's
   single screenful without scrolling. */
.renew-body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 4.55vh;
}

.renew-codes {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 1.5vw;
}

.renew-codes .mac-box {
  margin-bottom: 2.6vh;
}

.renew-codes .mac-box:last-child {
  margin-bottom: 0;
}

/* The MAC is long; shrink it a touch so it fits the narrower column. */
.renew-codes .mac-value {
  font-size: 3.4vh;
  letter-spacing: 0.26vw;
}

/* QR code linking to the activation site. The white padding is the QR quiet
   zone (the service image is requested with margin=0). */
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  margin: 0 1.5vw;
}

.qr-box[hidden] {
  display: none;
}

.qr-img {
  width: 19.5vh;
  height: 19.5vh;
  padding: 1.04vh;
  background: #fff;
  border-radius: 1.04vh;
  margin-bottom: 1.56vh;
}

.qr-caption {
  font-size: 1.82vh;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.qr-url {
  font-size: 1.56vh;
  color: #FFAA00;
  color: var(--accent2);
  margin-top: 0.78vh;
  word-break: break-all;
}

.activation-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

.activation-btn {
  min-width: 16.6vw;
  /* Horizontal spacing via margin -- flexbox `gap` is unsupported on Tizen. */
  margin: 0 1.3vw;
  padding: 2.08vh 2.6vw;
  font-family: inherit;
  font-size: 1.95vh;
  font-weight: 700;
  letter-spacing: 0.13vw;
  text-transform: uppercase;
  color: #fff;
  border: 0.325vh solid transparent;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.activation-btn.btn-primary {
  background: linear-gradient(90deg, #FFAA00, #FFAA00);
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.activation-btn.btn-exit {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
}

.activation-btn:focus,
.activation-btn:hover {
  transform: scale(1.04);
  border-color: #fff;
}

.activation-btn.btn-primary:focus,
.activation-btn.btn-primary:hover {
  box-shadow: 0 0 3.12vh rgba(255, 170, 0, 0.75);
  box-shadow: 0 0 3.12vh rgba(var(--accent-rgb), 0.75);
}

.activation-btn.btn-exit:focus,
.activation-btn.btn-exit:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 2.34vh rgba(255, 255, 255, 0.2);
}

.activation-btn[disabled] {
  opacity: 0.55;
  cursor: default;
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.blocked-icon {
  width: 9vh;
  height: 9vh;
  margin-bottom: 2.6vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5.2vh;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 0 3.9vh rgba(231, 76, 60, 0.55);
}
