/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ ВХОДА/РЕГИСТРАЦИИ ===== */
.auth-form {
    display: block;
}
.auth-form.hidden {
    display: none;
}
.switch-link {
    color: var(--accent-primary);
    cursor: pointer;
    font-weight: 600;
}
.switch-link:hover {
    color: var(--accent-secondary);
}
.message {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}
.message.error {
    background: rgba(255, 80, 80, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.3);
    color: #ff6b6b;
}
.message.success {
    background: rgba(80, 200, 120, 0.15);
    border: 1px solid rgba(80, 200, 120, 0.3);
    color: #51cf66;
}

.login-form .form-group {
    margin-bottom: 20px;
}
.login-form .form-group > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.login-form input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"]) {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: 12px;
    color: var(--text-input);
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}
.login-form input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"]):focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px var(--accent-glow);
}
.login-form input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"])::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.password-field {
    position: relative;
}
.login-form .password-field input {
    padding-right: 48px;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    max-height: calc(100% - 4px);
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
    user-select: none;
    touch-action: manipulation;
    z-index: 1;
}
.password-toggle:hover {
    color: var(--text-primary);
    background: rgba(124, 92, 252, 0.1);
}
.password-toggle:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 0;
    color: var(--text-primary);
}
.password-toggle .icon-eye-off {
    display: none;
}
.password-toggle[aria-pressed="true"] .icon-eye {
    display: none;
}
.password-toggle[aria-pressed="true"] .icon-eye-off {
    display: inline;
}
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0 24px 0;
    font-size: 14px;
}
.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
    color: var(--text-muted);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}
.remember-me input[type="checkbox"] {
    -webkit-appearance: checkbox;
    appearance: auto;
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    max-width: 16px;
    max-height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--accent-primary);
    cursor: pointer;
}
.forgot-password {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}
.forgot-password:hover {
    color: var(--accent-primary);
}
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--accent-glow);
}
.register-link {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 14px;
}
.register-link a,
.register-link .switch-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}
.register-link a:hover,
.register-link .switch-link:hover {
    color: var(--accent-secondary);
}

/* ===== СТИЛИ ДЛЯ HERO-СЕКЦИИ (слайдер) ===== */
.hero-section {
    flex: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-hero);
    transition: background 0.4s ease;
}
.hero-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.hero-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-hero);
    transition: background 0.4s ease;
}
.hero-image,
.hero-image-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    display: block;
    pointer-events: none;
    transition: opacity 0.8s ease;
}
.hero-image {
    z-index: 1;
    pointer-events: auto;
    opacity: 0;
}
.hero-image-overlay {
    z-index: 2;
    pointer-events: none;
    opacity: 0;
}
.hero-image-wrapper.loaded .hero-image {
    opacity: 1;
}
.hero-tagline {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 10;
    margin: 0;
    padding: 12px 20px;
    font-size: 20px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-align: center;
    animation: glowPulse 2.5s ease-in-out infinite;
    line-height: 1.6;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 14, 26, 0.3) 40%, rgba(10, 14, 26, 0.6) 100%);
    border-radius: 0 0 12px 12px;
}
.hero-tagline strong {
    font-weight: 700;
    font-size: 1.4em;
    display: block;
    letter-spacing: 4px;
    text-shadow: 0 0 30px rgba(124, 92, 252, 0.5);
}
.hero-tagline span {
    font-weight: 300;
    font-size: 0.85em;
    opacity: 0.9;
    letter-spacing: 2px;
    display: block;
    margin-top: 2px;
}
[data-theme="light"] .hero-tagline {
    animation: glowPulseLight 2.5s ease-in-out infinite;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.2) 40%, rgba(255, 255, 255, 0.5) 100%);
}
@keyframes glowPulse {
    0% {
        text-shadow: 0 0 10px rgba(124, 92, 252, 0.3), 0 0 20px rgba(124, 92, 252, 0.15), 0 0 40px rgba(124, 92, 252, 0.08);
        color: #b8d4e3;
    }
    50% {
        text-shadow: 0 0 20px rgba(124, 92, 252, 0.8), 0 0 40px rgba(124, 92, 252, 0.5), 0 0 80px rgba(124, 92, 252, 0.3), 0 0 120px rgba(124, 92, 252, 0.15);
        color: #d4c4ff;
    }
    100% {
        text-shadow: 0 0 10px rgba(124, 92, 252, 0.3), 0 0 20px rgba(124, 92, 252, 0.15), 0 0 40px rgba(124, 92, 252, 0.08);
        color: #b8d4e3;
    }
}
@keyframes glowPulseLight {
    0% {
        text-shadow: 0 0 10px rgba(124, 92, 252, 0.2), 0 0 20px rgba(124, 92, 252, 0.1);
        color: #4a5568;
    }
    50% {
        text-shadow: 0 0 20px rgba(124, 92, 252, 0.6), 0 0 40px rgba(124, 92, 252, 0.35), 0 0 80px rgba(124, 92, 252, 0.15);
        color: #5b21b6;
    }
    100% {
        text-shadow: 0 0 10px rgba(124, 92, 252, 0.2), 0 0 20px rgba(124, 92, 252, 0.1);
        color: #4a5568;
    }
}

.login-section {
    flex: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--login-bg);
    backdrop-filter: blur(10px);
    transition: background 0.4s ease;
}
.login-box {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 44px 36px;
    box-shadow: var(--shadow-card);
    transition: all 0.4s ease;
}
.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.login-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 28px;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 992px) {
    .main {
        flex-direction: column;
    }
    .hero-section {
        padding: 30px 20px;
        min-height: 300px;
    }
    .hero-image-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
    .login-section {
        padding: 30px 20px;
    }
    .login-box {
        padding: 32px 24px;
        max-width: 100%;
    }
}
/* Светлая тема лендинга: контраст героя, табов и полей.
   html[data-theme] нужен, чтобы перекрыть стили из landing.php. */
html[data-theme="light"] .hero-section,
html[data-theme="light"] .hero-image-wrapper {
    background: #d8dee8;
}
html[data-theme="light"] .hero-bg {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(91, 33, 182, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(124, 58, 237, 0.16) 0%, transparent 60%),
        #d8dee8;
}
html[data-theme="light"] .hero-grid {
    background-image:
        linear-gradient(rgba(76, 29, 149, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(76, 29, 149, 0.12) 1px, transparent 1px);
}
html[data-theme="light"] .hero-matrix {
    opacity: 0.5;
}
html[data-theme="light"] .hero-matrix .matrix-column .char {
    color: rgba(76, 29, 149, 0.45);
    opacity: 0.5;
}
html[data-theme="light"] .hero-matrix .matrix-column .char.bright {
    color: rgba(91, 33, 182, 0.7);
    opacity: 0.8;
}
html[data-theme="light"] .hero-matrix::after {
    background: rgba(216, 222, 232, 0.18);
}
html[data-theme="light"] .hero-content .brand {
    background: linear-gradient(135deg, #6d28d9, #5b21b6, #4c1d95);
    background-size: 300% 300%;
    filter: drop-shadow(0 2px 10px rgba(91, 33, 182, 0.28));
}
html[data-theme="light"] .hero-content .tagline .product {
    color: #1e293b;
}
html[data-theme="light"] .hero-content .tagline .product span {
    background: linear-gradient(135deg, #7c3aed, #6d28d9, #5b21b6);
    background-size: 300% 300%;
}
html[data-theme="light"] .hero-content .tagline .desc {
    color: #334155;
    opacity: 1;
    font-weight: 400;
}
html[data-theme="light"] .hero-content .badge {
    background: rgba(91, 33, 182, 0.1);
    border-color: rgba(91, 33, 182, 0.28);
    color: #4c1d95;
    font-weight: 600;
    box-shadow: 0 0 24px rgba(91, 33, 182, 0.12);
}
html[data-theme="light"] .hero-content .badge:hover {
    background: rgba(91, 33, 182, 0.16);
    border-color: rgba(91, 33, 182, 0.4);
    color: #3b0764;
}
html[data-theme="light"] .hero-tagline {
    color: #1e293b;
    background: linear-gradient(180deg, transparent 0%, rgba(216, 222, 232, 0.55) 40%, rgba(216, 222, 232, 0.88) 100%);
}

html[data-theme="light"] .login-section {
    background: #eef1f6;
}
html[data-theme="light"] .login-box {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.1);
}
html[data-theme="light"] .login-title {
    color: #0f172a;
}
html[data-theme="light"] .login-subtitle,
html[data-theme="light"] .register-link {
    color: #475569;
}

html[data-theme="light"] .auth-tabs {
    background: #e8edf4;
    border: 1px solid rgba(15, 23, 42, 0.08);
}
html[data-theme="light"] .auth-tab {
    color: #475569;
    font-weight: 600;
}
html[data-theme="light"] .auth-tab:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.7);
}
html[data-theme="light"] .auth-tab.active {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(124, 92, 252, 0.38);
}

html[data-theme="light"] .auth-form .form-group > label,
html[data-theme="light"] .login-form .form-group > label {
    color: #334155;
    opacity: 1;
    font-weight: 600;
}
html[data-theme="light"] .auth-form input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"]),
html[data-theme="light"] .login-form input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"]) {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}
html[data-theme="light"] .auth-form input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"]):focus,
html[data-theme="light"] .login-form input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"]):focus {
    border-color: var(--accent-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.2);
}
html[data-theme="light"] .auth-form input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"])::placeholder,
html[data-theme="light"] .login-form input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"])::placeholder {
    color: #64748b;
    opacity: 1;
}
html[data-theme="light"] .auth-form input:-webkit-autofill,
html[data-theme="light"] .login-form input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    -webkit-text-fill-color: #0f172a;
}
html[data-theme="light"] .password-toggle {
    color: #475569;
}
html[data-theme="light"] .password-toggle:hover,
html[data-theme="light"] .password-toggle:focus-visible {
    color: #0f172a;
    background: rgba(124, 92, 252, 0.12);
}
html[data-theme="light"] .remember-me,
html[data-theme="light"] .forgot-password {
    color: #475569;
    opacity: 1;
}
html[data-theme="light"] .forgot-password:hover,
html[data-theme="light"] .remember-me:hover {
    color: #5b21b6;
    opacity: 1;
}
html[data-theme="light"] .message.error {
    background: rgba(185, 28, 28, 0.1);
    border-color: rgba(185, 28, 28, 0.28);
    color: #b91c1c;
}
html[data-theme="light"] .message.success {
    background: rgba(21, 128, 61, 0.1);
    border-color: rgba(21, 128, 61, 0.28);
    color: #15803d;
}

@media (max-width: 480px) {
    .header .logo-text {
        display: none;
    }
    .hero-image-wrapper {
        max-width: 280px;
        margin: 0 auto;
    }
    .hero-tagline {
        font-size: 13px;
        bottom: 8px;
        padding: 6px 12px;
        letter-spacing: 1px;
    }
    .hero-tagline strong {
        font-size: 1.1em;
        letter-spacing: 2px;
    }
    .hero-tagline span {
        font-size: 0.8em;
    }
    .login-title {
        font-size: 24px;
    }
    .login-box {
        padding: 24px 18px;
    }
    .form-options {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 12px;
        align-items: center;
    }
    .hero-section {
        min-height: 0;
        padding: 12px;
    }
}

/* ===== Лендинг: кнопка «подробнее» (pill) ===== */
html .hero-content .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    min-height: 40px;
    padding: 8px 22px;
    border-radius: 999px;
    border: 1px solid rgba(124, 92, 252, 0.35);
    background: rgba(124, 92, 252, 0.16);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1;
    text-transform: lowercase;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 24px rgba(124, 92, 252, 0.12);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
html .hero-content .badge::after {
    content: "";
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg) translateY(-1px);
    opacity: 0.85;
}
html .hero-content .badge:hover {
    background: rgba(124, 92, 252, 0.28);
    border-color: rgba(168, 85, 247, 0.55);
    box-shadow: 0 0 36px rgba(124, 92, 252, 0.28);
    transform: scale(1.03);
}
html .hero-content .badge:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}
html[data-theme="light"] .hero-content .badge {
    background: rgba(91, 33, 182, 0.1);
    border-color: rgba(91, 33, 182, 0.32);
    color: #4c1d95;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(91, 33, 182, 0.1);
}
html[data-theme="light"] .hero-content .badge:hover {
    background: rgba(91, 33, 182, 0.18);
    border-color: rgba(91, 33, 182, 0.48);
    color: #3b0764;
}

/* ===== Лендинг: #productDetail — диалог, светлая/тёмная ===== */
html[data-theme] #productDetail {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(8, 12, 24, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overscroll-behavior: contain;
}
html[data-theme] #productDetail[hidden] {
    display: none !important;
}
html[data-theme] .product-detail-panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: min(80vh, 640px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 36px 32px 28px;
    background: #12182a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    color: var(--text-primary);
    text-align: left;
    -webkit-overflow-scrolling: touch;
}
html[data-theme] .product-detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(124, 92, 252, 0.16);
    color: var(--text-primary);
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    -webkit-appearance: none;
}
html[data-theme] .product-detail-close::before,
html[data-theme] .product-detail-close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
}
html[data-theme] .product-detail-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
html[data-theme] .product-detail-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
html[data-theme] .product-detail-close:hover {
    background: rgba(124, 92, 252, 0.32);
}
html[data-theme] .product-detail-close:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}
html[data-theme] .product-detail-kicker {
    font-size: 12px;
    letter-spacing: 0.22em;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}
html[data-theme] .product-detail-title {
    margin: 0 0 16px;
    font-size: 28px;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, #d8b4fe, #a855f7, #8b5cf6);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
html[data-theme] .product-detail-about {
    color: #c5d0e0;
    font-size: 15px;
    line-height: 1.55;
    font-weight: 400;
}
html[data-theme] .product-detail-about p {
    margin: 0 0 12px;
}
html[data-theme] .product-detail-about p:last-child {
    margin-bottom: 0;
}
html[data-theme] .product-detail-about ul {
    margin: 0 0 12px;
    padding-left: 18px;
}
html[data-theme] .product-detail-about li {
    margin-bottom: 6px;
}

html[data-theme="light"] #productDetail {
    background: rgba(15, 23, 42, 0.42);
}
html[data-theme="light"] .product-detail-panel {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.18);
    color: #0f172a;
}
html[data-theme="light"] .product-detail-close {
    background: rgba(91, 33, 182, 0.1);
    color: #4c1d95;
}
html[data-theme="light"] .product-detail-close:hover {
    background: rgba(91, 33, 182, 0.2);
}
html[data-theme="light"] .product-detail-kicker {
    color: #64748b;
}
html[data-theme="light"] .product-detail-title {
    background: linear-gradient(135deg, #7c3aed, #6d28d9, #5b21b6);
    background-size: 300% 300%;
}
html[data-theme="light"] .product-detail-about {
    color: #334155;
}