:root {
    --card-bg-color: #212121;       
    --card-border-color: #262626;   
    --title-size: 32;
    --card-radius: 25;
    --card-border-thickness: 0; /* Убрана обводка у плашек */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation; 
    -webkit-tap-highlight-color: transparent !important; /* Убирает подсветку при тапе на мобилках */
}

*:focus {
    outline: none !important; /* Полностью убирает контур у кнопок при фокусе */
}

html, body {
    background-color: #000000;
    color: #ffffff;
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
}

.preview-area {
    width: 100%;
    min-height: 100dvh;
    background-color: #000000;
    overflow-x: hidden; 
    overflow-y: visible;
    position: relative;
    display: block;
}

.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;
}

.glow-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1800px; 
    height: 100vh; 
    pointer-events: none;
    z-index: 1;
    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;
}

.content-wrapper {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 24px 24px 60px 24px;
    z-index: 2;
    position: relative; 
}

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

.back-btn {
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    text-decoration: none;
    margin-left: -4px;
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
    border: none;
    background: transparent;
}

.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;
    margin-bottom: 30px;
}

/* =========================================
   ИСПРАВЛЕННЫЕ ЗАГОЛОВКИ СЕКЦИЙ (АККАУНТ, БЕЗОПАСНОСТЬ)
   ========================================= */
.section-title {
    font-size: 16px;            /* Размер как у описания */
    color: #b5b5b5;             /* Серый цвет */
    font-weight: 400;           /* Убрана жирность */
    line-height: 1.35;
    margin-left: 6px;           /* Небольшой отступ слева для красоты */
    margin-bottom: 8px;         /* Отступ до карточки */
    margin-top: 24px;           /* Отступ от предыдущей карточки */
}

/* Для самого первого заголовка убираем отступ сверху, так как у описания он уже есть */
.section-title:first-of-type {
    margin-top: 0px;
}

.settings-group {
    background-color: var(--card-bg-color);
    border: none; /* Убрана обводка */
    border-radius: calc(var(--card-radius) * 1px);
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px; 
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
}

.settings-item:active {
    background-color: #2a2a2a;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item.double-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    cursor: default;
}
.settings-item.double-line:active { 
    background-color: transparent; 
}

.settings-value {
    color: #888888;
    font-size: 14px;
    font-weight: 400;
}

.settings-icon-right {
    width: 18px;
    height: 18px;
    color: #777777;
}

/* ИСПРАВЛЕНО: Стилизация красной кнопки выхода */
.settings-item.text-red, .settings-icon-right.text-red {
    color: #FF4D4D !important;
}

/* =========================================
   ЦЕНТРАЛЬНОЕ ОКНО С ИДЕАЛЬНОЙ МАСКОЙ
   ========================================= */
.modal-overlay {
    position: fixed;
    inset: 0; 
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center; 
    z-index: 9999; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    padding: 24px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 310px; 
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.2, 0.85, 0.3, 1.05);
}

.modal-overlay.active .modal-content-wrapper {
    transform: scale(1);
}

.qr-card-wrapper {
    position: relative;
    width: 100%;
    margin-top: 30px; 
}

.qr-logo {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 64px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ИДЕАЛЬНАЯ МАСКА (Как в QR) */
.qr-card {
    background-color: #ffffff;
    border-radius: 0 0 24px 24px;
    padding: 50px 24px 30px 24px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    
    -webkit-mask-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 310 50' preserveAspectRatio='none'%3E%3Cpath d='M0,24 C0,10.745 10.745,0 24,0 L105,0 C115,0 118,10 123,16 A36,36 0 0,0 187,16 C192,10 195,0 205,0 L286,0 C299.255,0 310,10.745 310,24 L310,50 L0,50 Z' fill='black'/%3E%3C/svg%3E"),
        linear-gradient(black, black);
    -webkit-mask-size: 100% 50px, 100% calc(100% - 49px);
    -webkit-mask-position: top center, bottom center;
    -webkit-mask-repeat: no-repeat;
    
    mask-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 310 50' preserveAspectRatio='none'%3E%3Cpath d='M0,24 C0,10.745 10.745,0 24,0 L105,0 C115,0 118,10 123,16 A36,36 0 0,0 187,16 C192,10 195,0 205,0 L286,0 C299.255,0 310,10.745 310,24 L310,50 L0,50 Z' fill='black'/%3E%3C/svg%3E"),
        linear-gradient(black, black);
    mask-size: 100% 50px, 100% calc(100% - 49px);
    mask-position: top center, bottom center;
    mask-repeat: no-repeat;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 8px;
    text-align: center;
}

.qr-desc {
    font-size: 13px;
    color: #666666;
    text-align: center;
    line-height: 1.4;
    margin: 0;
}

.qr-desc b {
    color: #000000;
}

.qr-actions-row {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 16px;
}

.qr-action-btn {
    flex: 1;
    background-color: #ffffff;
    color: #000000;
    border: none !important;
    outline: none !important;
    border-radius: 100px;
    height: 48px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    text-decoration: none;
}

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