/* ===== СТИЛИ РАЗДЕЛА PROFILE: профиль, авторизация/регистрация, депозит, баланс ===== */



/* Hide top header on deposit screens */
.view-container.deposit-view ~ .top-header,
#view-deposit-ton.deposit-view ~ .top-header,
#view-deposit-stars.deposit-view ~ .top-header {
    display: none !important;
}



.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 16px 16px;
    position: relative;
}



.lang-switch-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}



.lang-switch-btn:active {
    background: rgba(255, 255, 255, 0.2);
}



.lang-code {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}



.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    margin: 0 auto;
    background: #1c1c1e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 38px;
    font-weight: 700;
    overflow: hidden;
    position: relative;
    border: none;
}



.profile-avatar.has-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: transparent;
}



.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-top: 4px;
}



.profile-divider {
    display: none;
}



.profile-stats {
    width: 100%;
    max-width: 420px;
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-top: 16px;
    justify-items: center;
    text-align: center;
    background-color: #212020;
    box-shadow: var(--glass-shadow);
    border-radius: 99em;
}



.profile-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    padding: 12px 8px;
    background: transparent;
    border-radius: 99em;
    width: 100%;
}



.profile-stat-hidden {
    display: none;
}



.profile-stat-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 18px;
    font-weight: 700;
    justify-content: center;
    color: currentColor;
}



.profile-stat-label {
    font-size: 10px;
    color: currentColor;
    font-weight: 500;
    opacity: 0.7;
}



.profile-ton-icon {
    color: currentColor;
}



.profile-stat-icon {
    color: currentColor;
    font-size: 16px;
}



.profile-register-btn {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 14px 18px;
    border: none;
    border-radius: 99em;
    background-color: #212020;
    box-shadow: var(--glass-shadow);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}



.profile-register-btn:first-of-type {
    margin-top: 4px;
}



.profile-register-btn:not(:first-of-type) {
    margin-top: -4px;
}



.profile-register-btn:active {
    transform: scale(0.97);
    background-color: #1a1a1a;
}



.referral-banner {
    width: 100%;
    max-width: 420px;
    margin-top: 16px;
    padding: 16px;
    border-radius: 24px;
    background-color: #212020;
    box-shadow: var(--glass-shadow);
    border: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}



.referral-banner-left {
    display: flex;
    gap: 14px;
    align-items: center;
}



.referral-banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 99em;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    flex-shrink: 0;
}



.referral-banner-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}



.referral-banner-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}



.referral-banner-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    line-height: 1.4;
}



.referral-banner-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}



.referral-item {
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 12px 14px;
    border-radius: 99em;
}



.referral-item-icon {
    font-size: 18px;
    color: #22c55e;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}



/* star */
.referral-item:nth-child(2) .referral-item-icon {
    color: #fbbf24;
}



/* cashback */
.referral-item:nth-child(3) .referral-item-icon {
    color: #2AABEE;
}



/* promo */
.referral-item:nth-child(4) .referral-item-icon {
    color: #f97316;
}



.referral-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}



.referral-item-title {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}



.referral-item-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    line-height: 1.35;
}



.referral-divider {
    display: none;
}



.referral-cta-btn {
    width: 100%;
    margin-top: 4px;
    padding: 14px 16px;
    border: none;
    border-radius: 99em;
    background: var(--primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}



/* Simple referral banner */
.referral-banner-simple {
    width: 100%;
    max-width: 420px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}



.referral-simple-row {
    display: flex;
    align-items: center;
    gap: 12px;
}



.referral-simple-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}



.referral-simple-text {
    flex: 1;
    min-width: 0;
}



.referral-simple-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}



.referral-simple-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    line-height: 1.35;
    margin-top: 2px;
}



.referral-simple-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s;
}



.referral-simple-btn:active {
    opacity: 0.8;
}



.referral-cta-btn:active {
    transform: scale(0.97);
    background: #1a6fd9;
}



.profile-avatar-btn {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 99em;
    height: var(--tabbar-height);
    width: var(--tabbar-height);
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    border: none;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease;
    position: relative;
}



.profile-avatar-btn:active {
    transform: scale(0.94);
}



.profile-avatar-img {
    width: 80%;
    height: 80%;
    object-fit: cover;
    border-radius: 99em;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    display: block;
    margin: auto;
    padding: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}



.profile-avatar-btn.active .profile-avatar-img {
    border: 2px solid var(--primary);
}



.deposit-drawer {
    padding-bottom: calc(16px + var(--safe-area-bottom));
}



.deposit-amount-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
    width: 100%;
}



.deposit-amount-input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    width: 100%;
    max-width: 200px;
    padding: 0;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;
}



.deposit-amount-input::-webkit-outer-spin-button,
.deposit-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}



.deposit-currency {
    font-size: 18px;
    font-weight: 600;
    color: #9ca3af;
    margin-top: 8px;
}



.deposit-presets {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}



.deposit-preset-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 99em;
    padding: 12px 20px;
    box-shadow: var(--glass-shadow);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    min-width: 60px;
}



.deposit-preset-btn:active {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(0.95);
}



.deposit-preset-btn.active {
    background: #007aff;
    border-color: #007aff;
}



.deposit-view {
    padding-top: 0 !important;
}



.deposit-view .deposit-page {
    min-height: 100vh;
    padding: 16px;
    padding-top: calc(16px + var(--safe-area-top));
    padding-bottom: calc(100px + var(--safe-area-bottom));
    background: transparent;
}



body.mobile-fullscreen .deposit-view .deposit-page {
    padding-top: calc(20px + var(--tg-safe-area-top, 0px) + var(--tg-content-safe-area-top, 0px));
}



.deposit-banner {
    position: relative;
    border-radius: 24px;
    padding: 24px;
    overflow: hidden;
    margin-bottom: 24px;
}



.deposit-banner-ton {
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 50%, #004488 100%);
}



.deposit-banner-stars {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
}



.deposit-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}



.deposit-banner-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}



.deposit-banner-ton .deposit-banner-circle {
    background: #ffffff;
}



.deposit-banner-stars .deposit-banner-circle {
    background: #ffffff;
}



.deposit-banner-circle-1 {
    width: 200px;
    height: 200px;
    top: -80px;
    right: -60px;
}



.deposit-banner-circle-2 {
    width: 120px;
    height: 120px;
    bottom: -40px;
    left: -30px;
}



.deposit-decor-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}



.deposit-decor-icon svg {
    width: 100%;
    height: 100%;
}



.deposit-decor-icon.decor-1 {
    width: 18px;
    height: 18px;
    top: 20px;
    left: 15%;
    transform: rotate(-15deg);
}



.deposit-decor-icon.decor-2 {
    width: 14px;
    height: 14px;
    top: 35%;
    right: 10%;
    transform: rotate(10deg);
}



.deposit-decor-icon.decor-3 {
    width: 16px;
    height: 16px;
    bottom: 35%;
    left: 8%;
    transform: rotate(-25deg);
}



.deposit-decor-icon.decor-4 {
    width: 12px;
    height: 12px;
    top: 25%;
    left: 5%;
    transform: rotate(20deg);
}



.deposit-decor-icon.decor-5 {
    width: 15px;
    height: 15px;
    bottom: 25%;
    right: 5%;
    transform: rotate(-10deg);
}



.deposit-banner-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}



.deposit-banner-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #ffffff;
}



.deposit-banner-icon svg {
    width: 48px;
    height: 48px;
}



.deposit-banner-icon .lottie-star-container {
    width: 56px;
    height: 56px;
}



.deposit-banner-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
}



.deposit-banner-amount {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}



.deposit-stars-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}



.deposit-banner-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
}



.deposit-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 99em;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}



.deposit-action-primary {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
}



.deposit-action-primary:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.85);
}



.deposit-action-secondary {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-shadow: var(--glass-shadow);
}



.deposit-action-secondary:active {
    transform: scale(0.98);
    background-color: rgba(255, 255, 255, 0.18);
}



.deposit-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    margin-top: 24px;
    padding: 0 16px;
}



.deposit-history-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}



.deposit-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 99em;
    padding: 10px 16px;
    box-shadow: var(--glass-shadow);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}



.deposit-filter-btn:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.18);
}



.deposit-filter-btn svg {
    color: #9ca3af;
}



.deposit-history-list {
    min-height: 200px;
    padding: 0 16px;
}



.deposit-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
}



.deposit-history-empty i {
    font-size: 48px;
    color: #3a3a3c;
    margin-bottom: 16px;
}



.deposit-history-empty p {
    font-size: 15px;
    color: #636366;
    margin: 0;
}



.deposit-transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #2c2c2e;
}



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



.deposit-transaction-left {
    display: flex;
    align-items: center;
    gap: 12px;
}



.deposit-transaction-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}



.deposit-transaction-icon.income {
    background: rgba(52, 199, 89, 0.15);
    color: #34c759;
}



.deposit-transaction-icon.outcome {
    background: rgba(255, 69, 58, 0.15);
    color: #ff453a;
}



.deposit-transaction-info {
    display: flex;
    flex-direction: column;
}



.deposit-transaction-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}



.deposit-transaction-date {
    font-size: 13px;
    color: #636366;
    margin-top: 2px;
}



.deposit-transaction-right {
    text-align: right;
}



.deposit-transaction-amount {
    font-size: 16px;
    font-weight: 600;
}



.deposit-transaction-amount.income {
    color: #34c759;
}



.deposit-transaction-amount.outcome {
    color: #ff453a;
}



.deposit-transaction-status {
    font-size: 12px;
    color: #636366;
    margin-top: 2px;
}



.registration-auth-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 0 20px;
    padding-top: env(safe-area-inset-top, 0px);
}



.auth-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0;
}



.auth-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}



.auth-animation-container {
    width: 160px;
    height: 160px;
    margin: -10px auto 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
    box-sizing: border-box;
}



.auth-step {
    display: none;
    width: 100%;
    animation: authFadeIn 0.4s ease;
}



.auth-step.active {
    display: block;
}



.auth-description {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.5;
}



.auth-description-bold {
    font-weight: 600;
    color: #ffffff;
    font-size: 16px;
}



.auth-btn-primary {
    width: 100%;
    padding: 16px 24px;
    border-radius: 16px;
    background: #8774e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}



.auth-btn-primary:hover {
    background: #6d5bc7;
    border-color: rgba(255, 255, 255, 0.15);
}



.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}



.auth-btn-primary:active:not(:disabled) {
    transform: scale(0.98);
    opacity: 0.9;
}



.auth-btn-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}



.code-input-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    margin: 24px 0 32px;
    align-items: center;
    width: 100%;
}



.code-input-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}



.code-digit {
    width: 48px;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}



.code-digit:not(:placeholder-shown) {
    border-color: rgba(135, 116, 225, 0.5) !important;
    background: rgba(135, 116, 225, 0.08);
}



.code-digit:focus {
    border: 1px solid #2307d1 !important;
    outline: none;
}



.auth-status {
    display: none !important;
}
