/* style.css — 100% совместимо с iPad 1 (iOS 5.1.1) */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

body, html {
    height: 100%;
    background: #0e0e10;
    color: #efeff1;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.5;
}

#app {
    height: 100%;
    display: block;
    background: #0e0e10;
    position: relative;
}

.floor-switcher {
    position: absolute;
    top: 8px;
    left: 50%;
    margin-left: -260px;
    width: 640px;
    height: 56px;
    background: #18181b;
    padding: 6px 8px;
    border-radius: 25px;
    text-align: center;
    z-index: 1000;
    border: 1px solid #333;
    white-space: nowrap;
    overflow: hidden;
}

.floor-btn {
    display: inline-block;
    width: 47%;
    padding: 10px 0;
    background: transparent;
    border: none;
    color: #efeff1;
    font-weight: bold;
    font-size: 14px;
    border-radius: 28px;
    cursor: pointer;
    margin: 0 1%;
}

.floor-btn.active {
    background: #9146ff;
    color: white;
}

.main-content {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 60px;
    overflow: hidden;
}

.halls-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #0e0e10;
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #18181b;
    overflow: hidden;
}

.map-fullscreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0e0e10;
}

.map-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
}

.computer {
    position: absolute;
    width: 90px;
    height: 90px;
    background: #222 !important;
    border: 4px solid #666;
    border-radius: 20px;
    text-align: center;
    z-index: 10;
    cursor: pointer;
}

.computer.free    { border-color: #00b16a; }
.computer.busy    { border-color: #ff6b6b; }
.computer.broken  { border-color: #f1c40f; }
.computer.booked  { border-color: #ff69b4; }

.computer.broken,
.computer.booked {
    background: #222 !important;
}
.status-indicator.booked {
    background: #ff69b4;
}

.status-indicator.broken {
    background: #f1c40f;
}

.computer-number {
    font-size: 28px;
    font-weight: bold;
    color: white;
    margin-top: 12px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.computer-status {
    font-size: 11px;
    color: #ccc;
    margin-top: 4px;
}

.zone-icon {
    position: absolute;
    top: -12px;
    left: 45%;
    margin-left: -25px;
    width: 60px;
    padding: 2px 0;
    font-size: 9px;
    font-weight: bold;
    color: white;
    text-align: center;
    border-radius: 15px;
    z-index: 100;
}

.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #18181b;
    border-top: 1px solid #333;
    text-align: center;
    padding-top: 8px;
    z-index: 100;
}

.status-legend { display: inline-block; }
.status-item { display: inline-block; margin: 0 10px; font-size: 13px; }
.status-indicator { display: inline-block; width: 16px; height: 16px; border-radius: 6px; vertical-align: middle; margin-right: 6px; }
.status-indicator.free { background: #00b16a; }
.status-indicator.busy { background: #ff6b6b; }

@media (orientation: portrait) {
    .floor-switcher { width: 260px; margin-left: -130px; }
    .floor-btn { font-size: 13px; padding: 8px 0; }
    .computer { width: 70px; height: 70px; }
    .computer-number { font-size: 24px; }
    .computer-status { font-size: 11px; }
}

@media (orientation: landscape) {
    .floor-switcher { top: 5px; }
    .main-content { top: 55px; }
}
/* === МОДАЛЬНОЕ ОКНО (СТИЛЬ MURINO) === */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85); /* Fallback для старых iOS */
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    -webkit-transition: opacity 0.3s;
    transition: opacity 0.3s;
    
    /* Центрирование для старых браузеров */
    display: -webkit-box;
    display: -moz-box;
    display: box;
    -webkit-box-orient: vertical;
    -webkit-box-pack: center;
    -webkit-box-align: center;
    
    /* Центрирование современное */
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #18181b;
    border: 2px solid #333;
    border-radius: 20px;
    padding: 30px;
    width: 300px;
    text-align: center;
    position: relative;
    -webkit-box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    
    /* Анимация появления */
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
    -webkit-transition: -webkit-transform 0.3s;
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    -webkit-transform: scale(1);
    transform: scale(1);
}

.modal-pc-number {
    font-size: 48px;
    font-weight: 900;
    color: #9146ff;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(145, 70, 255, 0.5);
}

.modal-username {
    font-size: 24px;
    font-weight: bold;
    color: #efeff1;
    margin: 15px 0;
}

.modal-time {
    font-size: 32px;
    font-weight: bold;
    color: #00ff9d;
    margin: 20px 0;
    text-shadow: 0 0 15px rgba(0, 255, 157, 0.5);
}

.modal-close-hint {
    font-size: 12px;
    color: #666;
    margin-top: 20px;
}

/* === АНИМАЦИИ ДЛЯ PS5 (GLOW) === */
@-webkit-keyframes glow-ps5 {
    from { border-color: #0070d1; box-shadow: 0 0 10px rgba(0, 112, 209, 0.3); }
    to { border-color: #00d4ff; box-shadow: 0 0 25px rgba(0, 212, 255, 0.8); }
}

.computer.ps5.busy {
    -webkit-animation: glow-ps5 2s infinite alternate;
    animation: glow-ps5 2s infinite alternate;
}

/* === СТИЛИ ДЛЯ VIP/BOOTCAMP В МОДАЛКЕ === */
.modal-content.ps5 { border-color: #00d4ff; }
.modal-content.ps5 .modal-pc-number { color: #00d4ff; }
/* === ЗОНЫ НА КАРТЕ === */
.zone-area {
    position: absolute;
    border: 2px dashed rgba(255, 255, 255, 0.2); /* Полупрозрачная рамка */
    border-radius: 20px;
    z-index: 5; /* Выше фона (1), но ниже компьютеров (10) */
    pointer-events: none; /* ВАЖНО: позволяет кликать сквозь рамку */
}

.zone-label {
    position: absolute;
    top: -30px; /* Текст над рамкой */
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.zone-admin {
    /* Легкая белая рамка и едва заметный фон */
    background: rgba(255, 255, 255, 0.03) !important;
    border: 2px solid #e0e0e0 !important; /* Чуть сероватый белый */
    
    /* Белое свечение */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
    -webkit-box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.zone-admin .zone-label {
    background: transparent !important; 
    border: none !important;
    box-shadow: none !important;
    
    /* Белый текст */
    color: #ffffff !important;
    font-size: 16px; 
    font-weight: 900;
    letter-spacing: 1.5px;
    text-align: center;
    width: 100%;
    left: 0;
    top: -25px;
    
    /* Белое свечение текста (Halo) */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
}

@-webkit-keyframes text-flicker {
    0% { opacity: 0.8; text-shadow: 0 0 10px rgba(0, 212, 255, 0.8); }
    100% { opacity: 1; text-shadow: 0 0 20px rgba(0, 212, 255, 1); }
}

/* Цвета для разных зон */
.zone-vip {
    border-color: #9146ff;
    background: rgba(145, 70, 255, 0.05); /* Едва заметный фон */
}
.zone-vip .zone-label { color: #9146ff; }

.zone-bootcamp {
    border-color: #f1c40f;
    background: rgba(241, 196, 15, 0.05);
}
.zone-bootcamp .zone-label { color: #f1c40f; }

.zone-duo {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
}
.zone-duo .zone-label { color: #ff6b6b; }

.zone-ps5 {
    border-color: #0070d1;
    background: rgba(0, 112, 209, 0.1);
}
.zone-ps5 .zone-label { color: #0070d1; }

.zone-standard {
    border-color: rgba(255, 255, 255, 0.3);
}
.zone-standard .zone-label { color: #ccc; }
/* Стили для зоны лестницы */
.stairs-zone {
    border: 2px solid rgba(255, 255, 255, 0.3); /* Легкая рамка */
    background: transparent;
    overflow: hidden; /* Чтобы полоски не вылезали */
    display: flex;
    flex-direction: column;
    justify-content: space-evenly; /* Равномерное распределение */
    align-items: center;
}

/* Скрываем текст "UP", если он мешает, или стилизуем его */
.stairs-zone .zone-label {
    position: absolute;
    z-index: 2;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 5px #000;
}

/* Сами ступеньки (генерируются через HTML или просто полоски) */
.stairs-graphics {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px 0;
}

.stairs-graphics span {
    display: block;
    width: 100%;
    height: 2px; /* Толщина линии ступеньки */
    background: rgba(255, 255, 255, 0.4); /* Цвет ступенек */
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}
.zone-stairs, .zone-stairs-dense {
    /* Тонкая аккуратная рамка */
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    
    /* Скругление */
    border-radius: 6px;

    /* Эффект углубления (внутренняя тень) + легкое внешнее свечение */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), 0 0 5px rgba(255, 255, 255, 0.1) !important;
    
    /* Темный полупрозрачный фон под ступеньками */
    background-color: rgba(255, 255, 255, 0.05) !important;
    
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === ЛЕСТНИЦА 1 ЭТАЖ (Обычная) === */
.zone-stairs {
    /* Рисуем ступеньки градиентом */
    /* Мы добавляем ДВА фона: один для затемнения краев (глубина), второй для полосок */
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.6) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.6) 100%),
        repeating-linear-gradient(
            to right,
            transparent 0%,
            transparent 12%,        /* Расстояние между ступеньками */
            rgba(255, 255, 255, 0.6) 12%, /* Цвет полоски (не ярко-белый) */
            rgba(255, 255, 255, 0.6) 15%  /* Толщина полоски */
        ) !important;
}

/* === ЛЕСТНИЦА -1 ЭТАЖ (Плотная) === */
.zone-stairs-dense {
    /* Тот же эффект глубины + более частые полоски */
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.6) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.6) 100%),
        repeating-linear-gradient(
            to right,
            transparent 0%,
            transparent 5%,         /* <-- Шаг намного меньше (частые ступеньки) */
            rgba(255, 255, 255, 0.5) 5%,  /* Ступеньки чуть прозрачнее, чтобы не рябило */
            rgba(255, 255, 255, 0.5) 7%   /* Толщина линии */
        ) !important;
}