:root {
  --primary-orange: #ff9900;
  --bg-dark: #222;
  --text-gray: #999;
  --text-white: #fff;
  --btn-inactive: #333;
  --btn-text-inactive: #a1a1a1;
}

html,
body {
  background-color: var(--bg-dark);
  color: var(--text-white);
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.height-100 {
  min-height: calc(var(--vh, 1vh) * 100);
  width: 100%;
  display: flex;
  flex-direction: column;
}

.h100 {
  height: 100%;
}

.dark-theme {
  color: var(--text-white);
}

.dark-theme p {
  color: var(--text-gray);
  font-size: 15px;
}

.orange {
  color: var(--primary-orange) !important;
}

.center {
  text-align: center;
}

.bold {
  font-weight: 600;
}

/* Inputs */
.dark-theme input {
  height: 50px;
  background-color: #333;
  border: 1px solid #444;
  border-radius: 8px;
  color: #fff;
  font-size: 28px;
  text-align: center;
  transition: all 0.3s ease;
  caret-color: var(--primary-orange);
}

.dark-theme input:focus {
  border-color: var(--primary-orange);
  outline: none;
  background-color: #3a3a3a;
}

#inFirst,
#inSecond {
  letter-spacing: 5px;
  padding: 5px 20px;
  width: 100%;
  box-sizing: border-box;
}

.text-danger {
  color: #ff4444;
}

/* Button Styles */
.dark-theme .button {
  background-color: var(--btn-inactive);
  border: none;
  font-size: 18px;
  height: 50px;
  color: var(--btn-text-inactive);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.dark-theme .button[active] {
  background-color: var(--primary-orange);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
}

/* Mask Icons */
.pwa-icons .pdd-sm {
  cursor: pointer;
}

.pwa-icons .pdd-sm img {
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
  transition: all 0.3s ease;
  border-radius: 22%;
  /* Correct iOS-like rounding */
  display: block;
}

.pwa-icons .pdd-sm img[active] {
  filter: grayscale(0);
  -webkit-filter: grayscale(0);
  transform: scale(1.05);
}

.img-cover {
  position: relative;
  overflow: hidden;
  border-radius: 22%;
  background: #111;
}

.img-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.square {
  aspect-ratio: 1 / 1;
  width: 100%;
}

.pwa-icons p.small {
  font-size: 11px;
  margin-top: 10px;
  color: var(--text-gray);
  white-space: nowrap;
}

.pwa-icons .pdd-sm:has(img[active]) p {
  color: #fff;
}

/* Container & Grid */
.container {
  width: calc(100% - 60px);
  max-width: 940px;
  margin: 0 auto;
  position: relative;
}

.row {
  display: flex;
  flex-wrap: wrap;
}

.row_col {
  flex-direction: column;
}

.row_center {
  align-items: center;
}

.row_sb {
  justify-content: space-between;
}

/* Force icons to stay in one row on mobile */
.row_buttons.row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  width: 100% !important;
}

.row_buttons>div {
  width: 33.33% !important;
  flex-shrink: 0;
}

.col-1\@xs {
  width: 100%;
}

.col-3-4\@xs {
  width: 85%;
  /* Slightly wider for better icon fit */
  max-width: 320px;
}

/* Ensure no ghost elements from Desktop view */
.Desctop {
  display: none !important;
}

@media (min-width: 768px) {
  .Mobile {
    display: none !important;
  }

  .Desctop {
    display: flex !important;
  }
}

.mt-1 {
  margin-top: 10px;
}

.mt-2 {
  margin-top: 20px;
}

.mb-3 {
  margin-bottom: 30px;
}

.m-2 {
  margin: 20px 0;
}

.m-3 {
  margin: 30px 0;
}

.hidden {
  display: none !important;
}

/* Desktop vs Mobile */
@media (min-width: 768px) {
  .Mobile {
    display: none !important;
  }

  .Desctop.hidden {
    display: block !important;
  }
}

/* Iframe Support */
.frame-embed {
  overflow: hidden;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: none;
}

/* PIN Circles */
.cercle-wr .cercle {
  border-radius: 50%;
  width: 12px;
  height: 12px;
  transition: all 0.2s ease;
}

/* App specific PIN Screens */
.keyboard .key {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

/* Ozon Theme */
.App.ozon {
  background-color: #1d1f24;
}

.App.ozon .cercle {
  background-color: #575c62;
  width: 8px;
  height: 8px;
}

.App.ozon .cercle-wr[active] .cercle {
  background-color: #fff;
}

.App.ozon .keyboard .key {
  font-size: 32px;
  font-weight: 300;
  color: #fff;
}

.App.ozon .keyboard .key small {
  font-size: 12px;
  color: #82848c;
}

.App.ozon .bottom {
  color: #575c62;
  font-size: 14px;
}

/* Yandex Theme */
.App.yandex {
  background-color: #1a1a1a;
}

.App.yandex .cercle {
  border: 2px solid #777;
  background: transparent;
  width: 12px;
  height: 12px;
}

.App.yandex .cercle-wr[active] .cercle {
  background-color: #ffdc30;
  border-color: #ffdc30;
}

.App.yandex .keyboard .key {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin: 4px;
  font-size: 24px;
}

/* Wallet Theme */
.App.wallet {
  background-color: #1c1d21;
}

.App.wallet .cercle {
  background-color: rgba(203, 204, 219, 0.2);
  width: 12px;
  height: 12px;
}

.App.wallet .cercle-wr[active] .cercle {
  background-color: #fff;
}

.App.wallet .keyboard .key {
  font-size: 24px;
}
