/* ════════════════════════════════════════════════
   DEVICE SCENE  —  iMac + iPhone + OBD Tracker
   ════════════════════════════════════════════════ */

/* ── Сцена-обёртка ── */
.device-scene {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 8px 20px 50px;
    max-width: 1280px;
    margin: 0 auto;
}

/* ── Свечение под устройствами ── */
.device-glow {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    height: 80px;
    background: radial-gradient(ellipse at center,
        rgba(99, 179, 237, 0.14) 0%,
        rgba(99, 102, 241, 0.09) 50%,
        transparent 80%);
    filter: blur(24px);
    pointer-events: none;
    z-index: 0;
}

/* ── Подписи под устройствами ── */
.device-label {
    text-align: center;
    font-size: 10px;
    color: rgba(160, 174, 192, 0.45);
    margin-top: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}


/* ════════════════════════════════
   iMAC — с лёгким наклоном
   ════════════════════════════════ */
.imac-wrap {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    filter: drop-shadow(0 50px 80px rgba(0, 0, 0, 0.75));
    /* Лёгкий 3D-наклон для реализма */
    transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
    transform-origin: bottom center;
}

.imac-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.imac-screen-bezel {
    width: 860px;
    background: linear-gradient(175deg, #e8e8e8 0%, #d2d2d2 40%, #c8c8c8 100%);
    border-radius: 18px 18px 0 0;
    padding: 7px 7px 0;
    border: 1.5px solid #b8b8b8;
    border-bottom: none;
    position: relative;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.8),
        inset 0 -1px 0 rgba(0,0,0,0.1);
}

.imac-screen-bezel::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 14px;
    background: linear-gradient(180deg, #1a1a1a 0%, #111 100%);
    border-radius: 0;
}

.imac-camera-row {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 6px;
    margin-bottom: 6px;
}

.imac-camera {
    width: 4px;
    height: 4px;
    background: #2a2a2a;
    border-radius: 50%;
    box-shadow:
        0 0 0 2px #3a3a3a,
        0 0 6px rgba(0,0,0,0.6),
        inset 0 0 3px rgba(99,179,237,0.3);
}

.imac-screen {
    background: #080810;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9.5;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    border: 1px solid #111;
}

.imac-stand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.imac-neck {
    width: 140px;
    height: 60px;
    background: linear-gradient(180deg,
        #c0c0c0 0%,
        #b0b0b0 30%,
        #c8c8c8 60%,
        #b8b8b8 100%);
    clip-path: polygon(30% 0%, 70% 0%, 80% 100%, 20% 100%);
}

.imac-foot {
    width: 340px;
    height: 12px;
    background: linear-gradient(180deg,
        #c8c8c8 0%,
        #b8b8b8 40%,
        #d0d0d0 100%);
    border-radius: 0 0 14px 14px;
    border: 1.5px solid #aaa;
    border-top: none;
    box-shadow:
        0 6px 18px rgba(0,0,0,0.45),
        inset 0 2px 0 rgba(255,255,255,0.4);
}


/* ── Браузерная строка ── */
.mac-browser-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 5px;
    background: #111118;
    border-bottom: 1px solid #1e1e35;
    flex-shrink: 0;
}

.mac-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.mac-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: block;
}

.mac-url {
    flex: 1;
    background: #1a1a2e;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 3px;
    color: #6a6aaa;
    font-family: 'SF Mono', 'Fira Code', monospace;
    text-align: center;
    border: 1px solid #252545;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mac-slide-counter {
    font-size: 10px;
    color: #4a4a7a;
    font-family: monospace;
    flex-shrink: 0;
}


/* ── Слайдер ── */
.dp-slider {
    position: relative;
    flex: 1;
    overflow: hidden;
    background: #06060e;
}

.dp-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.dp-slide.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

.dp-screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* LIVE-бейдж */
.dp-overlay-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(8, 8, 18, 0.88);
    border: 1px solid rgba(99, 179, 237, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 700;
    color: #63b3ed;
    letter-spacing: 0.06em;
    z-index: 10;
    text-transform: uppercase;
}

.dp-live-dot {
    width: 8px;
    height: 8px;
    background: #48bb78;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(72,187,120,0.6);
    animation: livePulse 1.6s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 6px rgba(72,187,120,0.6); }
    50%       { opacity: 0.6; transform: scale(1.4); box-shadow: 0 0 14px rgba(72,187,120,0.3); }
}

/* Стрелки */
.dp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(8, 8, 22, 0.78);
    border: 1px solid rgba(99, 179, 237, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8899bb;
    transition: all 0.2s ease;
}

.dp-arrow:hover {
    background: rgba(99, 179, 237, 0.14);
    color: #fff;
    border-color: rgba(99, 179, 237, 0.5);
    transform: translateY(-50%) scale(1.08);
}

.dp-arrow svg { width: 16px; height: 16px; }
.dp-arrow-prev { left: 10px; }
.dp-arrow-next { right: 10px; }

/* Прогресс-бар */
.dp-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: rgba(255,255,255,0.06);
    z-index: 10;
}

.dp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #63b3ed, #6366f1);
    transition: width 0.1s linear;
    width: 0%;
}

/* Точки навигации */
.dp-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 2px 0;
    background: #0c0c18;
    flex-shrink: 0;
}

.dp-dot-nav {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.18);
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.dp-dot-nav.active {
    background: #63b3ed;
    transform: scale(1.4);
    box-shadow: 0 0 6px rgba(99,179,237,0.5);
}


/* ════════════════════════════════
   iPhone — серебристый
   ════════════════════════════════ */
.iphone-wrap {
    position: absolute;
    left: calc(50% - 540px);
    bottom: 100px;
    z-index: 5;
    transform: perspective(900px) rotateY(12deg) rotateX(2deg);
    transform-origin: bottom center;
    filter: drop-shadow(0 24px 36px rgba(0,0,0,0.65));
}

.iphone-frame {
    width: 148px;
    background: linear-gradient(155deg,
        #e2e2e2 0%,
        #c8c8c8 35%,
        #d8d8d8 70%,
        #c0c0c0 100%);
    border-radius: 38px;
    padding: 8px 4px 8px;
    border: 1.5px solid #b0b0b0;
    position: relative;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.8),
        inset 0 -1px 0 rgba(0,0,0,0.1),
        0 0 0 1px rgba(0,0,0,0.08);
}

.iphone-island {
    width: 50px;
    height: 5px;
    background: #0a0a10;
    border-radius: 10px;
    margin: 0 auto 8px;
}

.iphone-screen {
    width: 100%;
    aspect-ratio: 9 / 19.5;
    background: #080810;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid #111;
}

.iphone-home-bar {
    width: 44px;
    height: 4px;
    background: rgba(0,0,0,0.25);
    border-radius: 2px;
    margin: 8px auto 0;
}

.iphone-btn-vol-up,
.iphone-btn-vol-dn,
.iphone-btn-power {
    position: absolute;
    background: linear-gradient(90deg, #b8b8b8, #c8c8c8);
    border-radius: 2px;
}

.iphone-btn-vol-up  { left: -3px; top: 72px;  width: 3px; height: 28px; }
.iphone-btn-vol-dn  { left: -3px; top: 108px; width: 3px; height: 28px; }
.iphone-btn-power   { right: -3px; top: 88px; width: 3px; height: 40px; }

.iphone-slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.iphone-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}

.iphone-slide.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

.iphone-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ════════════════════════════════
   OBD GPS Tracker
   ════════════════════════════════ */
.tracker-wrap {
    position: absolute;
    left: calc(50% - 460px);
    bottom: 82px;
    z-index: 6;
    transform: perspective(500px) rotateY(18deg) rotateX(-6deg);
    transform-origin: bottom right;
    filter: drop-shadow(0 16px 28px rgba(0,0,0,0.75));
}

.tracker-body {
    width: 88px;
    height: 108px;
    background: linear-gradient(150deg,
        #28283a 0%,
        #161620 55%,
        #20202e 100%);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 0 24px rgba(99, 179, 237, 0.07);
}

.tracker-top-strip {
    position: absolute;
    top: 0; left: 12px; right: 12px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(99,179,237,0.4), transparent);
    border-radius: 0 0 4px 4px;
}

.tracker-led {
    width: 9px;
    height: 9px;
    background: #48bb78;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(72,187,120,0.8), 0 0 20px rgba(72,187,120,0.3);
    animation: livePulse 2s ease-in-out infinite;
    margin-top: 4px;
}

.tracker-logo {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: rgba(99, 179, 237, 0.65);
    font-family: 'SF Mono', monospace;
}

.tracker-obd-port {
    position: absolute;
    bottom: 12px;
    width: 48px;
    height: 16px;
    background: #0a0a12;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tracker-pin {
    width: 2px;
    height: 8px;
    background: rgba(99,179,237,0.5);
    border-radius: 1px;
}


/* ════════════════════════════════
   RESPONSIVE — TABLET 768–1100px
   ════════════════════════════════ */
@media (max-width: 1100px) {
    .imac-screen-bezel { width: 620px; }
    .imac-foot { width: 260px; }

    .iphone-wrap {
        left: calc(50% - 390px);
        bottom: 90px;
    }

    .tracker-wrap {
        left: calc(50% - 330px);
        bottom: 72px;
    }

    .iphone-frame { width: 118px; }
    .tracker-body { width: 74px; height: 92px; }
}


/* ════════════════════════════════
   MOBILE  ≤ 767px
   — единая компактная композиция
   ════════════════════════════════ */
@media (max-width: 767px) {

    /* Сцена — относительная, overflow скрыт для чистоты */
    .device-scene {
        position: relative;
        display: block;           /* убираем flex-столбик */
        padding: 16px 0 40px;
        overflow: visible;
        min-height: 360px;
    }

    /* ── iMac: занимает всю ширину, по центру ── */
    .imac-wrap {
        display: block;
        width: 90%;
        max-width: 420px;
        margin: 0 auto;
        transform: none;          /* на мобиле без наклона — читаемость */
        filter: drop-shadow(0 20px 32px rgba(0,0,0,0.65));
    }

    .imac-screen-bezel {
        width: 100%;
    }

    .imac-neck {
        width: 70px;
        height: 44px;
    }

    .imac-foot {
        width: 55%;
        height: 10px;
    }

    /* ── iPhone: абсолютно, нижний левый угол iMac ── */
    .iphone-wrap {
        position: absolute;
        /* центрируем iMac (ширина ~90vw, max 420px) */
        left: max(4px, calc(50% - 210px - 30px));
        bottom: 34px;
        z-index: 8;
        transform: perspective(600px) rotateY(8deg) rotateX(1deg) scale(0.82);
        transform-origin: bottom left;
        filter: drop-shadow(0 12px 20px rgba(0,0,0,0.7));
    }

    .iphone-frame {
        width: 100px;
    }

    /* ── OBD Tracker: перед iPhone, ещё ниже ── */
    .tracker-wrap {
        position: absolute;
        left: max(4px, calc(50% - 210px - 10px));
        bottom: 22px;
        z-index: 9;
        transform: perspective(400px) rotateY(14deg) rotateX(-4deg) scale(0.75);
        transform-origin: bottom left;
        filter: drop-shadow(0 8px 16px rgba(0,0,0,0.8));
    }

    .tracker-body {
        width: 62px;
        height: 76px;
    }

    /* Подписи — убираем в одну строку под сценой */
    .iphone-wrap .device-label,
    .tracker-wrap .device-label {
        display: none;     /* на мобиле не помещаются — убираем */
    }

    /* Одна общая подпись снизу */
    .device-scene::after {
        content: 'Desktop · Mobile · OBD GPS Tracker';
        display: block;
        text-align: center;
        font-size: 9px;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: rgba(160, 174, 192, 0.35);
        margin-top: 8px;
        padding-top: 4px;
    }

    .device-glow { display: none; }

    /* Стрелки слайдера чуть меньше на мобиле */
    .dp-arrow {
        width: 28px;
        height: 28px;
    }

    .dp-arrow svg {
        width: 13px;
        height: 13px;
    }
}

/* ════════════════════════════════
   Очень маленькие экраны ≤ 380px
   ════════════════════════════════ */
@media (max-width: 380px) {

    .imac-wrap {
        width: 95%;
        max-width: 300px;
    }

    .iphone-wrap {
        left: max(2px, calc(50% - 150px - 20px));
        transform: perspective(500px) rotateY(6deg) scale(0.72);
    }

    .iphone-frame { width: 82px; }

    .tracker-wrap {
        left: max(2px, calc(50% - 150px - 4px));
        transform: perspective(300px) rotateY(10deg) scale(0.65);
    }

    .tracker-body { width: 52px; height: 64px; }
}