/* pilot.css — Pilot 2026 ver.2.02 */

/* --- Базовые настройки --- */
body {
    margin: 0;
    padding: 0;
    background-color: #111;
    color: white;
    font-family: Arial, sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    touch-action: none;
}

header {
    width: 100%;
    text-align: center;
    padding: 8px 0;
    box-sizing: border-box;
}

.game-title {
    margin: 0 0 4px 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

#game-header {
    margin: 0 0 2px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #88ccff;
}

.game-version {
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    color: #888;
    line-height: 1.2;
}

#stats-bar {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 16px;
}

/* --- Игровое поле - адаптивный квадрат --- */
#game-container {
    position: relative;
    width: 100%;
    max-width: min(400px, 90vmin);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    background-color: #000;
    box-sizing: border-box;
    overflow: hidden;
    touch-action: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    box-shadow: 0 0 0 3px #333;
}

/* Объекты - размер в долях поля (12.5% = 50px при поле 400px) */
.game-object, .enemy-object {
    position: absolute;
    width: 12.5%;
    height: 12.5%;
    top: 0;
    left: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
    cursor: grab;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Состояния пилота (квадрата) --- */
.pilot-idle {
    background: #1a3a1a;
    border: 2px solid #2a4a2a;
}
.pilot-playing {
    background: #4caf50;
    border: 2px solid #388e3c;
}
.pilot-gameover {
    background: #333;
    border: 2px solid #4caf50;
}

/* --- Враги и метки на них --- */
.enemy-object {
    background: red;
    border: 1px solid #500;
}

.enemy-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.35);
    padding: 2px 6px;
    border-radius: 4px;
    display: block;
}

footer {
    padding: 6px 0;
}

/* --- Общие кнопки --- */
.control-btn {
    padding: 10px 18px;
    font-size: 0.95rem;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 8px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.control-btn:active {
    transform: scale(0.98);
}

.control-btn:hover {
    background: #555;
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.btn-info {
    background: #2980b9;
    color: white;
}
.btn-info:hover {
    background: #3498db;
}

.btn-start {
    background: #2e7d32;
    color: white;
}
.btn-start:hover {
    background: #388e3c;
}

.btn-demo {
    background: #6a1b9a;
    color: white;
}
.btn-demo:hover {
    background: #8e24aa;
}

.danger {
    background: #a00;
}
.danger:hover {
    background: #c00;
}

/* --- Диалоги --- */
dialog {
    background: #222;
    color: white;
    border: 2px solid #fff;
    padding: 20px;
    border-radius: 8px;
    min-width: 240px;
    margin: 5vh auto auto auto;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.9);
}

.list-view {
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.5;
    border-top: 1px solid #444;
    padding-top: 10px;
}

/* --- Ссылки в инфо-окне --- */
.info-links {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
}

.breadcrumbs a {
    color: #88ccff;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: #666;
}

.info-links > a {
    color: #88ccff;
    text-decoration: none;
    font-size: 0.9rem;
}

.info-links > a:hover {
    text-decoration: underline;
}

/* --- Доска почёта --- */

.honor_desk1 {
    position: relative;
    width: 320px;
    max-width: 90vw;
    min-height: 220px;
    background-color: #FFDDDD;
    border: 5px ridge #FF7777;
    box-shadow: 6px 6px 10px rgba(0, 0, 0, 0.5);
    padding: 12px;
    box-sizing: border-box;
    margin: 0 auto;
    overflow: hidden;
}

.honor_desk_title {
    text-align: center;
    margin: 4px 4px 10px 4px;
    color: #444;
    font-size: 1.1rem;
}

#honor_desk_pilot_name1_wrapper {
    margin: 8px 5px;
    text-align: center;
    color: #333;
    font-size: 0.9rem;
}

#honor_desk_pilot_name1_val {
    font-size: 26px;
    font-weight: bold;
    padding: 4px;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#honor_desk_gametime1_wrapper {
    margin: 8px 5px;
    text-align: center;
    color: #333;
    font-size: 0.85rem;
}

#honor_desk_gametime1_val {
    font-size: 22px;
    font-weight: bold;
    background-color: #FFFFDD;
    padding: 5px 12px;
    border: 1px solid #d8d8d8;
    border-radius: 50%;
}

#honor_desk_timepassed1_val {
    font-size: 14px;
    background-color: #FFFFDD;
    padding: 2px 6px;
}

#honor_desk_modirec1_wrapper {
    margin: 8px 5px;
    text-align: center;
    color: #333;
    font-size: 0.85rem;
}

#honor_desk_modirec1_val {
    font-size: 14px;
    background-color: #FFFFDD;
    padding: 2px 6px;
}

/* Шурупы по углам */
.shurup {
    position: absolute;
    z-index: 2;
}

#shurup1 { top: 2px; left: 2px; }
#shurup2 { top: 2px; right: 2px; }
#shurup3 { bottom: 2px; left: 2px; }
#shurup4 { bottom: 2px; right: 2px; }

/* Самолёты */
.plane_general {
    position: absolute;
    z-index: 1;
}

#plane_left { bottom: 0; left: 0; }
#plane_right { bottom: 0; right: 0; }
