* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body.hidden {
    display: none;
}
body {
    background: #050a14;
    display: flex;
    justify-content: center;
    padding: 40px 0;
    color: #fff;
}

.app {
    width: 360px;
}
.device-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}
.device-link:last-child .device-item {
    border-bottom: 1px solid #222; /* Чтобы у последнего элемента тоже была черта снизу */
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
}

.logo-icon {
    font-size: 20px;
}

.menu {
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
}
.instruction-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #1a222c;
  cursor: pointer;
  color: #e6eef8;
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #102033;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-icon {
    color: #ff9f1a;
}

.alert-close {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.6;
}

.balance-card {
    text-align: center;
    margin-bottom: 20px;
}

.balance-title {
    opacity: 0.7;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 48px;
    font-weight: 600;
}

.balance-sub {
    opacity: 0.6;
    margin: 8px 0 20px;
}

.balance-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    flex: 1;
    background: #102033;
    border: none;
    padding: 14px;
    border-radius: 14px;
    color: #4aa3ff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.btn-icon {
    font-size: 18px;
}

.devices-card {
    background: #0d1b2b;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.devices-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.devices-title {
    font-weight: 600;
}

.devices-sub {
    font-size: 13px;
    opacity: 0.6;
}

.add-btn {
    background: #1f3a56;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    color: #4aa3ff;
    cursor: pointer;
}

.device-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #11263c;
    padding: 12px;
    border-radius: 12px;
}

.device-icon {
    background: #1e90ff;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.device-info {
    flex: 1;
}

.device-name {
    font-size: 14px;
}

.device-date {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 4px;
}

.tariff {
    text-align: center;
    font-size: 13px;
    opacity: 0.5;
    margin-bottom: 20px;
}

.referral-card {
    background: #0d1b2b;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.referral-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.referral-text {
    font-size: 16px;
    font-weight: 500;
}

/* Help overlay styles */
.help-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2,6,23,0.6);
    z-index: 2000;
    padding: 24px;
}
.help-overlay.open { display: flex; }
.help-card {
    width: 360px;
    max-width: 100%;
    background: #0b1216;
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    overflow: hidden;
}
/* Overlay Background */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85); /* Затемнение */
  display: none; /* По умолчанию скрыто */
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
}

.modal-overlay.open {
  display: flex; /* Показываем при добавлении класса open */
}

/* Modal Card */
.modal-card {
  background: #16212e; /* Цвет из вашего дизайна */
  width: 100%;
  max-width: 360px;
  border-radius: 20px;
  position: relative;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  right: 15px;
  top: 15px;
  background: #25313f;
  border: none;
  color: #888;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
}

.modal-icon {
  font-size: 50px;
  margin-bottom: 15px;
}

.modal-title {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.modal-text {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 25px;
}

.btn-confirm {
  background: #007bff;
  color: white;
  border: none;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-confirm:hover {
  background: #0069d9;
}
.help-header { display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid rgba(255,255,255,0.03); }
.help-header h2 { margin:0; font-size:18px; flex:1; text-align:center; }
.help-back { background: transparent; border: none; color: #9fbffb; cursor:pointer; padding:6px 8px; border-radius:6px; }
.help-list { padding:12px; max-height:60vh; overflow:auto; }
.help-item { border-radius:8px; margin-bottom:8px; background: rgba(255,255,255,0.02); }
.help-q { width:100%; text-align:left; padding:12px 14px; background:transparent; color:#e6eef8; border:none; font-size:14px; cursor:pointer; display:block; }
.help-a { padding:10px 14px; color:#d2dbe6; font-size:13px; display:none; border-top:1px solid rgba(255,255,255,0.02); }
.help-item.open .help-a { display:block; }

/* prevent body scroll when help open */
body.no-scroll { overflow: hidden; }
