/* 
style.css */
@import url('https://fonts.cdnfonts.com/css/sf-pro-display');
/* Фикс для iOS Safari: растягиваем на реальную высоту экрана */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    /* Важнейшая строка для мобилок: */
    height: -webkit-fill-available; 
    background-color: #000 !important; /* Больше никакой белой полосы */
    overflow: hidden;
    position: fixed; /* Запрещает "прыгающий" скролл */
}

canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    outline: none;
    /* Убираем жесткие 100vw/vh, даем JS управлять размером */
}
/* ===== Прицел чуть меньше оригинала ===== */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;   
    height: 15px;  
    pointer-events: none;
    z-index: 5;
    transform: translate(-50%, -50%);
}

/* Горизонтальная линия */
#crosshair::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 1px;
    width: 100%;
    height: 2px; 
    background: #119832e6;
}

/* Вертикальная линия */
#crosshair::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0.5px;
    width: 2px;  
    height: 100%;
    background: #119832e6;
}

/* ===============================
   MAIN HUD (SCORE + TIMER) - Premium iOS Style
================================ */

#ui {
    position: absolute;
    top: 20px;
    left: 20px;

    padding: 16px 28px;
    border-radius: 24px;

    background: rgba(255, 255, 255, 0.08); /* стеклянный фон */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    border-left: 5px solid rgba(255, 255, 255, 0.25); /* мягкий светлый акцент */
    color: #ffffff;

    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.4px;

    text-shadow: 0 0 4px rgba(255, 255, 255, 0.25);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.15);

    pointer-events: none;
    z-index: 10000;
}
/* ===============================
   QUIZ CONTAINER (iOS Glass Card)
================================ */

#quiz-container {
    position: absolute; 
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);

    width: 380px;
    padding: 45px 35px;

    border-radius: 34px;

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);

    border: 1px solid rgba(255, 255, 255, 0.2);

    color: white;
    text-align: center;

    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;

    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.7),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);

    display: none;
    z-index: 1000;

    animation: quizPop 0.35s ease;
}


/* ===============================
   QUESTION TEXT
================================ */

#quiz-container h2 {
    margin-top: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}


/* ===============================
   ANSWERS CONTAINER
================================ */

#answers { 
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}


/* ===============================
   ANSWER BUTTONS (Apple style)
================================ */

#answers button {
    padding: 14px;

    border-radius: 18px;
    border: none;

    font-size: 15px;
    font-weight: 500;

    cursor: pointer;

    background: rgba(255, 255, 255, 0.12);
    color: white;

    backdrop-filter: blur(10px);

    transition: all 0.25s ease;

    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}


/* Hover */
#answers button:hover {
    background: white;
    color: black;
    transform: translateY(-2px);
}


/* Active (нажатие) */
#answers button:active {
    transform: scale(0.96);
}


/* ===============================
   APPEAR ANIMATION
================================ */

@keyframes quizPop {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}


@keyframes shake {
  0% { transform: translate(0,0); }
  25% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 1px); }
  75% { transform: translate(1px,1px); }
  100% { transform: translate(0,0); }
}

#weapon.fire {
  animation: shake 0.1s ease-in-out;
}


/* Контейнер для всей статистики справа */
#stats-container {
    position: absolute;
    top: 90px;
    right: 20px;
    color: white;
    font-family: 'Courier New', Courier, monospace;
    text-align: right;
    user-select: none; /* Чтобы нельзя было случайно выделить текст мышкой */
    pointer-events: none; /* Чтобы клики проходили сквозь текст в игру */
    z-index: 100; /* Добавь это, чтобы интерфейс был над игрой */
}

/* Строка с выстрелами */
.shots-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Надпись "SHOTS:" и само число */
.shots-label {
    font-size: 24px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9);
    letter-spacing: 1px;
}

#shots-count {
    color: #f4f4f4;
    font-weight: bold;
    transition: transform 0.1s ease-out;
}

/* Разделитель / */
.separator {
    opacity: 0.4;
    font-size: 30px;
    font-weight: 100;
}

/* Огромная бесконечность */
.infinity-symbol {
    font-size: 60px; /* Размер бесконечности */
    line-height: 1;
    color: #ffffff;
    /* Для красивой формы символа */
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.7),
        0 0 20px rgba(0, 255, 255, 0.4);
    animation: infinity-glow 3s infinite alternate;
}





/* ===== Таблица рекордов ===== */


/* ===============================
   LEADERBOARD BUTTON (iOS Glass)
================================ */

#leaderboard-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 500;
    cursor: pointer;

    padding: 12px 22px;
    border-radius: 999px;

    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    font-weight: 600;
    font-size: 14px;

    color: #ffffff;

    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.25);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);

    transition: all 0.25s ease;
}


/* Hover эффект */
#leaderboard-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}


/* Нажатие */
#leaderboard-btn:active {
    transform: scale(0.96);
}


/* ===============================
   GAME OVER CONTAINER (iOS Glass)
================================ */

#game-over {
    display: none;

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 380px;
    padding: 45px 35px;

    border-radius: 34px;

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);

    border: 1px solid rgba(255, 255, 255, 0.2);

    color: white;
    text-align: center;

    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;

    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.7),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);

    z-index: 1000;

    animation: iosGameOverPop 0.4s ease;
}


/* Заголовок GAME OVER */
#game-over h2 {
    margin-top: 0;
    margin-bottom: 15px;

    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}


/* Текст очков */
#game-over p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 30px;
}


/* ===============================
   RESTART BUTTON (Premium iOS)
================================ */

#restart-btn {
    padding: 14px 35px;

    border-radius: 18px;
    border: none;
    cursor: pointer;

    font-size: 16px;
    font-weight: 600;

    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    color: black;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    transition: 0.25s ease;
}

#restart-btn:hover {
    transform: translateY(-3px);
}

#restart-btn:active {
    transform: scale(0.95);
}


/* ===============================
   APPEAR ANIMATION
================================ */

@keyframes iosGameOverPop {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}


/* ===============================
   LEADERBOARD CONTAINER (iOS Glass)
================================ */
/* Описываем саму анимацию */
@keyframes slideDown {
    from {
        top: -100%; /* Начинаем за экраном сверху */
        opacity: 0;
    }
    to {
        top: 3%; /* Приплываем в центр */
        opacity: 1;
    }
}
#leaderboard-ui {
    display: none;

    position: absolute;
   
    left: 23%;
    transform: translateX(-50%);

    
    width: 300px;
    padding: 40px;

    border-radius: 48px;

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);

    border: 1px solid rgba(255, 255, 255, 0.2);

    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);

    z-index: 1001;

 animation: slideDown 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    
}


/* ===============================
   TITLE
================================ */

#leaderboard-ui h3 {
    margin-top: 0;
    margin-bottom: 20px;

    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}


/* ===============================
   SCORE LIST
================================ */

#leaderboard-ui ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

#leaderboard-ui li {
    padding: 8px 12px;
    margin-bottom: 8px;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.08);

    font-size: 14px;
    font-weight: 500;

    display: flex;
    justify-content:space-evenly;

    transition: 0.25s ease;
}

#leaderboard-ui li:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(3px);
}


/* ===============================
   BUTTON (iOS style)
================================ */

#leaderboard-ui button {
    padding: 12px 25px;

    border-radius: 16px;
    border: none;
    cursor: pointer;

    font-size: 14px;
    font-weight: 600;

    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    color: black;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);

    transition: 0.25s ease;
}

#leaderboard-ui button:hover {
    transform: translateY(-2px);
}

#leaderboard-ui button:active {
    transform: scale(0.96);
}


/* ===============================
   SMOOTH APPEAR ANIMATION
================================ */

@keyframes iosFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid white;
    color: white;
    padding: 5px 15px;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    transition: 0.3s;
}

.tab-btn.active {
    background: white;
    color: black;
    box-shadow: 0 0 10px white;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}



/* ===============================
   AUTH CONTAINER (iOS Glass Card)
================================ */
@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%) translateX(0); }
    20%, 60% { transform: translate(-50%, -50%) translateX(-10px); }
    40%, 80% { transform: translate(-50%, -50%) translateX(10px); }
}

/* ===============================
   DYNAMO AUTH INTERFACE (Futuristic)
================================ */

#auth-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 400px;
    padding: 50px 40px;
    border-radius: 40px;

    /* ДОБАВЛЯЕМ КАРТИНКУ */
    background-image: url('models/pictures/hmmm.png'); 
    background-size: cover;       /* Растягиваем на всю площадь */
    background-position: center;  /* Центрируем рисунок */
    
    /* Добавляем внутреннее затемнение, чтобы текст не сливался с картинкой */
    box-shadow: 
        inset 0 0 0 2000px rgba(0, 0, 0, 0.5), /* Слой поверх картинки */
        0 25px 50px rgba(0, 0, 0, 0.6);

    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    z-index: 1000;
    
    overflow: hidden; /* Чтобы картинка не вылезала за скругленные углы */
}

#auth-title {
    font-size: 32px;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 30px;
    background: linear-gradient(to bottom, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

/* ===============================
   INPUTS (Cyberpunk Glass)
================================ */

#auth-container input {
    width: 100%;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-sizing: border-box;
    border-radius: 15px;
    
    /* Делаем их темнее и плотнее */
    background: rgba(0, 0, 0, 0.7); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    color: white;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}

#auth-container input:focus {
    background: rgba(0, 0, 0, 0.9);
    border-color: #fff;
}
/* ===============================
   MAIN BUTTON (High Energy)
================================ */

#main-auth-btn {
    width: 100%;
    padding: 20px;
    margin-top: 10px;

    border-radius: 15px;
    border: none;
    cursor: pointer;

    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;

    /* Белый глянец */
    background: #ffffff;
    color: #000;
    
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

#main-auth-btn:hover {
    background: #000;
    color: #fff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    border: 1px solid white;
}

#toggle-auth {
    margin-top: 25px;
    opacity: 0.6;
    font-weight: 400;
    transition: 0.3s;
}

#toggle-auth:hover {
    opacity: 1;
    text-shadow: 0 0 10px white;
}
/* ===============================
   SMOOTH APPEAR ANIMATION
================================ */

@keyframes iosPop {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}






/* ===============================
   iOS STYLE UI BUTTON
================================ */

.ui-button-info {
    position: absolute;
    top: 20px;
    right: 110px;
    z-index: 500;
    cursor: pointer;

    padding: 12px 22px;
    border-radius: 999px;

    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    font-weight: 600;
    font-size: 15px;

    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.25);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);

    transition: all 0.25s ease;
}

.ui-button-info:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.ui-button-info:active {
    transform: scale(0.97);
}



/* ===============================
   MODAL CONTAINER (Glass iOS)
================================ */

.modal-container {
    display: none;

    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 640px;
    padding: 35px;

    border-radius: 30px;

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);

    border: 1px solid rgba(255, 255, 255, 0.2);

    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    text-align: center;

    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);

    z-index: 10002;
}
/* ===============================
   TITLE
================================ */

.modal-title {
    margin-top: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
/* ===============================
   INFO LIST
================================ */

.info-list {
    text-align: left;
    line-height: 1.9;
    padding-left: 20px;
    font-size: 15px;
    opacity: 0.9;
}
/* ===============================
   LANGUAGE SWITCHER
================================ */

.lang-switcher {
    margin-bottom: 25px;
}

.lang-btn {
    padding: 8px 18px;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);

    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;

    font-weight: 500;
    cursor: pointer;
    transition: 0.25s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lang-btn.active {
    background: white;
    color: black;
    font-weight: 600;
}
/* ===============================
   CLOSE BUTTON (iOS style)
================================ */

.close-modal-btn {
    margin-top: 30px;

    padding: 14px 40px;
    border-radius: 16px;

    border: none;
    cursor: pointer;

    font-size: 16px;
    font-weight: 600;

    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    color: #000;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);

    transition: all 0.25s ease;
}

.close-modal-btn:hover {
    transform: translateY(-3px);
}

.close-modal-btn:active {
    transform: scale(0.96);
}

/* ===============================
   HIDDEN TEXT
================================ */

.hidden-text {
    display: none;
}

#sound-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sound-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Кнопка в углу */
#pro-btn {
    position: fixed;
    top: 23px;
    right: 200px;
    z-index: 101;
    padding: 10px 22px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica;
    font-weight: 600;
    border-radius: 20px;
      color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.25);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);

   
    cursor: pointer;
 
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

#pro-btn:active { transform: scale(0.92); }

.pro-badge {
    background: white;
    color: #000000;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
}

/* Оверлей */
.ios-overlay {
    display: none; /* Переключается скриптом */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10002;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

/* Карточка Apple Style */
.ios-card {
    background: rgba(30, 30, 30, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    width: 90%;
    max-width: 340px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 30px 24px;
    color: white;
    font-family: -apple-system, sans-serif;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    text-align: center;
    animation: iosPop 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes iosPop {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ios-icon-box { font-size: 50px; margin-bottom: 15px; }
.ios-card h1 { font-size: 24px; margin-bottom: 25px; font-weight: 700; }
.ios-subtitle { color: #7b7b7b; font-size: 14px; margin-bottom: 25px; font-weight: 500; }

.ios-features { text-align: left; margin-bottom: 30px; }
.feature-item { 
    display: flex; align-items: center; gap: 10px; 
    margin-bottom: 12px; font-size: 15px; color: #ddd;
}
.dot { width: 6px; height: 6px; background: #7b7b7b; border-radius: 50%; }

/* Кнопки Apple */
.ios-main-btn {
    width: 100%;
    background: #7b7b7b;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: opacity 0.2s;
}


.ios-main-btn:active { opacity: 0.7; }

.ios-secondary-btn {
    background: transparent;
    border: none;
    color: #999;
    font-size: 15px;
    cursor: pointer;
    padding: 8px;
}

.pro-tag {
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    color: rgb(255, 255, 255);
    font-size: 9px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.admin-tag {
    background: linear-gradient(45deg, #ff0000, #990000); /* Агрессивный красный */
    color: white;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 16px;
    margin-left: 8px;
    text-transform: uppercase;
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    letter-spacing: 1px;
}


