/* GameCore — общие стили. Цвета меняются переменными в :root в index.html конкретной игры. */
:root {
    --bg: radial-gradient(circle at center, #1b1e36 0%, #090a14 100%);
    --panel: rgba(255, 255, 255, 0.07);
    --panel-border: rgba(255, 255, 255, 0.14);
    --text: #ffffff;
    --muted: #9ba3c7;
    --accent: #ffd166;
    --accent2: #ff7b54;
    --btn: linear-gradient(135deg, #2b3566 0%, #1c2247 100%);
    --btn-border: rgba(130, 160, 255, 0.35);
    --primary: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    --danger: linear-gradient(135deg, #ff5e62 0%, #ff9966 100%);
    --card: linear-gradient(160deg, #1f2647 0%, #12162b 100%);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    touch-action: none;
}
button { font: inherit; color: inherit; }

/* ---------- Экраны ---------- */
.screen {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    max-width: 520px;
    margin: 0 auto;
    padding: 8px 10px;
}
.screen.active { display: flex; }

/* ---------- Кнопки ---------- */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: 1px solid var(--btn-border);
    background: var(--btn);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform 0.12s, filter 0.2s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.96); }
.btn.primary { background: var(--primary); border-color: transparent; box-shadow: 0 4px 16px rgba(0, 176, 155, 0.35); }
.btn.ghost { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); color: #d0d7f2; }
.btn .sub { font-size: 12px; font-weight: 700; color: var(--accent); }
.icon-btn {
    flex: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform 0.12s;
}
.icon-btn:active { transform: scale(0.92); }

/* ---------- Панели ---------- */
.panel {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    backdrop-filter: blur(8px);
}
.label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
}
.value { font-size: 20px; font-weight: 800; }

/* ---------- Модальные окна ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 18, 0.85);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}
.modal-overlay.show { display: flex; }
.modal-card {
    background: var(--card);
    border: 1px solid var(--btn-border);
    border-radius: 20px;
    padding: 22px 18px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.modal-title {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.modal-desc { font-size: 14px; color: #b5bedc; line-height: 1.4; }

/* ---------- Подсказка ---------- */
#toast {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 94, 98, 0.95);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    max-width: calc(100% - 32px);
    text-align: center;
}
#toast.visible { opacity: 1; }

/* ---------- Звёзды ---------- */
.stars { display: flex; gap: 2px; justify-content: center; }
.stars i { font-style: normal; color: rgba(255, 255, 255, 0.18); }
.stars i.on { color: var(--accent); text-shadow: 0 0 8px rgba(255, 200, 80, 0.6); }
