:root {
    /* Цвета фона и карточек */
    --card-bg-color: #0f1214;       
    --card-border-color: #262626;   
    
    /* Скругление карточек (34px) */
    --card-radius: 34;
    --grid-margin-top: 24;
    --frame-width: 520px;
    
    /* Текст карточки */
    --title-size: 32;
    --card-title-size: 18;
    --card-desc-size: 14;

    /* Инпут ключа и кнопки */
    --link-box-radius: 100;
    --link-pad-x: 16;
    --link-pad-y: 10;
    --link-font-size: 15;
}

html {
    scroll-behavior: smooth;
    background-color: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent !important; 
    touch-action: manipulation; 
}

*:focus {
    outline: none !important; 
}

/* Корневые элементы с центрированием */
html, body {
    background-color: #000000;
    color: #ffffff;
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

body.no-scroll {
    overflow: hidden !important;
    touch-action: none !important;
    overscroll-behavior-y: none !important; 
}

.prevent-select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.allow-select {
    -webkit-touch-callout: default !important;
    -webkit-user-select: all !important; 
    -khtml-user-select: all !important;
    -moz-user-select: all !important;
    -ms-user-select: all !important;
    user-select: all !important;
    cursor: text;
}

/* МОБИЛЬНЫЙ ФРЕЙМ */
.preview-area {
    width: 100%;
    max-width: var(--frame-width);
    min-height: 100dvh;
    background-color: #000000;
    overflow-x: hidden; 
    overflow-y: visible;
    position: relative;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* ОРИГИНАЛЬНЫЙ 1800px ВЕРХНИЙ ГРАДИЕНТ СТРАНИЦЫ */
.glow-container {
    position: absolute !important; 
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1800px; 
    height: 100vh;
    pointer-events: none;
    z-index: 0; 
    background-image: 
        radial-gradient(ellipse 484px 244px at calc(50% - 323px) -7px, rgba(0, 217, 255, 1) 0%, rgba(0, 217, 255, 0) 100%),
        radial-gradient(ellipse 484px 244px at calc(50% + 323px) -7px, rgba(0, 255, 225, 1) 0%, rgba(0, 255, 225, 0) 100%);
    background-repeat: no-repeat;
}

/* ПОЛНЫЙ БЛЮР ВСЕГО КОНТЕНТА */
.blur-overlay {
    position: fixed;
    inset: 0; 
    background: rgba(0, 0, 0, 0.55); 
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 50; 
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(0); 
    will-change: opacity;
}

.blur-overlay.active {
    opacity: 1;
    pointer-events: auto; 
}

/* КОНТЕНТНЫЙ КОНТЕЙНЕР */
.content-wrapper {
    width: 100%;
    padding: 24px 24px 120px 24px;
    position: relative;
    flex: 1;
}

.header-nav {
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.back-btn {
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    text-decoration: none;
    outline: none !important;
    border: none;
    background: transparent;
    transition: transform 0.15s ease;
}

.back-btn:active {
    transform: scale(0.9);
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

.main-title {
    font-size: calc(var(--title-size) * 1px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    line-height: 1.1;
}

.main-desc {
    color: #b5b5b5;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
}

/* СЕЛЕКТОР ВЫБОРА ОС */
.os-custom-select-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 16px;
    z-index: 20; 
}

.os-custom-select-wrapper.active {
    z-index: 100 !important;
}

/* ГЛАВНАЯ КНОПКА С ПЛАВНЫМ СЖАТИЕМ */
.os-custom-select {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff;
    border-radius: 100px !important;
    padding: 9px 18px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2), background-color 0.2s ease, border-color 0.2s ease;
    outline: none !important;
    user-select: none;
    will-change: transform;
}

.os-custom-select:active,
.os-custom-select-wrapper.active .os-custom-select {
    transform: scale(0.95);
    background-color: rgba(255, 255, 255, 0.14) !important;
}

.os-select-arrow {
    width: 10px;
    height: 6px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.os-custom-select-wrapper.active .os-select-arrow {
    transform: rotate(180deg);
}

/* ВЫПАДАЮЩЕЕ МЕНЮ (ПОЛУПРОЗРАЧНОЕ СТЕКЛО) */
.os-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 160px; 
    background-color: rgba(20, 25, 32, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 26px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform-origin: top left;
    transform: scale(0.92) translateY(-8px);
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.25), visibility 0.22s;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
    will-change: transform, opacity;
    z-index: 1000 !important; 
    touch-action: none;
}

.os-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

/* СКРУГЛЕННЫЕ ПУНКТЫ-КАПСУЛЫ */
.os-option {
    padding: 9px 18px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 100px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.os-option:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* АКТИВНЫЙ ВЫБРАННЫЙ ПУНКТ */
.os-option.selected {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-weight: 600;
    transform: scale(1.02);
}

.os-option:active {
    transform: scale(0.96);
}

/* СПИСОК ШАГОВ И КАРТОЧКИ */
.instruction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: calc(var(--grid-margin-top) * 1px);
}

.step-card, .key-card {
    background-color: var(--card-bg-color);
    border-radius: calc(var(--card-radius) * 1px); /* 34px */
    position: relative;
    overflow: hidden;
    border: none;
    z-index: 1;
}

.step-card {
    padding: 22px 24px;
    display: flex;
    align-items: center;
}

.key-card {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* СЕТКА LINEBG */
.step-card::after, .key-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('https://raw.githubusercontent.com/Aimpok/Zelloicons/refs/heads/main/linebg.png');
    background-size: cover !important;
    background-position: center !important;
    mix-blend-mode: screen;
    opacity: 0.85;
    z-index: 2;
    pointer-events: none;
}

/* КОНТЕНТ КАРТОЧЕК */
.step-text-content, .key-card-header, .key-actions-row {
    position: relative;
    z-index: 4;
}

.step-text-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: 85px; 
    width: auto;
}

.step-card-title {
    font-size: calc(var(--card-title-size) * 1px);
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
    color: #ffffff;
}

.step-card-desc {
    font-size: calc(var(--card-desc-size) * 1px);
    color: #b5b5b5;
    font-weight: 400;
    line-height: 1.35;
}

/* 3D ИКОНКИ ШАГОВ */
.step-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    height: 100px;
    z-index: 3;
    pointer-events: none;
    object-fit: contain;
}

.key-card-header {
    display: flex;
    flex-direction: column;
}

.key-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 2px;
}

/* КНОПКИ СКАЧИВАНИЯ И КОПИРОВАНИЯ */
.zello-btn {
    background-color: #ffffff;
    border: none !important;
    outline: none !important;
    border-radius: calc(var(--link-box-radius) * 1px);
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.15s;
    box-sizing: border-box !important;
    text-decoration: none;
    margin: 0;
    flex-shrink: 0;
    overflow: hidden;
}

.zello-btn:active {
    transform: scale(0.96);
    opacity: 0.85;
}

.zello-btn span {
    font-size: calc(var(--link-font-size) * 1px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: normal;
}

.btn-download {
    margin-top: 14px;
    padding: 0 28px !important;
    width: max-content;
    align-self: flex-start; 
}

.btn-download span {
    font-weight: 600;
}

.btn-copy {
    flex-grow: 1;
    min-width: 0; 
    padding: 0 calc(var(--link-pad-x) * 1px) !important;
    gap: 8px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.btn-copy span {
    font-weight: 500;
    width: 100%;
    text-align: left;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block;
    min-width: 0; 
}

.key-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block;
    min-width: 0;
    max-width: 100%;
}

.btn-copy svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.qr-btn {
    background-color: #ffffff;
    border: none !important;
    outline: none !important;
    border-radius: 50%;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000000;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.15s;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}

.qr-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}
