html {
    scroll-behavior: smooth;
}

body.homepage-body {
    margin: 0;
    background: #fff;
}

.homepage-shell .nav-link,
.homepage-shell .navbar-brand,
.homepage-shell .search-btn,
.homepage-shell .cta-btn,
.homepage-shell .pricing-cta,
.homepage-shell .footer-links a,
.homepage-shell .footer-section a {
    cursor: pointer;
}

.homepage-shell .button-reset {
    background: transparent;
    border: none;
    padding: 0;
    font: inherit;
}

.homepage-shell .header-profile-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.homepage-shell .search-title {
    margin: 0;
    padding-top: 18px;
    text-align: center;
    font-size: 2rem;
    color: #0f172a;
}

.homepage-shell .auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10050;
    padding: 20px;
    backdrop-filter: blur(8px);
}

.homepage-shell .auth-modal-overlay.is-open {
    display: flex;
}

.homepage-shell .auth-modal-card {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(255, 255, 255, 0.99) 100%);
    width: 100%;
    max-width: 520px;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.85);
}

.homepage-shell .auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.homepage-shell .auth-modal-header-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.homepage-shell .auth-modal-brand-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.homepage-shell .auth-modal-heading {
    min-width: 0;
}

.homepage-shell .auth-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.homepage-shell .auth-modal-header p {
    margin: 4px 0 0;
    color: #64748b;
    line-height: 1.45;
    font-size: 14px;
}

.homepage-shell .auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #64748b;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(10px);
}

.homepage-shell .auth-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.homepage-shell .auth-modal-body {
    padding: 24px;
}

.homepage-shell .auth-modal-actions {
    display: grid;
    gap: 12px;
}

.homepage-shell .auth-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    color: #0f172a;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    box-sizing: border-box;
}

.homepage-shell .auth-action-button:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border-color: #c3d2ea;
}

.homepage-shell .auth-action-button:disabled,
.homepage-shell .auth-action-button.is-loading {
    opacity: 0.72;
    cursor: not-allowed;
}

.homepage-shell .auth-action-button.is-shaking {
    animation: auth-shake 0.45s ease-in-out;
}

.homepage-shell .auth-action-button--provider {
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(66, 133, 244, 0.3);
}

.homepage-shell .auth-action-button--google,
.homepage-shell .auth-action-button--yandex {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
}

.homepage-shell .auth-provider-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.homepage-shell .auth-provider-icon--google {
    background: conic-gradient(from 20deg, #4285f4 0 25%, #ea4335 25% 50%, #fbbc05 50% 75%, #34a853 75% 100%);
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
}

.homepage-shell .auth-provider-icon--yandex {
    color: #ff0000;
}

.homepage-shell .auth-action-button--primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.homepage-shell .auth-action-button--primary:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}

.homepage-shell .auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

.homepage-shell .auth-divider::before,
.homepage-shell .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.homepage-shell .auth-divider span {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.homepage-shell .auth-email-block {
    margin-bottom: 20px;
}

.homepage-shell .auth-email-input {
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 1rem;
    margin-bottom: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    outline: none;
}

.homepage-shell .auth-email-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.homepage-shell .auth-email-input.has-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.homepage-shell .auth-inline-hint {
    min-height: 18px;
    margin: -4px 0 10px;
    font-size: 12px;
    color: #ef4444;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.homepage-shell .auth-inline-hint.is-visible {
    opacity: 1;
}

.homepage-shell .auth-inline-hint--error {
    margin: 10px 0 0;
    min-height: 0;
    font-size: 13px;
    font-weight: 600;
}

.homepage-shell .auth-switcher {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.homepage-shell .auth-switcher-copy {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.homepage-shell .auth-switcher-copy--register {
    display: none;
}

.homepage-shell .auth-modal-overlay[data-auth-type="register"] .auth-switcher-copy--login {
    display: none;
}

.homepage-shell .auth-modal-overlay[data-auth-type="register"] .auth-switcher-copy--register {
    display: block;
}

.homepage-shell .auth-switcher-button {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    margin-left: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.homepage-shell .auth-switcher-button:hover {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.1);
}

.homepage-shell .auth-consent-panel {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.homepage-shell .auth-consent-panel.is-checked {
    background: rgba(240, 253, 250, 0.8);
    border-color: #10b981;
}

.homepage-shell .auth-consent-panel.has-error {
    background: rgba(254, 242, 242, 0.95);
    border: 2px solid #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    animation: auth-shake 0.45s ease-in-out;
}

.homepage-shell .auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
}

.homepage-shell .auth-consent input {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #3b82f6;
}

.homepage-shell .auth-consent a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
}

.homepage-shell .auth-consent a:hover {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
}

.homepage-shell .auth-referral-note {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.08);
    color: #065f46;
    font-size: 13px;
}

.homepage-shell .auth-status {
    display: none;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.45;
}

.homepage-shell .auth-status.is-visible {
    display: block;
}

.homepage-shell .auth-status--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.homepage-shell .auth-status--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

@keyframes auth-shake {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-4px);
    }
    40% {
        transform: translateX(4px);
    }
    60% {
        transform: translateX(-3px);
    }
    80% {
        transform: translateX(3px);
    }
}

.homepage-shell .contact-status {
    margin-top: 12px;
}

.homepage-shell .profile-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.homepage-shell .header-auth-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.homepage-shell .header-auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.homepage-shell .header-profile-nav {
    position: relative;
}

.homepage-shell .header-profile-button {
    background: transparent;
    border: none;
    cursor: pointer;
}

.homepage-shell .header-profile-chevron {
    font-size: 12px;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.homepage-shell .header-profile-button[aria-expanded="true"] .header-profile-chevron {
    transform: rotate(180deg);
}

.homepage-shell .header-profile-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 220px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(17, 24, 39, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    padding: 10px;
    z-index: 10000;
    display: none;
}

.homepage-shell .header-profile-menu.open {
    display: block;
}

.homepage-shell .header-profile-menu-link {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font: inherit;
    box-sizing: border-box;
}

.homepage-shell .header-profile-menu-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.homepage-shell .header-profile-menu-link i {
    width: 16px;
}

.homepage-shell .header-profile-menu-link--danger {
    color: #fecaca;
}

.homepage-shell .header-profile-menu-link--danger:hover {
    background: rgba(239, 68, 68, 0.12);
}

.homepage-shell .header-profile-menu-link[href="/account"] i {
    color: #93c5fd;
}

.homepage-shell .header-profile-menu-link[href="/account/sessions"] i {
    color: #a7f3d0;
}

.homepage-shell .header-profile-menu-link[href="/account/affiliate"] i {
    color: #fde68a;
}

.homepage-shell .header-profile-menu-link--danger i {
    color: #fca5a5;
}

@media (max-width: 768px) {
    .homepage-shell .search-title {
        font-size: 1.6rem;
    }

    .homepage-shell .auth-modal-card {
        max-width: 100%;
    }

    .homepage-shell .header-profile-menu {
        position: static;
        min-width: 100%;
        margin-top: 8px;
    }

    .homepage-shell .header-auth-button {
        width: 100%;
        justify-content: center;
    }
}
