:root {
    --ios-primary: #007AFF;
    --ios-primary-light: #5AC8FA;
    --ios-bg: #000000;
    --ios-text: #FFFFFF;
    --ios-text-muted: #98989D;
    --ios-card: rgba(28, 28, 30, 0.7);
    --ios-border: rgba(255, 255, 255, 0.08);
    --ios-separator: rgba(255, 255, 255, 0.05);
    --safe-top: env(safe-area-inset-top, 44px);
    --safe-bottom: env(safe-area-inset-bottom, 34px);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.16);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.24);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--ios-bg);
    color: var(--ios-text);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Background Blobs */
.app-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at top right, #1a1a1a, #000);
}

.blob {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    z-index: -1;
}

.blob-1 {
    top: -100px;
    right: -50px;
    background: var(--ios-primary);
}

.blob-2 {
    bottom: -100px;
    left: -50px;
    background: #5856D6;
}

/* Main Layout */
main {
    height: calc(100% - 85px - var(--safe-bottom));
    padding-top: var(--safe-top);
    padding-bottom: 120px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

main::-webkit-scrollbar {
    display: none;
}

.app-screen {
    display: none;
    padding: 20px;
    padding-bottom: 120px;
    opacity: 0;
    transform: translateY(10px);
}

.app-screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Header */
.app-header {
    margin: 10px 0 25px;
    padding-top: 5px;
}

.app-header h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.app-header p {
    color: var(--ios-text-muted);
    font-size: 15px;
    margin-top: 5px;
}

/* UI Components */
.card {
    background: var(--ios-card);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--ios-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 25px 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    background: rgba(0, 122, 255, 0.15);
    color: var(--ios-primary);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(0, 122, 255, 0.2);
}

/* Navigation */
.app-nav {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 400px;
    height: 70px;
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 15px;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 122, 255, 0.35);
}

[data-theme="light"] .app-nav {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: none;
}

.nav-item {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 30px;
    padding: 8px 12px;
}

.nav-item i {
    font-size: 22px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-item.active i {
    transform: scale(1.05);
}

[data-theme="light"] .nav-item {
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .nav-item.active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--ios-primary);
}

/* Grid Systems */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Booking specific */
.time-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.time-slot {
    background: var(--ios-card);
    border: 1px solid var(--ios-border);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.time-slot:active {
    transform: scale(0.95);
}

.time-slot.active {
    background: var(--ios-primary);
    border-color: var(--ios-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Shop specific */
.product-card {
    background: var(--ios-card);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--ios-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.product-card:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-md);
}

.product-img {
    width: 100%;
    height: 120px;
    background: #2c2c2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.product-info {
    padding: 12px;
}

.product-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.product-info span {
    color: var(--ios-primary);
    font-weight: 700;
    font-size: 16px;
}

/* Buttons */
.btn-app {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--ios-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

/* Service Selector */
.service-select-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 16px;
}

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

.service-select-item.active {
    border-color: var(--ios-primary);
    background: rgba(0, 122, 255, 0.12);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

/* Category Badges */
.badge.active {
    background: var(--ios-primary);
    color: #fff;
}

/* UI Refinements */
.app-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ios-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: var(--transition);
}

.app-input:focus {
    border-color: var(--ios-primary);
    background: rgba(255, 255, 255, 0.08);
}

.auth-tab.active {
    background: var(--ios-card) !important;
    color: var(--ios-text) !important;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
    font-weight: 600;
}

[data-theme="light"] .auth-tab.active {
    background: #fff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Quick Actions Scroll */
.quick-actions::-webkit-scrollbar {
    display: none;
}

/* Checkbox & Policy Styling */
input[type="checkbox"] {
    accent-color: var(--ios-primary);
    -webkit-appearance: none;
    appearance: none;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--ios-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

input[type="checkbox"]:checked {
    background-color: var(--ios-primary);
    border-color: var(--ios-primary);
}

input[type="checkbox"]:checked::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Light Mode Refinements */
[data-theme="light"] {
    --ios-bg: #F2F2F7;
    --ios-text: #000000;
    --ios-text-muted: #8E8E93;
    --ios-card: rgba(255, 255, 255, 0.85);
    --ios-border: rgba(0, 0, 0, 0.06);
    --ios-separator: rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .app-input {
    background: rgba(0, 0, 0, 0.03);
    color: #000;
}

[data-theme="light"] .app-bg {
    background: radial-gradient(circle at top right, #fff, #f2f2f7);
}

[data-theme="light"] .nav-item.active {
    color: var(--ios-primary);
}

/* Phone Input Prefix Styling */
.phone-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ios-border);
    border-radius: 12px;
    padding-left: 15px;
    transition: var(--transition);
}

.phone-input-wrapper:focus-within {
    border-color: var(--ios-primary);
    background: rgba(255, 255, 255, 0.08);
}

.phone-prefix {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ios-text);
    padding-right: 10px;
    border-right: 1px solid var(--ios-border);
    height: 30px;
    pointer-events: none;
}

.uzb-flag {
    width: 22px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.phone-input-wrapper .app-input {
    border: none !important;
    background: transparent !important;
    padding-left: 10px;
    height: 48px;
    width: 100%;
}

.phone-input-wrapper .app-input:focus {
    background: transparent;
}

[data-theme="light"] .phone-input-wrapper {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .phone-prefix {
    color: #000;
}

/* Subscription Card */
.subscription-card {
    background: linear-gradient(135deg, var(--ios-primary) 0%, #5856D6 100%);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
}

.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.sub-plan {
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.plan-name {
    font-size: 14px;
    opacity: 0.9;
}

.sub-expiry {
    text-align: right;
}

.expiry-label {
    font-size: 11px;
    opacity: 0.7;
    margin-bottom: 2px;
}

.expiry-date {
    font-size: 16px;
    font-weight: 700;
}

.sub-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 16px;
}

.sub-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sub-stats .stat-item i {
    font-size: 24px;
    opacity: 0.9;
}

.sub-stats .stat-item h3 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.sub-stats .stat-item p {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

.sub-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.sub-progress .progress-bar {
    height: 100%;
    background: #fff;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Subscription Promo (No subscription) */
.subscription-promo {
    background: var(--ios-card);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1.5px solid var(--ios-border);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    text-align: center;
}

.promo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FFD700 0%, #FF9500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.promo-icon i {
    font-size: 28px;
    color: #fff;
}

.subscription-promo h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subscription-promo>p {
    font-size: 14px;
    color: var(--ios-text-muted);
    margin-bottom: 15px;
}

.promo-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    text-align: left;
}

.promo-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
}

.promo-features li i {
    color: #30D158;
    font-size: 16px;
}

/* Plan Options */
.plan-option {
    background: var(--ios-card);
    border: 1.5px solid var(--ios-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

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

.plan-option.selected {
    border-color: var(--ios-primary);
    background: rgba(0, 122, 255, 0.08);
}

.plan-option.popular {
    border-color: #FFD700;
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: linear-gradient(135deg, #FFD700 0%, #FF9500 100%);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 10px;
}

.plan-left h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.plan-left p {
    font-size: 12px;
    color: var(--ios-text-muted);
}

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

.plan-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--ios-primary);
}

.plan-discount {
    display: block;
    font-size: 11px;
    color: #30D158;
    font-weight: 600;
}

/* QR Code Section */
.qr-card {
    background: var(--ios-card);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1.5px solid var(--ios-border);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
}

.qr-code-box {
    width: 180px;
    height: 180px;
    background: #fff;
    border-radius: 16px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.qr-code-box svg,
.qr-code-box img {
    width: 100%;
    height: 100%;
}

.qr-hint {
    font-size: 13px;
    color: var(--ios-text-muted);
    margin-bottom: 5px;
}

.qr-user-id {
    font-size: 16px;
    font-weight: 700;
    color: var(--ios-primary);
}

/* Referral Section */
.referral-card {
    background: var(--ios-card);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1.5px solid var(--ios-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

.referral-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.referral-info i {
    font-size: 32px;
    color: #FF9500;
}

.referral-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.referral-info p {
    font-size: 12px;
    color: var(--ios-text-muted);
}

.referral-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 122, 255, 0.1);
    border: 1.5px dashed var(--ios-primary);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 15px;
}

.referral-code-box span {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--ios-primary);
}

.copy-btn {
    background: var(--ios-primary);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-btn.telegram {
    background: #0088cc;
    color: #fff;
}

.share-btn.whatsapp {
    background: #25D366;
    color: #fff;
}

/* Promo Code Section */
.promo-input-card {
    background: var(--ios-card);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1.5px solid var(--ios-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

.promo-input-wrapper {
    display: flex;
    gap: 10px;
}

.promo-result {
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
}

.promo-result.success {
    color: #30D158;
}

.promo-result.error {
    color: #FF3B30;
}

/* Payment Providers */
.payment-providers {
    display: flex;
    gap: 10px;
}

.payment-btn {
    flex: 1;
    padding: 14px 10px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

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

.payment-btn.payme {
    background: #00CDAC;
    color: #fff;
}

.payment-btn.click {
    background: #007AFF;
    color: #fff;
}

.payment-btn.uzum {
    background: #7C3AED;
    color: #fff;
}

/* Profile Actions Grid */
.profile-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.profile-action-item {
    background: var(--ios-card);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1.5px solid var(--ios-border);
    border-radius: 16px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.profile-action-item:active {
    transform: scale(0.95);
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 20px;
    color: #fff;
}

.action-icon.qr-icon {
    background: linear-gradient(135deg, #007AFF, #5856D6);
}

.action-icon.referral-icon {
    background: linear-gradient(135deg, #FF9500, #FF3B30);
}

.action-icon.promo-icon {
    background: linear-gradient(135deg, #30D158, #34C759);
}

.action-icon.sub-icon {
    background: linear-gradient(135deg, #FFD700, #FF9500);
}

.profile-action-item span {
    font-size: 11px;
    font-weight: 600;
    color: var(--ios-text);
}

/* Feature Modal (shared style) */
.feature-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.feature-modal.active {
    display: flex;
}

.feature-modal-content {
    background: var(--ios-card);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 24px;
    width: 90%;
    max-width: 380px;
    padding: 24px;
    text-align: center;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.feature-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ios-border);
    border: none;
    color: var(--ios-text);
    font-size: 16px;
    cursor: pointer;
}
