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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.landing-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.logo-banner {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    pointer-events: none;
}

.logo-banner img {
    height: 64px;
    width: auto;
}

/* Диагональное разделение экрана - начальный экран */
.diagonal-split {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px;
    gap: 40px;
    overflow: hidden;
}

.style-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 1;
    width: 45%;
    position: relative;
    min-height: 0;
    height: 100%;
}

.style-column .video-half {
    max-height: min(60vh, 520px);
}

.diagonal-split.hidden {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.diagonal-split.hidden * {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

.diagonal-split::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 6, 59, 0.9) 0%, rgba(10, 10, 10, 0.6) 50%, rgba(94, 6, 46, 0.9) 100%);
    z-index: 0;
}

.diagonal-split::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 49%, rgba(255, 255, 255, 0.08) 50%, transparent 51%);
    pointer-events: none;
    z-index: 0;
}

.style-title {
    position: absolute;
    top: 180px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    z-index: 10;
    text-align: center;
    white-space: nowrap;
    width: 100%;
    pointer-events: none;
    margin: 0;
    padding: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.style-title.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.video-half {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    overflow: hidden;
    cursor: pointer;
    border-radius: 32px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.3s ease;
    z-index: 1;
}

.video-half:hover {
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.35);
}

.video-half video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Оверлей для лучшей видимости и интерактивности */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
    z-index: 1;
}

.video-half .video-overlay {
    background: rgba(0, 0, 0, 0.05);
}

.video-half:hover .video-overlay {
    background: rgba(0, 0, 0, 0.35);
}

.style-label {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
    margin-top: 20px;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Вертикальное разделение экрана для видео секций */
.vertical-split {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 10;
    padding: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vertical-split::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 6, 59, 0.92) 0%, rgba(10, 10, 10, 0.75) 50%, rgba(94, 6, 46, 0.92) 100%);
    z-index: 0;
}

.vertical-split.hidden {
    display: none;
}

.vertical-split video {
    width: min(70vmin, 640px);
    height: min(70vmin, 640px);
    object-fit: cover;
    position: relative;
    z-index: 1;
    background: #050505;
    border: 4px solid #FF5E77;
    border-radius: 32px;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
}

/* Кликабельные области для левой и правой части */
.split-left,
.split-right {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 80px;
}

.split-left {
    left: 0;
}

.split-right {
    right: 0;
}

.split-left:hover,
.split-right:hover {
    background: rgba(255, 255, 255, 0.05);
}

.split-left[data-next]::after,
.split-right[data-next]::after {
    content: "TAP";
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    letter-spacing: 6px;
    font-weight: 700;
    color: #fff;
    z-index: 3;
}

.split-left[data-next]::before,
.split-right[data-next]::before {
    content: "";
    position: absolute;
    bottom: 110px;
    left: 50%;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    border-radius: 50%;
    background: #FF5E77;
    box-shadow: 0 0 0 12px rgba(255, 94, 119, 0.25),
                0 0 0 24px rgba(255, 94, 119, 0.15),
                0 0 0 36px rgba(255, 94, 119, 0.08);
    animation: tapPulse 2.2s ease-out infinite;
    z-index: 2;
}

@keyframes tapPulse {
    0% {
        box-shadow: 0 0 0 12px rgba(255, 94, 119, 0.3),
                    0 0 0 24px rgba(255, 94, 119, 0.18),
                    0 0 0 36px rgba(255, 94, 119, 0.1);
        opacity: 1;
    }
    100% {
        box-shadow: 0 0 0 32px rgba(255, 94, 119, 0),
                    0 0 0 60px rgba(255, 94, 119, 0),
                    0 0 0 90px rgba(255, 94, 119, 0);
        opacity: 0;
    }
}

/* Визуальная линия разделения */
.vertical-split::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
}

.vertical-split.terminal::after {
    display: none;
}

.character-card {
    position: absolute;
    right: max(70px, 5vw);
    bottom: max(70px, 5vh);
    width: min(320px, 28vw);
    padding: min(24px, 2.5vh);
    border-radius: min(24px, 2.5vh);
    background: rgba(12, 12, 21, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(18px);
    color: #fff;
    display: flex;
    gap: min(16px, 1.5vh);
    z-index: 5;
    max-height: calc(100vh - 10vh);
    overflow-y: auto;
}

.character-card .avatar-circle {
    width: min(64px, 6vh);
    height: min(64px, 6vh);
    min-width: min(64px, 6vh);
    min-height: min(64px, 6vh);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: min(20px, 2vh);
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.character-card .avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.character-card .character-meta {
    flex: 1;
}

.character-card .character-name {
    font-size: min(20px, 2vh);
    margin: 0;
}

.character-card .character-role {
    font-size: min(13px, 1.3vh);
    text-transform: uppercase;
    letter-spacing: min(3px, 0.3vh);
    margin-bottom: min(6px, 0.6vh);
    opacity: 0.85;
}

.character-card .character-desc {
    font-size: min(14px, 1.4vh);
    line-height: 1.4;
    margin: min(6px, 0.6vh) 0 min(14px, 1.4vh);
    opacity: 0.9;
}

.character-card .character-cta {
    background: #FF5E77;
    color: #fff;
    border: none;
    padding: min(10px, 1vh) min(16px, 1.5vw);
    border-radius: 999px;
    font-weight: 600;
    font-size: min(14px, 1.4vh);
    cursor: pointer;
    width: 100%;
    transition: background 0.3s ease, transform 0.3s ease;
}

.character-card .character-cta:hover {
    background: #ff6e86;
    transform: translateY(-2px);
}

/* Адаптация для низких экранов */
@media (max-height: 700px) {
    .character-card {
        bottom: max(20px, 2vh);
        right: max(20px, 2vw);
        width: min(280px, 30vw);
        padding: min(16px, 2vh);
        max-height: calc(100vh - 4vh);
    }
    
    .character-card .avatar-circle {
        width: min(48px, 5vh);
        height: min(48px, 5vh);
        min-width: min(48px, 5vh);
        min-height: min(48px, 5vh);
        font-size: min(16px, 1.8vh);
    }
    
    .character-card .character-name {
        font-size: min(18px, 1.8vh);
    }
    
    .character-card .character-role {
        font-size: min(11px, 1.2vh);
        margin-bottom: min(4px, 0.5vh);
    }
    
    .character-card .character-desc {
        font-size: min(12px, 1.3vh);
        margin: min(4px, 0.5vh) 0 min(10px, 1vh);
        line-height: 1.3;
    }
    
    .character-card .character-cta {
        padding: min(8px, 0.9vh) min(14px, 1.5vw);
        font-size: min(12px, 1.3vh);
    }
}

/* Очень низкие экраны */
@media (max-height: 500px) {
    .character-card {
        bottom: max(10px, 1vh);
        right: max(10px, 1vw);
        width: min(240px, 35vw);
        padding: min(12px, 1.5vh);
        max-height: calc(100vh - 2vh);
    }
    
    .character-card .character-desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Мобильная версия - карточка по центру */
@media (max-width: 768px) {
    .character-card {
        position: absolute;
        right: auto;
        left: 50%;
        bottom: max(70px, 5vh);
        transform: translateX(-50%);
        width: min(320px, calc(100vw - 40px));
    }
    
    @media (max-height: 700px) {
        .character-card {
            bottom: max(20px, 2vh);
        }
    }
    
    @media (max-height: 500px) {
        .character-card {
            bottom: max(10px, 1vh);
            width: min(280px, calc(100vw - 20px));
        }
    }
}

.back-button {
    position: absolute;
    top: 120px;
    left: 30px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 100;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-5px);
}

/* Анимация появления секций */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.vertical-split:not(.hidden) {
    animation: fadeIn 0.5s ease;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 3, 12, 0.85);
    z-index: 200;
}

.character-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 210;
}

.character-modal.hidden,
.modal-backdrop.hidden {
    display: none;
}

.modal-content {
    background: rgba(14, 14, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: min(28px, 3vh);
    padding: min(32px, 3vh);
    width: min(520px, 90vw);
    max-width: 90vw;
    max-height: calc(100vh - 4vh);
    color: #fff;
    box-shadow: 0 30px 120px rgba(0, 0, 0, 0.65);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: min(20px, 2vh);
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-close {
    position: absolute;
    top: min(18px, 2vh);
    right: min(18px, 2vw);
    background: transparent;
    border: none;
    color: #fff;
    font-size: min(28px, 3vh);
    cursor: pointer;
    line-height: 1;
    z-index: 1;
}

.modal-cover {
    width: 100%;
    height: min(170px, 18vh);
    min-height: min(120px, 12vh);
    border-radius: min(20px, 2vh);
    background: linear-gradient(135deg, #1f1f2e, #2f0f28);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.modal-cover video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-avatar {
    width: min(72px, 7vh);
    height: min(72px, 7vh);
    min-width: min(72px, 7vh);
    min-height: min(72px, 7vh);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: min(26px, 2.5vh);
    color: #fff;
    margin-bottom: min(12px, 1.2vh);
    overflow: hidden;
    flex-shrink: 0;
}

.modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.modal-text h3 {
    margin: 0 0 min(6px, 0.6vh);
    font-size: min(24px, 2.5vh);
}

.modal-text p {
    margin: 0 0 min(14px, 1.4vh);
    opacity: 0.9;
    font-size: min(14px, 1.4vh);
    line-height: 1.5;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: min(12px, 1.2vh);
}

.modal-form label {
    font-size: min(13px, 1.3vh);
    text-transform: uppercase;
    letter-spacing: min(2px, 0.2vh);
    display: flex;
    flex-direction: column;
    gap: min(6px, 0.6vh);
}

.modal-form input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: min(12px, 1.2vh);
    padding: min(12px, 1.2vh) min(14px, 1.4vw);
    color: #fff;
    font-size: min(14px, 1.4vh);
}

.modal-submit {
    background: #FF5E77;
    border: none;
    padding: min(14px, 1.4vh);
    border-radius: 999px;
    color: #fff;
    font-size: min(16px, 1.6vh);
    font-weight: 700;
    cursor: pointer;
    margin-top: min(4px, 0.4vh);
    transition: background 0.3s ease, transform 0.3s ease;
}

.modal-submit:hover {
    background: #ff7590;
    transform: translateY(-1px);
}

.modal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-error {
    color: #ff5e77;
    font-size: min(13px, 1.3vh);
    margin-top: min(-8px, -0.8vh);
    min-height: min(20px, 2vh);
}

.modal-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: min(16px, 1.6vh) 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: min(13px, 1.3vh);
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-divider span {
    padding: 0 12px;
}

.modal-button-google {
    width: 100%;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: min(14px, 1.4vh);
    border-radius: 999px;
    color: #333;
    font-size: min(16px, 1.6vh);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: min(10px, 1vh);
    transition: background 0.3s ease, transform 0.3s ease;
    margin-top: min(8px, 0.8vh);
}

.modal-button-google:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
}

.modal-button-google .google-icon {
    width: min(20px, 2vh);
    height: min(20px, 2vh);
}

.modal-hint {
    text-align: center;
    font-size: min(12px, 1.2vh);
    color: rgba(255, 255, 255, 0.6);
    margin-top: min(12px, 1.2vh);
}

/* Адаптация модального окна для низких экранов */
@media (max-height: 700px) {
    .modal-content {
        padding: min(20px, 2.5vh);
        gap: min(16px, 1.8vh);
        max-height: calc(100vh - 2vh);
    }
    
    .modal-cover {
        height: min(120px, 15vh);
        min-height: min(80px, 10vh);
    }
    
    .modal-avatar {
        width: min(56px, 6vh);
        height: min(56px, 6vh);
        min-width: min(56px, 6vh);
        min-height: min(56px, 6vh);
        font-size: min(20px, 2.2vh);
        margin-bottom: min(8px, 1vh);
    }
    
    .modal-text h3 {
        font-size: min(20px, 2.2vh);
        margin-bottom: min(4px, 0.5vh);
    }
    
    .modal-text p {
        font-size: min(12px, 1.3vh);
        margin-bottom: min(10px, 1.1vh);
        line-height: 1.4;
    }
    
    .modal-form {
        gap: min(10px, 1.1vh);
    }
    
    .modal-form label {
        font-size: min(11px, 1.2vh);
        gap: min(4px, 0.5vh);
    }
    
    .modal-form input {
        padding: min(10px, 1.1vh) min(12px, 1.3vw);
        font-size: min(13px, 1.4vh);
    }
    
    .modal-submit {
        padding: min(12px, 1.3vh);
        font-size: min(14px, 1.5vh);
    }
    
    .modal-button-google {
        padding: min(12px, 1.3vh);
        font-size: min(14px, 1.5vh);
        gap: min(8px, 0.9vh);
    }
    
    .modal-button-google .google-icon {
        width: min(18px, 1.9vh);
        height: min(18px, 1.9vh);
    }
    
    .modal-divider {
        margin: min(12px, 1.3vh) 0;
        font-size: min(11px, 1.2vh);
    }
    
    .modal-hint {
        font-size: min(11px, 1.2vh);
        margin-top: min(8px, 0.9vh);
    }
}

/* Очень низкие экраны */
@media (max-height: 500px) {
    .modal-content {
        padding: min(16px, 2vh);
        gap: min(12px, 1.5vh);
        max-height: calc(100vh - 1vh);
    }
    
    .modal-cover {
        height: min(80px, 12vh);
        min-height: min(60px, 8vh);
    }
    
    .modal-avatar {
        width: min(48px, 5vh);
        height: min(48px, 5vh);
        min-width: min(48px, 5vh);
        min-height: min(48px, 5vh);
        font-size: min(18px, 2vh);
        margin-bottom: min(6px, 0.8vh);
    }
    
    .modal-text h3 {
        font-size: min(18px, 2vh);
    }
    
    .modal-text p {
        font-size: min(11px, 1.2vh);
        margin-bottom: min(8px, 1vh);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .modal-form {
        gap: min(8px, 1vh);
    }
    
    .modal-form label {
        font-size: min(10px, 1.1vh);
    }
    
    .modal-form input {
        padding: min(8px, 1vh) min(10px, 1.2vw);
        font-size: min(12px, 1.3vh);
    }
    
    .modal-submit {
        padding: min(10px, 1.1vh);
        font-size: min(13px, 1.4vh);
    }
    
    .modal-button-google {
        padding: min(10px, 1.1vh);
        font-size: min(13px, 1.4vh);
    }
}

/* Paywall styles */
.glass {
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.countdown-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.plan-option {
    transition: all 0.3s ease;
}

.plan-option.selected {
    border-color: #a855f7 !important;
}

.payment-btn {
    transition: all 0.3s ease;
}

.payment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Mobile paywall adjustments */
@media (max-width: 1024px) {
    #paywall-modal .glass {
        max-width: 95vw;
    }
}

/* Mobile adjustments for style title */
@media (max-width: 768px) {
    .style-title {
        font-size: 32px;
        letter-spacing: 2px;
        top: 140px;
        transform: translateX(-50%);
    }
    
    .style-label {
        margin-top: 16px;
    }
}
