@media (max-width: 768px) {
    .bg-slide {
        background-size: auto 100%;
        background-position: center center;
        background-color: #0d0d12;
    }
}

/* Сброс отступов */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

body {
    /* Фон больше не задаём на body — он будет в слоях */
    padding: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    overflow: hidden;
}

/* ===== ФОНОВЫЙ СЛАЙДШОУ ===== */

.bg-slideshow {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.bg-slide {
    position: absolute;
    inset: 0;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    opacity: 0;
    animation: crossFade 15s infinite;
    will-change: opacity;
}

/* ЗАМЕНИТЕ пути на свои изображения */
.slide-1 {
    background-image: url('background1.jpg');
    animation-delay: 0s;
}
.slide-2 {
    background-image: url('background2.jpg');
    animation-delay: 5s;
}
.slide-3 {
    background-image: url('background3.jpg');
    animation-delay: 10s;
}

/* Кроссфейд: 3 картинки, каждая видна ~10 сек */
@keyframes crossFade {
    0%   { opacity: 0; }
    15%   { opacity: 1; }   /* плавное появление ~2.4 сек */
    33%  { opacity: 1; }   /* держим до конца своей "смены" */
    50%  { opacity: 0; }   /* плавное затухание ~2.4 сек */
    100% { opacity: 0; }
}

/* ===== ЗАТЕМНЕНИЕ И КАРТОЧКА ===== */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: -1;
}

.card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;

    padding: 40px 36px;

    background: rgba(20, 20, 25, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 12px;
    text-align: center;
}

.subtitle {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    margin-bottom: 28px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.2px;
}

.field input {
    padding: 13px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #fff;

    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;

    outline: none;
    transition: all 0.2s ease;
}

.field input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.field input:hover {
    background: rgba(255, 255, 255, 0.12);
}

.field input:focus {
    border-color: rgba(120, 170, 255, 0.9);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 0 4px rgba(120, 170, 255, 0.18);
}

button[type="submit"] {
    margin-top: 6px;
    padding: 14px 16px;

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #fff;

    background: linear-gradient(135deg, #4a7dff 0%, #6a5cff 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;

    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 8px 24px rgba(74, 125, 255, 0.35);
}

button[type="submit"]:hover {
    filter: brightness(1.08);
    box-shadow: 0 10px 28px rgba(74, 125, 255, 0.5);
}

button[type="submit"]:active {
    transform: translateY(1px) scale(0.99);
}

@media (max-width: 480px) {
    body { padding: 20px; }

    .card {
        padding: 30px 24px;
        border-radius: 14px;
    }

    .card h1 { font-size: 24px; }
}