/* Подключение шрифта Gilroy */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

#leadersList {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* общая карточка */
#leadersList li {
    background: #207eeb;
    backdrop-filter: blur(8px);
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    transition: 0.2s ease;
    border: 1px solid rgba(255,255,255,0.08);
    justify-content: flex-end
}

#leadersList li:hover {
    transform: translateY(-2px);
    background: #207eeb
}

/* ссылка */
#leadersList li a {

    color: white;
    text-decoration: none;
    font-weight: 500;
}

/* ===================== */
/* 🥇 ТОП-3 */
/* ===================== */

#leadersList li:nth-child(1) {
    justify-content: space-between;
    background: linear-gradient(135deg, #ffd700, #ffcc33);
    color: #2b2b2b;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

#leadersList li:nth-child(1) a {
    color: #2b2b2b;
}

#leadersList li:nth-child(1)::before {
    justify-content: space-between;
    content: "🥇";
    margin-right: 10px;
}

/* серебро */
#leadersList li:nth-child(2) {
    justify-content: space-between;
    background: linear-gradient(135deg, #c0c0c0, #e0e0e0);
    color: #2b2b2b;
    box-shadow: 0 0 16px rgba(192, 192, 192, 0.4);
}

#leadersList li:nth-child(2) a {
    justify-content: space-between;
    color: #2b2b2b;
}

#leadersList li:nth-child(2)::before {
    justify-content: space-between;
    content: "🥈";
    margin-right: 10px;
}

/* бронза */
#leadersList li:nth-child(3) {
    justify-content: space-between;
    background: linear-gradient(135deg, #cd7f32, #e0a15a);
    color: #2b2b2b;
    box-shadow: 0 0 16px rgba(205, 127, 50, 0.4);
}

#leadersList li:nth-child(3) a {
    justify-content: space-between;
    color: #2b2b2b;
}

#leadersList li:nth-child(3)::before {
    justify-content: space-between;
    content: "🥉";
    margin-right: 10px;
}

/* Если Gilroy недоступен, используется Inter как fallback */
.secret-code {
    padding: 28px 24px;
}
.hidden {
    display: none;
}

.code-box {
    display: flex;
    gap: 10px;
}

#flappy-container {
    position: relative;
}

.game-lock {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    color: white;
    text-align: center;
    font-size: 18px;
    padding: 20px;
    border-radius: 12px;
}

.game-lock.hidden {
    display: none;
}

#flappy-container {
  position: relative;
  width: 100%;
  height: 600px;
  background: var(--white);
  overflow: hidden;
  border: 2px solid var(--blue);
  margin: 0 auto;
  border-radius: 20px;
}

#bird {
  position: absolute;
  width: 54px;
  height: 50px;
  background-image: url('FIt_Bird.png');
  background-size: cover;
  top: 50%;
  left: 50px;
  transition: transform 0.1s linear;
}

.pipe {
  position: absolute;
  display: flex;
  justify-content: center;
  width: 60px;
  background-color: var(--blue);
}

.pipe-top-cap, .pipe-bottom-cap {
    position: absolute;
    width: 70px;
    height: 30px;
    background-color: var(--blue);
    border-radius: 5px;
}

.pipe-top-cap { bottom: -10px; }
.pipe-bottom-cap { top: -10px; }

#score {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 24px;
  font-weight: bold;
  color: var(--blue);
  z-index: 2;

}

#start-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  padding: 10px 20px;
  cursor: pointer;
  z-index: 10;
}

/* Блок игры с замком */
#flappy-container {
  position: relative;
}
.game-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 25;
  border-radius: 20px;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}
.lock-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
.lock-text {
  color: white;
  font-size: 18px;
  font-weight: bold;
  margin: 0;
  text-shadow: 1px 1px 2px black;
}
.lock-subtext {
  color: #ffcc00;
  font-size: 14px;
  margin-top: 10px;
}


.extra {
    padding-left: 5px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
}

.popup {
    padding: 18px;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.popup.hidden {
    display: none;
}

.popup-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    padding: 20px;
    position: relative;
}

a {
    color: var(--blue);
    text-decoration: none;
}

.popup-close {
    position: absolute;
    top: -25px;
    right: 12px;
    border: none;
    background: var(--red);
    font-size: 20px;
    cursor: pointer;
}


.popup-body {
    display: flex;
    flex-direction: column;
}

.popup-img {
        border: 2px solid #2a7;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(32, 126, 235, 0.08);
    cursor: grab;
    border-radius: 20px;
}

.popup-body img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.popup-footer {
    font-weight: bold;
    color: #2a7;
}

:root {
    --light-gray: #F5F5F5;
    --gray: #D2D2D2;
    --dark: #272727;
    --blue: #207EEB;
    --red: #F34252;
    --white: #FFFFFF;
    
    --font-primary: 'Gilroy', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Общий стиль */
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-primary);
    background: var(--light-gray);
    color: var(--dark);
    padding: 20px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Основной контейнер */
.app-wrapper {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

/* Минималистичные карточки */
.glass {
    background: var(--white);
    border-radius: 24px;
    border: 1px solid var(--gray);
    box-shadow: 0 4px 12px rgba(39, 39, 39, 0.04);
}

/* Хедер */
header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--gray);
    border-radius: 24px;
}

header img {
    height: 28px;
}

/* Контейнер */
.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.avatar_n_button {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    flex-direction: column;
    align-items: center;
}

/* Аватар зона */
.avatar-area {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 28px 24px;
}

/* Аксессуары (сверху) */
.accessories {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
}

.accessory {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: var(--light-gray);
    border: 2px solid var(--gray);
    padding: 10px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    opacity: 0.35;
    filter: grayscale(0.6);
    object-fit: contain;
    cursor: not-allowed;
    user-select: none;
    -webkit-user-drag: element;
}

.accessory.unlocked {
    opacity: 1;
    filter: grayscale(0);
    border: 2px solid var(--blue);
    background: var(--white);
    box-shadow: 0 4px 12px rgba(32, 126, 235, 0.08);
    cursor: grab;
}

.accessory.unlocked:active {
    cursor: grabbing;
    opacity: 0.8;
}

/* Аватар */
.avatar-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
    border-radius: 32px;
    overflow: hidden;
    border: 2px solid var(--gray);
    background: var(--light-gray);
}

.avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;
}

/* Надетые предметы */
.item {
    position: absolute;
    width: 90px;
    height: auto;
    top: 40px;
    left: 65px;
    pointer-events: none;
    filter: drop-shadow(0 4px 8px rgba(39, 39, 39, 0.08));
    z-index: 10;
    transition: transform 0.1s ease;
}

/* Вопросы */
.questions {
    margin-top: 8px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.question {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question label {
    font-weight: 600;
    font-size: 16px;
    color: var(--dark);
    letter-spacing: -0.01em;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

input {
    flex: 1;
    padding: 14px 16px;
    border-radius: 16px;
    border: 2px solid var(--gray);
    background: var(--white);
    color: var(--dark);
    font-size: auto;
    font-family: var(--font-primary);
    font-weight: 500;
    outline: none;
    transition: border 0.2s;
    box-sizing: border-box;
}

input::placeholder {
    color: #999;
    font-weight: 400;
}

input:focus {
    border-color: var(--blue);
}

input[readonly] {
    background: var(--light-gray);
    color: #666;
    border-color: var(--gray);
}

button {
    padding: 14px 20px;
    border: none;
    border-radius: 16px;
    background: var(--blue);
    color: white;
    font-weight: 600;
    font-size: 15px;
    font-family: var(--font-primary);
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all 0.15s;
    border: 2px solid var(--blue);
}

button:active {
    transform: scale(0.97);
    background: #1a1a1a;
}

.status {
    min-height: 24px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 4px;
    font-weight: 500;
}

.success {
    color: var(--blue);
}

.error {
    color: var(--red);
}

/* Текст-подсказка */
.questions div[style*="font-size: 13px"] {
    color: #666 !important;
    opacity: 1 !important;
    margin-top: 12px !important;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Анимация при наведении на зону дропа */
.avatar-container[style*="box-shadow"] {
    box-shadow: 0 0 0 3px var(--blue) !important;
}

/* Декоративная полоса-акцент */
.swag {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--blue);
    border-radius: 3px;
} 