/* =========================================================
   ФВЛ — WELCOME (4 слайда, стиль Reels)
   ========================================================= */

   :root {
    --w-bg: #0a0a0a;
    --w-bg-elevated: #141414;
    --w-bg-card: #1a1a1a;
    --w-border: #2a2a2a;
    --w-border-light: #333333;
    --w-text: #ffffff;
    --w-text-secondary: #888888;
    --w-text-muted: #555555;
    --w-accent: #ffffff;
    --w-danger: #ff4444;
    --w-radius: 16px;
    --w-radius-sm: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
}

.welcome-body {
    background: var(--w-bg);
    color: var(--w-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.slides-container {
    height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.slides-container::-webkit-scrollbar {
    display: none;
}

.slide {
    height: 100dvh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.slide-content {
    width: 100%;
    max-width: 480px;
    padding: 24px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.slide-indicator {
    position: fixed;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.slide-dot {
    width: 4px;
    height: 24px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.slide-dot.active {
    background: rgba(255, 255, 255, 0.9);
    height: 32px;
}

.slide--hero {
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #0a0a0a 70%);
}

.hero-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.float-card {
    position: absolute;
    width: 70px;
    height: 90px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #333;
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.float-card::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.float-card--1 { top: 8%;  left: 8%;  animation-delay: 0s;   }
.float-card--2 { top: 15%; right: 10%; animation-delay: 1s;   }
.float-card--3 { top: 35%; left: 5%;  animation-delay: 2s;   }
.float-card--4 { top: 40%; right: 6%; animation-delay: 3s;   }
.float-card--5 { bottom: 20%; left: 12%; animation-delay: 4s; }
.float-card--6 { bottom: 15%; right: 8%; animation-delay: 5s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-2deg); opacity: 0.4; }
    50%      { transform: translateY(-15px) rotate(2deg); opacity: 0.6; }
}

.hero-main {
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.hero-logo {
    font-size: 5em;
    font-weight: 900;
    letter-spacing: 6px;
    color: transparent;
    -webkit-text-stroke: 3px #ffffff;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.5),
        0 0 40px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
    line-height: 1;
}

.hero-subtitle {
    font-size: 0.85em;
    color: var(--w-text-secondary);
    letter-spacing: 4px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.hero-slogan {
    font-size: 1.3em;
    color: var(--w-text);
    margin-bottom: 48px;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    width: 100%;
    letter-spacing: 0.3px;
}

.btn--primary {
    background: #ffffff;
    color: #0a0a0a;
    border-color: #ffffff;
}

.btn--primary:hover,
.btn--primary:active {
    background: transparent;
    color: #ffffff;
}

.btn--secondary {
    background: transparent;
    color: #ffffff;
    border-color: #444444;
}

.btn--secondary:hover,
.btn--secondary:active {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.btn--full {
    width: 100%;
}

.slide-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(8px); }
}

.slide--features {
    background: linear-gradient(180deg, #0a0a0a 0%, #141414 100%);
}

.slide--features .slide-content {
    justify-content: center;
    padding: 40px 20px;
}

.features-title {
    font-size: 1.8em;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 28px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.feature-card {
    background: var(--w-bg-card);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 18px 16px;
    transition: all 0.25s ease;
}

.feature-card:active {
    transform: scale(0.98);
    border-color: #444;
}

.feature-icon {
    color: #ffffff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    height: 32px;
}

.feature-name {
    font-size: 1em;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.feature-desc {
    font-size: 0.78em;
    color: var(--w-text-secondary);
    line-height: 1.4;
}

.features-footer {
    text-align: center;
    color: var(--w-text-muted);
    font-size: 0.9em;
    font-style: italic;
    margin-bottom: 20px;
}

.slide--login {
    background: linear-gradient(180deg, #0a0a0a 0%, #0f0f0f 100%);
}

.slide--register {
    background: linear-gradient(180deg, #0a0a0a 0%, #0f0f0f 100%);
}

.slide--login .slide-content,
.slide--register .slide-content {
    padding: 20px 20px 16px;
    justify-content: center;
    overflow-y: auto;
}

.auth-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-header {
    text-align: center;
    margin-bottom: 16px;
}

.auth-logo {
    font-size: 1.8em;
    font-weight: 900;
    letter-spacing: 3px;
    color: transparent;
    -webkit-text-stroke: 1.5px #ffffff;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.4),
        0 0 20px rgba(255, 255, 255, 0.2);
    margin-bottom: 6px;
    line-height: 1;
}

.auth-subtitle {
    font-size: 1em;
    color: var(--w-text);
    font-weight: 500;
}

.auth-form-new {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--w-bg-card);
    border: 1px solid var(--w-border);
    border-radius: 10px;
    transition: border-color 0.2s ease;
    height: 48px;
}

.input-wrap:focus-within {
    border-color: #ffffff;
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    color: var(--w-text-muted);
    flex-shrink: 0;
}

.auth-input-new {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 0 12px 0 0;
    margin: 0;
    color: #ffffff;
    font-size: 0.9em;
    font-family: inherit;
    min-width: 0;
    height: 100%;
    line-height: 48px;
    vertical-align: middle;
    box-sizing: border-box;
}

.auth-input-new::placeholder {
    color: var(--w-text-muted);
}

.input-toggle {
    background: transparent;
    border: none;
    color: var(--w-text-muted);
    padding: 0 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.input-toggle:hover {
    color: #ffffff;
}

.input-hint {
    color: var(--w-text-muted);
    font-size: 0.7em;
    padding-left: 12px;
    margin-top: -2px;
    margin-bottom: 4px;
    line-height: 1;
}

.auth-links {
    text-align: center;
    margin-bottom: 20px;
}

.auth-link {
    color: #ffffff;
    text-decoration: underline;
    font-size: 0.9em;
    opacity: 0.8;
}

.auth-link:hover {
    opacity: 1;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--w-text-muted);
    font-size: 0.85em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--w-border);
}

.auth-footer-new {
    text-align: center;
    color: var(--w-text-secondary);
    font-size: 0.85em;
    line-height: 1.6;
    margin-top: 20px;
}

.auth-footer-new span {
    color: var(--w-text-muted);
    font-size: 0.9em;
}

.auth-footer-new a {
    color: #ffffff;
    text-decoration: underline;
    margin-top: 6px;
    display: inline-block;
}

@media (max-height: 700px) {
    .hero-logo {
        font-size: 3.5em;
        -webkit-text-stroke: 2px #ffffff;
    }

    .hero-subtitle {
        font-size: 0.75em;
        margin-bottom: 16px;
    }

    .hero-slogan {
        font-size: 1.05em;
        margin-bottom: 32px;
    }

    .features-title {
        font-size: 1.4em;
        margin-bottom: 18px;
    }

    .feature-card {
        padding: 14px 12px;
    }

    .feature-name {
        font-size: 0.9em;
    }

    .feature-desc {
        font-size: 0.7em;
    }

    .auth-logo {
        font-size: 2em;
        -webkit-text-stroke: 1.5px #ffffff;
    }

    .input-hint {
        display: none;
    }
}

@media (min-height: 700px) and (max-height: 900px) {
    .hero-logo {
        font-size: 4.5em;
    }

    .features-title {
        font-size: 1.7em;
    }
}

@media (min-height: 900px) {
    .slide-content {
        max-width: 520px;
    }

    .hero-logo {
        font-size: 6em;
    }

    .features-grid {
        gap: 14px;
    }

    .feature-card {
        padding: 22px 18px;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .slide-content {
        max-width: 100%;
        padding: 12px 20px;
    }

    .hero-logo {
        font-size: 3em;
        margin-bottom: 8px;
    }

    .hero-subtitle {
        margin-bottom: 8px;
        font-size: 0.7em;
    }

    .hero-slogan {
        margin-bottom: 16px;
        font-size: 1em;
    }

    .hero-actions {
        flex-direction: row;
        max-width: 500px;
    }

    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .feature-card {
        padding: 10px 8px;
    }

    .feature-desc {
        display: none;
    }

    .auth-header {
        margin-bottom: 12px;
    }

    .auth-logo {
        font-size: 1.6em;
        margin-bottom: 4px;
    }
}

@media (max-width: 380px) {
    .float-card {
        width: 55px;
        height: 70px;
        opacity: 0.25;
    }
}

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

.hero-main > * {
    animation: fadeInUp 0.6s ease backwards;
}

.hero-logo       { animation-delay: 0.1s; }
.hero-subtitle   { animation-delay: 0.2s; }
.hero-slogan     { animation-delay: 0.3s; }
.hero-actions    { animation-delay: 0.4s; }

.feature-card {
    animation: fadeInUp 0.5s ease backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.15s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.25s; }

.auth-wrap > * {
    animation: fadeInUp 0.5s ease backwards;
}

.auth-header   { animation-delay: 0.05s; }
.auth-form-new { animation-delay: 0.1s; }

/* =========================================================
   ЮРИДИЧЕСКИЙ БЛОК
   ========================================================= */

   .auth-legal {
    text-align: center;
    color: var(--w-text-muted);
    font-size: 0.7em;
    line-height: 1.4;
    margin-top: 12px;
    padding: 0 8px;
}

.auth-legal a {
    color: var(--w-text-secondary);
    text-decoration: underline;
    transition: color 0.2s;
}

.auth-legal a:hover {
    color: #ffffff;
}

/* =========================================================
   АВТОЗАПОЛНЕНИЕ (отключаем белый фон Chrome/Safari)
   ========================================================= */

   .auth-input-new:-webkit-autofill,
   .auth-input-new:-webkit-autofill:hover,
   .auth-input-new:-webkit-autofill:focus,
   .auth-input-new:-webkit-autofill:active {
       -webkit-box-shadow: 0 0 0 1000px var(--w-bg-card) inset !important;
       -webkit-text-fill-color: #ffffff !important;
       box-shadow: 0 0 0 1000px var(--w-bg-card) inset !important;
       caret-color: #ffffff;
       transition: background-color 5000s ease-in-out 0s;
   }
   
   /* Firefox */
   .auth-input-new:autofill {
       filter: none;
       background-color: var(--w-bg-card) !important;
       color: #ffffff !important;
   }



/* =========================================================
   ОШИБКИ В ФОРМАХ
   ========================================================= */

.auth-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85em;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.4;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    75%      { transform: translateX(4px); }
}