@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,300;1,400;1,500;1,700;1,900&display=swap');

*,
*:before,
*:after {
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  transition: all 0.3s ease;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
*::selection {
  background: #1b1b1b;
  color: #1b1b1b;
}
*::-moz-selection {
  background: #1b1b1b;
  color: #1b1b1b;
}
*::-webkit-selection {
  background: #1b1b1b;
  color: #1b1b1b;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  -webkit-appearance: none;
}
::-webkit-scrollbar-button {
  width: 0px;
  height: 0px;
}
::-webkit-scrollbar-thumb {
  border: none;
  background-color: #e1e1e1;
  -moz-border-radius: 0;
  -webkit-border-radius: 0;
  -khtml-border-radius: 0;
  border-radius: 0;
  behavior: url(../border-radius.htc);
  width: 20px;
  max-width: 20px;
  margin-left: -10px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #e1e1e1;
  cursor: pointer;
}
::-webkit-scrollbar-thumb:active {
  background: #e1e1e1;
}
::-webkit-scrollbar-track {
  border: none;
  background-color: #1b1b1b;
}
::-webkit-scrollbar-track:hover {
  background-color: #1b1b1b;
  cursor: pointer;
}
::-webkit-scrollbar-track:active {
  background: #1b1b1b;
}
::-webkit-scrollbar-corner {
  background: transparent;
}
html {
  margin: 0;
  width: 100%;
}
body {
  margin: 0;
  width: 100%;
  color: #191c1f;
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  -ms-transition: none;
  transition: none;
}

#page {
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  position: relative;
  width: 100%;
  color: #191c1f;
  min-height: 100vh;
  height: auto;
}
#page .bg {
  position: absolute;
  right: 8%;
  top: 5%;
  width: 50%;
  height: 90%;
  background: url('../img/quant.jpg') right bottom no-repeat;
  background-size: contain;
  z-index: 1;
}
#page .logo {
  position: absolute;
  left: 50px;
  top: 20px;
  z-index: 9;
  width: 140px;
}
#page .logo img {
  display: block;
  width: 100%;
  height: auto;
}

.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9;
  text-align: center;
  font-size: 13px;
  line-height: 15px;
  padding: 10px 0;
  color: #191c1f;
}
.footer .wrap {
  padding: 0 20px;
}
.footer .wrap p + p {
  margin: 5px 0 0;
}
.footer a {
  color: #191c1f;
  text-decoration: underline;
}
.footer a:hover {
  text-decoration: none;
}

#home {
  padding: 100px 80px 50px;
  position: relative;
  z-index: 9;
  width: 100%;
  color: #191c1f;
  display: flex;
  justify-content: space-between;
}
#home .title {
  margin: 0;
  font-size: 50px;
  line-height: 1.2;
  font-weight: 400;
  text-transform: uppercase;
  color: #191c1f;
}
#home .title b {
  font-weight: 900;
  font-size: 60px;
  line-height: 1.2;
  color: #191c1f;
}
#home .cont {
  margin: 40px 0 0;
}
#home .text1 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
}
#home .text2 {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 400;
  margin: 5px 0 0;
}
#home .wrap-btns {
  margin: 25px 0 0;
}
#home .button {
  background-color: #0b6ef9;
  color: white;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid #219ebc;
  border-radius: 25px;
  padding: 14px 60px;
  text-transform: uppercase;
  overflow: hidden;
  width: auto;
  text-align: center;
  display: inline-block;
  cursor: pointer;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  -webkit-animation: glowing 1500ms infinite;
  -moz-animation: glowing 1500ms infinite;
  -o-animation: glowing 1500ms infinite;
  animation: glowing 1500ms infinite;
}
.button .flare {
  position: absolute;
  top: 0;
  height: 100%;
  width: 45px;
  transform: skewX(-45deg);
  animation: flareAnimation;
  left: -150%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.4));
  -webkit-animation: flareAnimation 1s infinite linear;
  -moz-animation: flareAnimation 1s infinite linear;
  -o-animation: flareAnimation 1s infinite linear;
  animation: flareAnimation 1s infinite linear;
}

@-webkit-keyframes glowing {
  0% {
    background-color: #0d41e1;
    -webkit-box-shadow: 0 0 3px #0d41e1;
  }
  50% {
    background-color: #0d41e1;
    -webkit-box-shadow: 0 0 40px #0d41e1;
  }
  100% {
    background-color: #0d41e1;
    -webkit-box-shadow: 0 0 3px #0d41e1;
  }
}
@-moz-keyframes glowing {
  0% {
    background-color: #0d41e1;
    -moz-box-shadow: 0 0 3px #0d41e1;
  }
  50% {
    background-color: #0d41e1;
    -moz-box-shadow: 0 0 40px #0d41e1;
  }
  100% {
    background-color: #0d41e1;
    -moz-box-shadow: 0 0 3px #0d41e1;
  }
}
@-o-keyframes glowing {
  0% {
    background-color: #0d41e1;
    box-shadow: 0 0 3px #0d41e1;
  }
  50% {
    background-color: #0d41e1;
    box-shadow: 0 0 40px #0d41e1;
  }
  100% {
    background-color: #0d41e1;
    box-shadow: 0 0 3px #0d41e1;
  }
}
@keyframes glowing {
  0% {
    background-color: #0d41e1;
    box-shadow: 0 0 3px #0d41e1;
  }
  50% {
    background-color: #0d41e1;
    box-shadow: 0 0 40px #0d41e1;
  }
  100% {
    background-color: #0d41e1;
    box-shadow: 0 0 3px #0d41e1;
  }
}

@-webkit-keyframes flareAnimation {
  0% {
    left: -150%;
  }
  100% {
    left: 150%;
  }
}
@-moz-keyframes flareAnimation {
  0% {
    left: -150%;
  }
  100% {
    left: 150%;
  }
}
@-ms-keyframes flareAnimation {
  0% {
    left: -150%;
  }
  100% {
    left: 150%;
  }
}
@-o-keyframes flareAnimation {
  0% {
    left: -150%;
  }
  100% {
    left: 150%;
  }
}
@keyframes flareAnimation {
  0% {
    left: -150%;
  }
  100% {
    left: 150%;
  }
}

#page .callback {
  position: absolute;
  left: 0;
  bottom: 0;
  background: #edae49;
  z-index: 9;
  font-size: 15px;
  line-height: 1.2;
  padding: 10px 15px;
  font-weight: 700;
  border-radius: 5px 5px 0 0;
}

@media (max-width: 1400px) {
  #home .title {
    font-size: 40px;
  }
  #home .title b {
    font-size: 50px;
  }
}
@media (max-width: 1200px) {
  #home .title {
    font-size: 35px;
  }
  #home .title b {
    font-size: 40px;
  }
  #page .logo {
    width: 100px;
    left: 30px;
  }
  #home {
    padding: 60px 50% 80px 30px;
  }
  #home .text1 {
    font-size: 21px;
  }
}
@media (max-width: 980px) {
  #home {
    padding: 60px 30% 80px 30px;
  }
  #home .text1 {
    font-size: 18px;
  }
  #home .text2 {
    font-size: 16px;
  }
  #page .bg {
    width: 40%;
    background: url('../img/quant.jpg') right center no-repeat;
    background-size: contain;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #page .callback {
    display: none;
  }
}
@media (max-width: 1200px) {
  #page .bg {
    width: 40%;
  }
}
@media (max-width: 640px) {
  #page .bg {
    width: 100%;
    background: url('../img/quant.jpg') right center no-repeat;
    background-size: contain;
    bottom: 45%;
  }
  #home {
    padding: 60px 20px 0 20px;
  }
  #page .logo {
    left: 20px;
  }
}
@media (max-width: 681px) {
  #home .title {
    font-size: 30px;
  }
  #home .title b {
    font-size: 35px;
  }
  #page .bg {
    position: static;
    background: url('../img/quant.jpg') right bottom no-repeat;
    background-size: contain;
    width: 90%;
    height: 400px;
    margin: 0 auto;
  }
  .footer {
    position: static;
  }
}
@media (max-width: 430px) {
  #home .title {
    font-size: 22px;
  }
  #home .title b {
    font-size: 28px;
  }
}
@media (max-width: 300px) {
  #page .bg {
    height: 300px;
  }
}

#page .bg {
  display: none !important;
}

/* Налаштування відео-блоку */
.video-bg {
  position: fixed; /* Фіксуємо на екрані */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Ховаємо під усі елементи */
  overflow: hidden;
}

.video-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

/* Шар затемнення (білий напівпрозорий) */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Прозорість 50% */
  z-index: 0;
}

/* --- ВАЖЛИВО: Робимо контейнери прозорими --- */
/* Щоб відео було видно і на головній, і в квізі */
body,
#page,
#quest,
#home,
#main {
  background: transparent !important;
}

/* Переконуємось, що контент лежить вище відео */
#page,
#quest {
  position: relative;
  z-index: 10;
}

/* Сама картка квіза повинна залишатися білою */
#card {
  background: #272727; /* Або той колір, що у тебе в card.css */
}

/* Обгортка для позиціонування */
.banking-widget-wrapper {
  position: relative;
  width: 320px;
  height: 580px;
  margin: 0 auto;
  perspective: 1000px;
  transform: scale(0.9); /* Трохи зменшимо, щоб влізло */
}

/* --- Декоративна картка (синя) --- */
.decorative-card {
  position: absolute;
  top: 40px;
  right: -40px;
  width: 280px;
  height: 450px;
  background: linear-gradient(135deg, #0b6ef9, #00d4ff);
  border-radius: 20px;
  transform: rotate(10deg) translateZ(-50px);
  box-shadow: 0 20px 50px rgba(11, 110, 249, 0.3);
  padding: 20px;
  color: white;
  font-family: 'Roboto', sans-serif;
  z-index: 1;
}

.card-chip {
  width: 40px;
  height: 30px;
  background: #ffd700;
  border-radius: 5px;
  margin-top: 50px;
  margin-bottom: 20px;
  opacity: 0.8;
}

.card-logo {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 200px;
  text-transform: uppercase;
  letter-spacing: 2px;
  writing-mode: vertical-rl; /* Вертикальний текст як на референсі */
  transform: rotate(180deg);
  position: absolute;
  right: 20px;
  top: 20px;
}

.card-number {
  font-family: monospace;
  font-size: 18px;
  letter-spacing: 2px;
  position: absolute;
  bottom: 30px;
  left: 30px;
}

/* --- Телефон --- */
.phone-mockup {
  position: relative;
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 40px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2), inset 0 0 0 8px #e1e1e1;
  overflow: hidden;
  z-index: 2;
  font-family: 'Roboto', sans-serif;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 25px;
  background: #e1e1e1;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  z-index: 10;
}

.app-screen {
  padding: 50px 20px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Шапка */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.user-greeting {
  font-size: 14px;
  color: #888;
}
.user-greeting strong {
  display: block;
  font-size: 20px;
  color: #333;
}
.user-avatar {
  width: 40px;
  height: 40px;
  background: #eee;
  border-radius: 50%;
  background-image: url('https://i.pravatar.cc/100?img=11');
  background-size: cover;
}

/* Картка балансу */
.balance-card {
  background: linear-gradient(135deg, #111, #333);
  color: white;
  padding: 25px;
  border-radius: 20px;
  margin-bottom: 30px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.balance-card.pulse {
  transform: scale(1.02);
}

.balance-card .label {
  font-size: 12px;
  opacity: 0.7;
  text-transform: uppercase;
}
.balance-card h2 {
  margin: 10px 0;
  font-size: 32px;
  font-weight: 700;
}
.balance-card .balance-badge {
  display: inline-block;
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
}

/* Список транзакцій */
.transactions-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
}
.transactions-list {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
}

.tx-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  animation: slideIn 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Оновлені стилі для логотипу */
.tx-icon {
  width: 45px; /* Трохи збільшив */
  height: 45px;
  border-radius: 50%; /* Кругла форма */
  background: #fff; /* Білий фон під лого */
  border: 1px solid #eee;
  overflow: hidden; /* Щоб картинка не вилазила */
  margin-right: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.tx-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Або contain, якщо лого обрізається */
}

.tx-details {
  flex-grow: 1;
}
.tx-name {
  display: block;
  font-weight: 700;
  color: #333;
  font-size: 15px;
}
.tx-type {
  display: block;
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.tx-amount {
  font-weight: bold;
  color: #4caf50;
  font-size: 16px;
}


/* Навігація внизу */
.app-nav {
  display: flex;
  justify-content: space-around;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eee;
}
.nav-item {
  width: 24px;
  height: 24px;
  background: #ddd;
  border-radius: 6px;
}
.nav-item.active {
  background: #0b6ef9;
}

/* Адаптив для мобільних */
@media (max-width: 768px) {
  .banking-widget-wrapper {
    transform: scale(0.8);
    margin: 0 auto;
    left: -10px;
  }
  .decorative-card {
    display: none;
  } /* На мобільному ховаємо синю картку, щоб не заважала */
}

/* --- АДАПТИВ ДЛЯ МОБІЛЬНИХ --- */

/* --- АДАПТИВ ДЛЯ МОБІЛЬНИХ (ПІД КАРТИНКУ) --- */

@media (max-width: 1100px) {
    /* Контейнер: вертикально, текст зверху */
    #home {
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start; /* Вирівнювання по лівому краю */
        text-align: left; /* Текст зліва */
        padding: 90px 20px 0; /* Зверху місце для лого, знизу 0, щоб телефон торкався низу */
        overflow: hidden; /* Щоб телефон не розширював екран */
        min-height: 100vh; /* На весь екран */
    }

    /* Логотип зліва, як на референсі */
    #page .logo {
        left: 20px;
        top: 25px;
        transform: none;
        width: 130px;
    }

    /* Текстовий блок */
    #home .text-content {
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 20px;
        z-index: 10; /* Текст поверх телефону */
        position: relative;
    }

    /* Заголовки */
    #home .title {
        font-size: 30px; /* Трохи менше, щоб влазило */
        line-height: 1.1;
    }
    #home .title b {
        font-size: 38px;
        display: block; /* Перенос рядка */
        margin-bottom: 10px;
    }
    
    #home .text1 {
        font-size: 18px;
        margin-top: 15px;
    }
    #home .text2 {
        font-size: 16px;
        opacity: 0.9;
    }

    /* Кнопка: широка, як на скріншоті */
    #home .wrap-btns {
        width: 100%;
        margin-top: 30px;
    }
    
    #home .button {
        width: 100%; /* На всю ширину */
        max-width: 100%;
        display: block;
        box-sizing: border-box;
        text-align: center;
        padding: 16px 0;
        font-size: 16px;
        box-shadow: 0 10px 30px rgba(11, 110, 249, 0.4); /* Тінь як на скріні */
    }

    /* --- БЛОК З ТЕЛЕФОНОМ --- */
    .banking-widget-wrapper {
        margin: 20px auto 0; /* Відступ від кнопки */
        transform-origin: top center;
        /* Масштабуємо та трохи нахиляємо для 3D ефекту */
        transform: scale(0.85) rotate(-5deg) translateX(10px); 
        width: 320px;
        height: 580px;
        /* Це дозволяє телефону трохи "виїхати" за межі екрану знизу, як на картинці */
        margin-bottom: -100px; 
    }

    /* --- СИНЯ КАРТКА (Повертаємо її!) --- */
    .decorative-card {
        display: block !important; /* Вмикаємо назад */
        top: 60px;
        right: -30px; /* Виглядає з-за телефону праворуч */
        transform: rotate(15deg); /* Сильніший нахил */
        z-index: -1; /* За телефоном */
        width: 260px;
        height: 400px;
        opacity: 1;
    }
    
    /* Фон на мобільному - прибираємо зайве */
    #page .bg { display: none !important; }
}

/* Для дуже маленьких екранів (iPhone SE, старі Android) */
@media (max-width: 370px) {
    #home .title { font-size: 26px; }
    #home .title b { font-size: 32px; }
    .banking-widget-wrapper {
        transform: scale(0.75) rotate(-5deg);
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .video-bg {
        background: #000;
    }
    
    .video-bg video {
        transform: translate(-50%, -50%) scale(0.5) !important;
    }
}

/* --- ФОНОВИЙ ГРАФІК --- */

/* Скидаємо всі старі фони */
#page .bg, .video-bg, #chartBg, .bg-overlay { 
    display: none !important; 
}

/* Контейнер для графіка TradingView */
#tv-chart-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -5; /* Найнижчий рівень */
    pointer-events: none; /* Щоб не реагував на мишку (скрол тощо) */
    background: #ffffff; /* Колір фону, поки графік вантажиться */
}

/* Робимо контент прозорим, щоб фон було видно */
body, #page, #quest, #home, #main, #card {
    background: transparent !important;
}

/* Повертаємо білий фон для карток квіза, щоб текст читався */
#card .slide .cont {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
}