/* Loading Screen */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--separator);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-screen p {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 15px;
}

/* Header - Liquid Glass Navbar Style */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 6px 0;
    background: var(--bg-primary);
    border-bottom: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-content {
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* Profile Toggle - Chap */
.header-profile-toggle {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 4px;
    padding-right: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-profile-toggle:active {
    transform: scale(0.96);
    opacity: 0.9;
}

.header-toggle-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #5856d6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.header-toggle-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-toggle-arrow {
    font-size: 22px;
    color: var(--text-secondary);
    margin-left: 8px;
    font-weight: 300;
}

/* Balance Toggle - O'ng */
.header-balance-toggle {
    display: flex;
    align-items: center;
}

.header-balance-filled {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 4px 4px 4px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-balance-filled:active {
    transform: scale(0.96);
    opacity: 0.9;
}

.header-balance-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 8px;
}

.header-balance-plus {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 400;
}

.header-balance-empty {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-balance-empty:active {
    transform: scale(0.96);
    opacity: 0.9;
}

/* Eski header classlar - deprecated */
.header-profile-block {
    display: none;
}

.header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #5856d6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-user-info {
    display: none;
}

.header-username {
    display: none;
}

.header-userid {
    display: none;
}

/* Settings Buttons */
.header-settings {
    display: flex;
    gap: 6px;
}

.header-setting-btn {
    width: 44px;
    height: 100%;
    min-height: 44px;
    border-radius: 14px;
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

[data-theme="dark"] .header-setting-btn {
    background: var(--glass-bg-card);
}

.header-setting-btn:active {
    transform: scale(0.92);
    background: var(--accent-light);
}

.header-setting-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

/* Theme toggle icons - yorug' rejimda quyosh, qorong'ida oy */
.header-setting-btn .theme-icon-dark {
    display: none;
}

.header-setting-btn .theme-icon-light {
    display: block;
}

[data-theme="dark"] .header-setting-btn .theme-icon-light {
    display: none;
}

[data-theme="dark"] .header-setting-btn .theme-icon-dark {
    display: block;
}

/* Old header styles - hide */
.user-info,
.user-details,
.header-actions,
.header-btn,
.avatar,
#user-avatar {
    display: none !important;
}

/* Pages */
.page {
    display: none;
    width: 90%;
    margin: 0 auto;
    padding: 8px 0;
    padding-bottom: calc(var(--nav-height) + 20px);
    min-height: 0;
    opacity: 0;
    transform: translateY(8px);
    position: relative;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: pageSlideIn 0.25s ease-out;
}

@keyframes pageSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(8px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* Glass Cards - High Contrast */
.glass-card {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

[data-theme="dark"] .glass-card {
    background: var(--glass-bg-card);
    border-color: var(--glass-border);
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, var(--accent), #5856d6);
    border-radius: 20px;
    padding: 24px;
    color: white;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

/* Home Balance Card */
.home-balance-card {
    background: linear-gradient(135deg, var(--accent), #5856d6);
    border-radius: 20px;
    padding: 18px 20px;
    color: white;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-left .balance-label {
    font-size: 12px;
    opacity: 0.9;
    display: block;
    margin-bottom: 4px;
    color: rgba(255,255,255,0.9);
}

.balance-left .balance-value {
    font-size: 22px;
    font-weight: 700;
    color: white;
}

.balance-topup-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.balance-topup-btn:active {
    transform: scale(0.92);
    background: rgba(255,255,255,0.3);
}

.balance-topup-btn svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Home Actions - High Contrast */
.home-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-action-card {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

[data-theme="dark"] .home-action-card {
    background: var(--glass-bg-card);
}

.home-action-card:active {
    transform: scale(0.98);
    background: var(--accent-light);
}

.home-action-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.home-action-card.disabled:active {
    transform: none;
    background: var(--glass-bg-card);
}

.home-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-action-icon.stars {
    background: linear-gradient(135deg, #ffcc00, #ff9500);
}

.home-action-icon.premium {
    background: linear-gradient(135deg, #5856d6, #af52de);
}

.home-action-icon.gift {
    background: linear-gradient(135deg, #ff2d55, #ff375f);
}

.home-action-icon svg {
    width: 26px;
    height: 26px;
    color: white;
}

.home-action-info {
    flex: 1;
}

.home-action-title {
    font-size: 17px;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.home-action-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.home-action-arrow {
    color: var(--text-tertiary);
}

.home-action-arrow svg {
    width: 20px;
    height: 20px;
}

.home-action-badge {
    background: var(--text-tertiary);
    color: var(--bg-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* Profile Stats Row */
.profile-stats-row {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-amount));
    border-radius: 16px;
    border: 0.5px solid var(--separator);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 16px;
}

.profile-stat-item {
    text-align: center;
    flex: 1;
}

.profile-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.profile-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--separator);
}

/* Home Stats Section */
.home-stats-section {
    margin-top: 20px;
}

.section-title-small {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
}

.home-quick-stats {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.quick-stat {
    flex: 1;
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 16px;
    text-align: center;
}

[data-theme="dark"] .quick-stat {
    background: var(--glass-bg-card);
}

.quick-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.quick-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}

/* Top Page */
.top-tabs {
    display: flex;
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    padding: 4px;
    margin-bottom: 16px;
}

[data-theme="dark"] .top-tabs {
    background: var(--glass-bg-card);
}

.top-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.top-tab.active {
    background: rgba(255, 255, 255, 0.5);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .top-tab.active {
    background: rgba(255, 255, 255, 0.15);
}

.top-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top-loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.top-item {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

[data-theme="dark"] .top-item {
    background: var(--glass-bg-card);
}

.top-item.me {
    border-color: var(--accent);
    background: rgba(0, 122, 255, 0.12);
}

[data-theme="dark"] .top-item.me {
    background: rgba(10, 132, 255, 0.18);
}

.top-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.top-rank.gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.top-rank.silver {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    color: white;
}

.top-rank.bronze {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
    color: white;
}

.top-rank.normal {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.top-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #5856d6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.top-info {
    flex: 1;
    min-width: 0;
}

.top-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-username {
    font-size: 12px;
    color: var(--text-secondary);
}

.top-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
    text-align: right;
}

.top-value small {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.top-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

/* Top icon color */
.home-action-icon.top {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.welcome-card::before {
    content: 'вњ“';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.welcome-card h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.welcome-card p {
    opacity: 0.9;
    font-size: 14px;
    line-height: 1.4;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 16px;
    text-align: center;
}

[data-theme="dark"] .stat-card {
    background: var(--glass-bg-card);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Action Buttons Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.action-card {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

[data-theme="dark"] .action-card {
    background: var(--glass-bg-card);
}

.action-card:active {
    transform: scale(0.97);
    background: var(--accent-light);
}

[data-theme="dark"] .action-card:active {
    background: var(--accent-light);
}

.action-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon.stars {
    background: linear-gradient(135deg, #ffcc00, #ff9500);
}

.action-icon.premium {
    background: linear-gradient(135deg, #5856d6, #af52de);
}

.action-icon.topup {
    background: linear-gradient(135deg, #34c759, #30d158);
}

.action-icon.gift {
    background: linear-gradient(135deg, #ff2d55, #ff375f);
}

.action-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.action-card span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
}

.section-link {
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
}

/* Amount Grid */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.amount-btn {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: 2px solid transparent;
    border-radius: 18px;
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--glass-shadow);
}

[data-theme="dark"] .amount-btn {
    background: var(--glass-bg-card);
}

.amount-btn:active {
    transform: scale(0.96);
}

.amount-btn.selected {
    border-color: var(--accent);
    background: rgba(0, 122, 255, 0.15);
}

[data-theme="dark"] .amount-btn.selected {
    background: rgba(10, 132, 255, 0.2);
}

.amount-btn .stars-count {
    font-size: 18px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.amount-btn .price {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Stars List - New Style */
.stars-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.stars-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--glass-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--glass-shadow);
}

.stars-list-item:active {
    transform: scale(0.98);
}

.stars-list-item.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}

.stars-list-amount {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.stars-list-price {
    font-size: 14px;
    color: var(--text-secondary);
    flex: 1;
    text-align: right;
    margin-right: 12px;
}

.stars-list-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--separator);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.stars-list-item.selected .stars-list-check {
    background: var(--accent);
    border-color: var(--accent);
}

.stars-list-check svg {
    width: 14px;
    height: 14px;
    color: transparent;
}

.stars-list-item.selected .stars-list-check svg {
    color: white;
}

/* Toggle Button */
.stars-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1.5px dashed var(--separator);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.stars-toggle-btn:active {
    background: var(--accent-light);
}

.stars-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   STARS/SUM INPUT MODE TOGGLE
   ======================================== */
.input-mode-wrapper {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    padding: 12px;
    margin-bottom: 16px;
}

[data-theme="dark"] .input-mode-wrapper {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.input-mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.input-mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="dark"] .input-mode-btn {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
}

.input-mode-btn.active {
    background: var(--accent);
    color: white;
}

.input-mode-btn svg {
    width: 16px;
    height: 16px;
}

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

.custom-input-new {
    flex: 1;
    padding: 14px 16px;
    border: 1.5px solid var(--separator);
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-align: center;
    transition: all 0.2s;
}

[data-theme="dark"] .custom-input-new {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.custom-input-new:focus {
    outline: none;
    border-color: var(--accent);
}

.custom-input-new::placeholder {
    color: var(--text-tertiary);
}

.input-result {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 100px;
}

.result-label {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 2px;
}

.result-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

/* Custom Input */
.custom-input-wrapper {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 4px;
    margin-bottom: 12px;
}

[data-theme="dark"] .custom-input-wrapper {
    background: var(--glass-bg-card);
}

.custom-input {
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    font-size: 17px;
    color: var(--text-primary);
    outline: none;
}

.custom-input::placeholder {
    color: var(--text-tertiary);
}

.price-display {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

[data-theme="dark"] .price-display {
    background: var(--glass-bg-card);
}

.price-label {
    font-size: 15px;
    color: var(--text-secondary);
}

.price-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

/* Username Input */
.username-wrapper {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 0.5px solid var(--separator);
    padding: 4px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.username-input {
    flex: 1;
    padding: 14px 16px;
    background: transparent;
    border: none;
    font-size: 17px;
    color: var(--text-primary);
    outline: none;
}

.for-me-btn {
    padding: 10px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 4px;
    transition: transform 0.2s;
}

.for-me-btn:active {
    transform: scale(0.95);
}

/* User Preview */
.user-preview {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 0.5px solid var(--separator);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.user-preview img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.user-preview .user-avatar-letter {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #5856d6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.user-preview img.hidden + .user-avatar-letter {
    display: flex;
}

.user-preview img:not(.hidden) + .user-avatar-letter {
    display: none;
}

.user-preview-info {
    flex: 1;
}

.user-preview-name {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-preview-username {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
}

.user-preview-check {
    width: 24px;
    height: 24px;
    color: var(--success);
}

.user-preview.loading {
    opacity: 0.6;
}

.user-preview.error {
    border-color: var(--danger);
    background: rgba(255, 59, 48, 0.1);
}

/* Premium Plans - Liquid Glass */
.plans-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.plan-card {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: 2px solid transparent;
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

[data-theme="dark"] .plan-card {
    background: var(--glass-bg-card);
}

.plan-card:active {
    transform: scale(0.98);
}

.plan-card.selected {
    border-color: var(--accent);
    background: rgba(0, 122, 255, 0.15);
}

[data-theme="dark"] .plan-card.selected {
    background: rgba(10, 132, 255, 0.2);
}

.plan-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.plan-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #5856d6, #af52de);
    display: flex;
    align-items: center;
    justify-content: center;
}

.plan-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.plan-duration {
    font-size: 17px;
    font-weight: 600;
}

.plan-price {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent);
}

.plan-badge {
    position: absolute;
    top: -8px;
    right: 16px;
    background: linear-gradient(135deg, #ff9500, #ff2d55);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
}

/* Admin Plan Card - 1 oylik */
.plan-card-admin {
    border: 1px dashed var(--separator);
    background: var(--glass-bg-light);
}

.plan-card-admin .plan-icon {
    background: linear-gradient(135deg, #8e8e93, #636366);
}

.plan-card-admin .admin-contact {
    color: var(--accent);
    font-weight: 500;
}

[data-theme="dark"] .plan-card-admin {
    border-color: var(--separator);
}

/* Primary Button */
.primary-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.primary-btn:active {
    transform: scale(0.98);
}

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

/* Bottom Sheet Modal - Liquid Glass */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-sheet {
    background: var(--glass-bg-card);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 500px;
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

[data-theme="dark"] .modal-sheet {
    background: rgba(50, 50, 55, 0.7);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-handle {
    width: 36px;
    height: 5px;
    background: rgba(150, 150, 155, 0.5);
    border-radius: 3px;
    margin: 8px auto 0;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 0.5px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal-close svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.modal-body {
    padding: 20px;
}

/* Payment Methods - Liquid Glass */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-method {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: 2px solid transparent;
    border-radius: 18px;
    box-shadow: var(--glass-shadow);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

[data-theme="dark"] .payment-method {
    background: var(--glass-bg-card);
}

.payment-method:active {
    transform: scale(0.98);
}

.payment-method.selected {
    border-color: var(--accent);
    background: rgba(0, 122, 255, 0.15);
}

[data-theme="dark"] .payment-method.selected {
    background: rgba(10, 132, 255, 0.2);
}

.payment-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-icon.balance {
    background: linear-gradient(135deg, #34c759, #30d158);
}

.payment-icon.click {
    background: linear-gradient(135deg, #007aff, #5856d6);
}

.payment-icon.uzcard {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
}

.payment-icon.paynet {
    background: linear-gradient(135deg, #00c853, #00a854);
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-icon.paynet img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.payment-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.payment-info {
    flex: 1;
}

.payment-name {
    font-size: 16px;
    font-weight: 600;
}

.payment-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.payment-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--separator);
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-method.selected .payment-check {
    background: var(--accent);
    border-color: var(--accent);
}

.payment-method.selected .payment-check svg {
    color: white;
}

/* UzCard Info */
.uzcard-details {
    background: var(--bg-glass);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.uzcard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 0.5px solid var(--separator);
}

.uzcard-row:last-child {
    border-bottom: none;
}

.uzcard-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.uzcard-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.uzcard-value span {
    font-size: 15px;
    font-weight: 600;
    font-family: 'SF Mono', 'Menlo', monospace;
    color: var(--text-primary);
}

.copy-btn {
    padding: 6px 10px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.warning-box {
    background: rgba(255, 59, 48, 0.12);
    border: 1px solid var(--danger);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.warning-box svg {
    width: 22px;
    height: 22px;
    color: var(--danger);
    flex-shrink: 0;
}

.warning-box p {
    font-size: 14px;
    color: var(--danger);
    line-height: 1.4;
}

/* Profile Page */
.profile-header {
    text-align: center;
    padding: 24px 0;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #5856d6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    font-weight: 600;
    margin: 0 auto 12px;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-username {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, var(--accent), #5856d6);
    border-radius: 20px;
    padding: 20px;
    color: white;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-info .balance-label {
    font-size: 13px;
    opacity: 0.9;
    color: rgba(255,255,255,0.9);
}

.balance-info .balance-value {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.topup-btn {
    padding: 10px 16px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Profile Menu - Liquid Glass */
.profile-menu {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    margin-bottom: 16px;
}

[data-theme="dark"] .profile-menu {
    background: var(--glass-bg-card);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 0.5px solid var(--glass-border);
    cursor: pointer;
    transition: background 0.2s;
}

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

.menu-item:active {
    background: var(--glass-bg-card);
}

[data-theme="dark"] .menu-item:active {
    background: var(--accent-light);
}

.menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.menu-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.menu-icon.blue { background: #007aff; }
.menu-icon.green { background: #34c759; }
.menu-icon.orange { background: #ff9500; }
.menu-icon.purple { background: #af52de; }
.menu-icon.red { background: #ff3b30; }
.menu-icon.pink { background: #ff2d55; }

.menu-text {
    flex: 1;
    font-size: 16px;
}

.menu-value {
    font-size: 15px;
    color: var(--text-secondary);
    margin-right: 8px;
}

.menu-arrow {
    color: var(--text-tertiary);
}

.menu-arrow svg {
    width: 16px;
    height: 16px;
}

/* History - Liquid Glass */
.history-tabs {
    display: flex;
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    padding: 4px;
    margin-bottom: 16px;
}

[data-theme="dark"] .history-tabs {
    background: var(--glass-bg-card);
}

.history-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.history-tab.active {
    background: rgba(255, 255, 255, 0.5);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .history-tab.active {
    background: rgba(255, 255, 255, 0.15);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    background: var(--glass-bg-card);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

[data-theme="dark"] .history-item {
    background: var(--glass-bg-card);
}

.history-item:active {
    transform: scale(0.98);
}

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

.history-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-icon.stars { 
    background: linear-gradient(135deg, #ffcc00, #ff9500); 
}

.history-icon.premium { 
    background: linear-gradient(135deg, #5856d6, #af52de); 
}

.history-icon.topup { 
    background: linear-gradient(135deg, #34c759, #30d158); 
}

.history-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.history-info .history-type {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.history-info .history-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.history-right {
    text-align: right;
}

.history-amount {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    margin-top: 4px;
    display: inline-block;
    font-weight: 500;
}

.history-status.success {
    background: rgba(52, 199, 89, 0.15);
    color: var(--success);
}

.history-status.pending {
    background: rgba(255, 149, 0, 0.15);
    color: var(--warning);
}

.history-status.failed {
    background: rgba(255, 59, 48, 0.15);
    color: var(--danger);
}

.history-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.history-empty svg {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(249, 249, 249, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 0.5px solid var(--separator);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 8px;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 100;
}

[data-theme="dark"] .bottom-nav {
    background: rgba(22, 22, 22, 0.75);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
    position: relative;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item.center {
    margin-top: -20px;
}

.nav-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item.center .nav-icon {
    width: 56px;
    height: 56px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.nav-item.center .nav-icon svg {
    color: white;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
}

/* Toast */
.toast {
    position: fixed;
    bottom: calc(var(--nav-height) + 20px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1001;
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast svg {
    width: 20px;
    height: 20px;
}

.toast.success { background: var(--success); color: white; }
.toast.error { background: var(--danger); color: white; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Theme Modal */
.theme-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theme-option {
    background: var(--bg-glass);
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-option.active {
    border-color: var(--accent);
    background: var(--accent-light);
}

.theme-preview {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-preview.system {
    background: linear-gradient(135deg, #f2f2f7 50%, #1c1c1e 50%);
}

.theme-preview.dark {
    background: #1c1c1e;
}

.lang-flag {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.theme-name {
    font-size: 16px;
    font-weight: 500;
}

/* Order Detail */
.order-detail {
    background: var(--bg-glass);
    border-radius: 16px;
    padding: 4px 0;
}

.order-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 0.5px solid var(--separator);
}

.order-detail-row:last-child {
    border-bottom: none;
}

.order-detail-label {
    font-size: 15px;
    color: var(--text-secondary);
}

.order-detail-value {
    font-size: 15px;
    font-weight: 500;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
    }
}

/* ========================================