@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: #070a12;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Фон: дорога */
.road-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.5;
}
.road-bg svg {
    width: 100%;
    height: 100%;
}
.road-path, .road-path2 {
    fill: none;
    stroke: #1e2633;
    stroke-width: 60;
    stroke-linecap: round;
}
.road-dash, .road-dash2 {
    fill: none;
    stroke: #6c8cff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 20 30;
    opacity: 0.6;
    animation: dashMove 3s linear infinite;
}
.road-dash2 {
    stroke: #a78bfa;
    animation-duration: 4s;
    animation-direction: reverse;
}
@keyframes dashMove {
    to { stroke-dashoffset: -100; }
}

/* Свечение на фоне */
body::before {
    content: '';
    position: fixed;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(108,140,255,0.25), transparent 70%);
    top: -200px; left: -200px;
    border-radius: 50%;
    filter: blur(100px);
    animation: floatGlow 10s ease-in-out infinite alternate;
    z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(167,139,250,0.18), transparent 70%);
    bottom: -150px; right: -150px;
    border-radius: 50%;
    filter: blur(100px);
    animation: floatGlow 8s ease-in-out infinite alternate-reverse;
    z-index: 0;
}
@keyframes floatGlow {
    0% { transform: translate(0,0) scale(1); }
    100% { transform: translate(80px, 60px) scale(1.2); }
}

/* Карточка по центру */
.login-wrapper {
    position: relative;
    z-index: 2;
    perspective: 1200px;
}

.login-card {
    width: 400px;
    padding: 44px 36px;
    border-radius: 28px;
    background: rgba(17, 22, 31, 0.72);
    backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 40px 90px rgba(0,0,0,0.7),
        0 1px 0 rgba(255,255,255,0.1) inset,
        0 0 60px rgba(108,140,255,0.08);
    text-align: center;
    animation: cardIn 0.7s cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.logo {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, #6c8cff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1.5px;
}
.subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin-top: 8px;
    margin-bottom: 34px;
    letter-spacing: 0.5px;
}

.input-group { text-align: left; margin-bottom: 18px; }
.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.input-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}
.input-group input:focus {
    border-color: #6c8cff;
    box-shadow: 0 0 0 3px rgba(108,140,255,0.15);
}
.input-group input::placeholder { color: rgba(255,255,255,0.2); }

/* Сцена с машинкой */
.truck-launcher {
    margin-top: 28px;
    position: relative;
    height: 90px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(108,140,255,0.15), rgba(167,139,250,0.1));
    border: 1px solid rgba(108,140,255,0.3);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}
.truck-launcher:hover {
    border-color: #6c8cff;
    box-shadow: 0 0 30px rgba(108,140,255,0.25);
}

.scene { position: absolute; inset: 0; overflow: hidden; }

.launch-text {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 800;
    font-size: 16px;
    color: #6c8cff;
    letter-spacing: 1px;
    opacity: 0.6;
    transition: opacity 0.3s;
    z-index: 5;
}
.truck-launcher:hover .launch-text { opacity: 1; }

/* Машинка — быстро и плавно */
.truck {
    position: absolute;
    left: 20px;
    bottom: 22px;
    z-index: 3;
    transition: left 1.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}
.truck.driving {
    left: calc(100% - 120px);
}

.truck-body { position: relative; width: 76px; height: 34px; }
.truck-cab {
    position: absolute;
    right: 0; bottom: 0;
    width: 30px; height: 26px;
    background: #6c8cff;
    border-radius: 6px 10px 0 0;
}
.truck-cargo {
    position: absolute;
    left: 0; bottom: 0;
    width: 50px; height: 32px;
    background: rgba(255,255,255,0.12);
    border: 2px solid #6c8cff;
    border-radius: 6px;
}

.wheel {
    position: absolute;
    bottom: -7px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #1a2130;
    border: 3px solid #6c8cff;
}
.wheel.front { right: 6px; }
.wheel.rear { left: 8px; }

@keyframes wheelSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}
.truck.spinning .wheel { animation: wheelSpin 0.15s linear infinite; }
.truck.spinning { animation: shake 0.08s linear infinite; }
.truck.driving .wheel { animation: wheelSpin 0.18s linear infinite; }

.smoke {
    position: absolute;
    left: 0; bottom: -8px;
    width: 22px; height: 22px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s;
}
.smoke.active {
    opacity: 1;
    animation: smokePuff 0.7s ease-out infinite;
}
@keyframes smokePuff {
    0% { transform: scale(0.5) translateX(0); opacity: 0.6; }
    100% { transform: scale(2) translateX(-35px); opacity: 0; }
}

/* Галочка */
.checkmark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 50px; height: 50px;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 4;
}
.checkmark.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.checkmark svg { width: 100%; height: 100%; }
.check-circle {
    stroke: #34d399;
    stroke-width: 3;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    filter: drop-shadow(0 0 8px rgba(52,211,153,0.6));
}
.check-path {
    stroke: #34d399;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
}
.checkmark.visible .check-circle { animation: drawCircle 0.5s ease forwards; }
.checkmark.visible .check-path { animation: drawCheck 0.3s ease 0.4s forwards; }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

.hint {
    margin-top: 16px;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    transition: color 0.3s;
}