* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --bg-primary: #0f0f0f;
            --bg-secondary: #1a1a1a;
            --bg-card: #232323;
            --text-primary: #ffffff;
            --text-secondary: #9e9e9e;
            --border-color: #333333;
            --accent-blue: #229ED9;
            --accent-ton: #0088CC;
            --accent-gold: #FFB800;
            --success: #4CAF50;
            --error: #f44336;
            --warning: #ff9800;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            overflow-x: hidden;
            padding-bottom: 80px;
            -webkit-font-smoothing: antialiased;
        }

        .header {
            background: var(--bg-secondary);
            padding: 14px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            z-index: 100;
            backdrop-filter: blur(10px);
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 24px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 17px;
            font-weight: 700;
            letter-spacing: -0.3px;
        }

        .logo-icon {
            font-size: 22px;
            color: var(--accent-blue);
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .header-balance {
            display: flex;
            align-items: center;
            gap: 10px;
            background: var(--bg-card);
            padding: 8px 12px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }

        .balance-item {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 13px;
            font-weight: 600;
        }

        .balance-icon {
            font-size: 14px;
            color: var(--accent-ton);
        }

        .wallet-header-btn {
            background: var(--accent-ton);
            border: none;
            color: white;
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 6px;
            font-family: 'Inter', sans-serif;
        }

        .wallet-header-btn:hover {
            background: #0077b3;
        }

        .user-profile-trigger {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .user-profile-trigger:hover {
            opacity: 0.8;
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent-blue), var(--accent-ton));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
        }

        .notification {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(-100px);
            background: var(--bg-card);
            color: white;
            padding: 14px 20px;
            border-radius: 10px;
            z-index: 3000;
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 280px;
            max-width: 90%;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
            border: 1px solid var(--border-color);
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }

        .notification.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }

        .notification.success {
            border-left: 3px solid var(--success);
        }

        .notification.error {
            border-left: 3px solid var(--error);
        }

        .notification.warning {
            border-left: 3px solid var(--warning);
        }

        .notification-icon {
            font-size: 20px;
            min-width: 20px;
        }

        .notification.success .notification-icon {
            color: var(--success);
        }

        .notification.error .notification-icon {
            color: var(--error);
        }

        .notification.warning .notification-icon {
            color: var(--warning);
        }

        .notification-text {
            flex: 1;
            font-size: 14px;
            font-weight: 500;
        }

        .content {
            padding: 20px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .page {
            display: none;
        }

        .page.active {
            display: block;
            animation: fadeIn 0.3s;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .controls-bar {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            align-items: center;
            flex-wrap: wrap;
        }

        .filter-btn {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 14px;
            color: var(--text-primary);
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 7px;
            transition: all 0.2s;
        }

        .filter-btn:hover {
            background: var(--bg-secondary);
            border-color: var(--accent-blue);
        }

        .filter-btn.active {
            background: var(--accent-blue);
            border-color: var(--accent-blue);
            color: white;
        }

        .search-box {
            flex: 1;
            min-width: 200px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 14px;
            color: var(--text-primary);
            font-size: 14px;
            font-family: 'Inter', sans-serif;
        }

        .search-box::placeholder {
            color: var(--text-secondary);
        }

        .search-box:focus {
            outline: none;
            border-color: var(--accent-blue);
        }

        .sort-select {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 14px;
            color: var(--text-primary);
            font-size: 14px;
            cursor: pointer;
            font-family: 'Inter', sans-serif;
        }

        .sort-select:focus {
            outline: none;
            border-color: var(--accent-blue);
        }

        .sort-select option {
            background: var(--bg-card);
            color: var(--text-primary);
        }

        .view-toggle {
            display: flex;
            gap: 8px;
        }

        .view-btn {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 16px;
            transition: all 0.2s;
            width: 38px;
            height: 38px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .view-btn.active {
            background: var(--bg-secondary);
            color: var(--text-primary);
            border-color: var(--accent-blue);
        }

        .gift-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 16px;
            transition: all 0.3s;
        }

        .gift-grid.list-view {
            grid-template-columns: 1fr;
        }

        .gift-card {
            background: transparent;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            flex-direction: column;
        }

        .gift-card:hover {
            transform: translateY(-4px);
        }

        .gift-image-container {
            width: 100%;
            aspect-ratio: 1;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 10px;
            overflow: hidden;
            position: relative;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
        }

        .gift-card:nth-child(9n+1) .gift-image-container { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
        .gift-card:nth-child(9n+2) .gift-image-container { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
        .gift-card:nth-child(9n+3) .gift-image-container { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
        .gift-card:nth-child(9n+4) .gift-image-container { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
        .gift-card:nth-child(9n+5) .gift-image-container { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
        .gift-card:nth-child(9n+6) .gift-image-container { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }
        .gift-card:nth-child(9n+7) .gift-image-container { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
        .gift-card:nth-child(9n+8) .gift-image-container { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
        .gift-card:nth-child(9n+9) .gift-image-container { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }

        .gift-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            position: absolute;
            top: 0;
            left: 0;
        }

        .gift-info {
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .gift-name {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .gift-id {
            font-size: 11px;
            color: var(--text-secondary);
        }

        .gift-price-btn {
            background: var(--accent-ton);
            color: white;
            border: none;
            border-radius: 7px;
            padding: 8px 10px;
            font-weight: 700;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }

        .gift-price-btn:hover {
            background: #0077b3;
            transform: scale(1.02);
        }

        .gift-card-list {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 12px;
            display: flex;
            gap: 14px;
            align-items: center;
            cursor: pointer;
            transition: all 0.2s;
        }

        .gift-card-list:hover {
            background: var(--bg-secondary);
            border-color: var(--accent-blue);
        }

        .gift-card-list-image {
            width: 90px;
            height: 90px;
            border-radius: 10px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .gift-card-list-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .gift-card-list-info {
            flex: 1;
        }

        .gift-card-list-name {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .gift-card-list-id {
            font-size: 12px;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }

        .gift-card-list-price {
            background: var(--accent-ton);
            color: white;
            border: none;
            border-radius: 6px;
            padding: 8px 12px;
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            transition: all 0.2s;
        }

        .gift-card-list-price:hover {
            background: #0077b3;
        }

        /* CHANGE: Advanced profile section with stats, achievements, and referral system */
        .profile-section {
            background: var(--bg-card);
            border-radius: 12px;
            padding: 0;
            margin-bottom: 18px;
            border: 1px solid var(--border-color);
            overflow: hidden;
        }

        .profile-header-bg {
            height: 140px;
            background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-ton) 100%);
            position: relative;
            overflow: hidden;
        }

        .profile-header-bg::before {
            content: '';
            position: absolute;
            width: 200px;
            height: 200px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            top: -50px;
            right: -50px;
        }

        .profile-content {
            padding: 20px;
        }

        .profile-header {
            display: flex;
            align-items: flex-end;
            gap: 16px;
            margin-top: -50px;
            margin-bottom: 24px;
            position: relative;
        }

        .avatar {
            width: 84px;
            height: 84px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent-blue), var(--accent-ton));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 36px;
            border: 4px solid var(--bg-card);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        }

        .profile-info h2 {
            font-size: 20px;
            margin-bottom: 12px;
            font-weight: 700;
        }

        .profile-id {
            color: var(--text-secondary);
            font-size: 13px;
        }

        .profile-level-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: var(--accent-gold);
            color: #000;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            margin-top: 8px;
        }

        .balance-cards {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }

        .balance-card {
            background: var(--bg-secondary);
            padding: 16px;
            border-radius: 10px;
            border: 1px solid var(--border-color);
        }

        .balance-label {
            font-size: 12px;
            color: var(--text-secondary);
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .balance-amount {
            font-size: 20px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }

        .stat-item {
            background: var(--bg-secondary);
            padding: 14px;
            border-radius: 10px;
            text-align: center;
            border: 1px solid var(--border-color);
        }

        .stat-value {
            font-size: 20px;
            font-weight: 700;
            color: var(--accent-blue);
        }

        .stat-label {
            font-size: 11px;
            color: var(--text-secondary);
            margin-top: 5px;
            font-weight: 500;
        }

        .achievements-section {
            margin-bottom: 20px;
        }

        .section-subtitle {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 7px;
        }

        .achievements-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }

        .achievement {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 12px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
        }

        .achievement:hover {
            border-color: var(--accent-blue);
            transform: translateY(-2px);
        }

        .achievement-icon {
            font-size: 28px;
            margin-bottom: 6px;
        }

        .achievement-name {
            font-size: 11px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .referral-card {
            background: linear-gradient(135deg, rgba(34, 158, 217, 0.1) 0%, rgba(0, 136, 204, 0.1) 100%);
            border: 1px solid var(--accent-blue);
            border-radius: 10px;
            padding: 16px;
            text-align: center;
        }

        .referral-code {
            background: var(--bg-primary);
            border: 1px dashed var(--accent-blue);
            padding: 10px;
            border-radius: 8px;
            margin: 12px 0;
            font-weight: 600;
            color: var(--accent-blue);
            font-size: 14px;
            word-break: break-all;
        }

        .referral-btn {
            background: var(--accent-blue);
            border: none;
            color: white;
            padding: 10px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 13px;
            transition: all 0.2s;
            width: 100%;
        }

        .referral-btn:hover {
            background: #1b7ea3;
        }

        /* CHANGE: Enhanced wallet section with beautiful form design */
        .wallet-section {
            background: var(--bg-card);
            border-radius: 12px;
            padding: 22px;
            margin-bottom: 18px;
            border: 1px solid var(--border-color);
        }

        .section-title {
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 9px;
        }

        .wallet-balance-cards {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }

        .wallet-balance-card {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 16px;
            text-align: center;
        }

        .wallet-balance-label {
            font-size: 12px;
            color: var(--text-secondary);
            margin-bottom: 8px;
            font-weight: 500;
        }

        .wallet-balance-value {
            font-size: 22px;
            font-weight: 700;
            color: var(--accent-ton);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .wallet-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 20px;
        }

        .wallet-btn {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            padding: 12px 14px;
            border-radius: 8px;
            color: var(--text-primary);
            cursor: pointer;
            font-weight: 600;
            font-size: 13px;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-family: 'Inter', sans-serif;
        }

        .wallet-btn:hover {
            background: var(--bg-card);
            border-color: var(--accent-blue);
            transform: translateY(-1px);
        }

        .wallet-btn.primary {
            background: var(--accent-ton);
            border-color: var(--accent-ton);
            color: white;
        }

        .wallet-btn.primary:hover {
            background: #0077b3;
        }

        .transaction-item {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 12px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 10px;
        }

        .transaction-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .transaction-icon {
            font-size: 20px;
            width: 40px;
            height: 40px;
            background: var(--bg-primary);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .transaction-details h4 {
            font-size: 13px;
            margin-bottom: 2px;
        }

        .transaction-date {
            font-size: 11px;
            color: var(--text-secondary);
        }

        .transaction-amount {
            font-weight: 700;
            font-size: 14px;
        }

        .transaction-amount.in {
            color: var(--success);
        }

        .transaction-amount.out {
            color: var(--error);
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            padding: 20px;
            overflow-y: auto;
        }

        .modal.show {
            display: flex;
            animation: fadeIn 0.3s;
        }

        .modal-content {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 24px;
            max-width: 500px;
            width: 100%;
            border: 1px solid var(--border-color);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
            margin: auto;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .modal-title {
            font-size: 18px;
            font-weight: 700;
        }

        .modal-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 20px;
            cursor: pointer;
            transition: color 0.2s;
        }

        .modal-close:hover {
            color: var(--text-primary);
        }

        /* CHANGE: Beautiful form design */
        .form-group {
            margin-bottom: 16px;
        }

        .form-label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-primary);
        }

        .form-input {
            width: 100%;
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 12px;
            color: var(--text-primary);
            font-size: 14px;
            font-family: 'Inter', sans-serif;
            transition: all 0.2s;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--accent-ton);
            box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
        }

        .form-input::placeholder {
            color: var(--text-secondary);
        }

        .amount-presets {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-bottom: 16px;
        }

        .preset-btn {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px;
            color: var(--text-primary);
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: all 0.2s;
        }

        .preset-btn:hover {
            border-color: var(--accent-ton);
            background: var(--bg-primary);
        }

        .preset-btn.active {
            background: var(--accent-ton);
            border-color: var(--accent-ton);
            color: white;
        }

        .form-submit {
            width: 100%;
            background: var(--accent-ton);
            border: none;
            color: white;
            padding: 12px;
            border-radius: 8px;
            font-weight: 700;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
            font-family: 'Inter', sans-serif;
        }

        .form-submit:hover {
            background: #0077b3;
            transform: translateY(-1px);
        }

        .form-submit:active {
            transform: translateY(0);
        }

        .purchase-modal-gift {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
        }

        .purchase-modal-gift img {
            max-width: 120px;
            max-height: 120px;
            object-fit: contain;
            border-radius: 5px;
        }

        .purchase-info {
            background: var(--bg-secondary);
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 16px;
            border: 1px solid var(--border-color);
        }

        .purchase-info-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .purchase-info-row:last-child {
            margin-bottom: 0;
        }

        .purchase-label {
            font-size: 13px;
            color: var(--text-secondary);
        }

        .purchase-value {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .purchase-total {
            border-top: 1px solid var(--border-color);
            padding-top: 10px;
            margin-top: 10px;
        }

        .purchase-total .purchase-value {
            font-size: 18px;
            color: var(--accent-ton);
        }

        .payment-methods {
            margin-bottom: 16px;
        }

        .payment-method {
            display: flex;
            align-items: center;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .payment-method:hover {
            border-color: var(--accent-blue);
        }

        .payment-method input[type="radio"] {
            margin-right: 10px;
        }

        .payment-method.selected {
            background: var(--bg-card);
            border-color: var(--accent-ton);
        }

        .insufficient-balance {
            background: var(--error);
            color: white;
            padding: 10px;
            border-radius: 8px;
            font-size: 13px;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--bg-secondary);
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: space-around;
            align-items: center;
            height: 70px;
            z-index: 200;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
            cursor: pointer;
            color: var(--text-secondary);
            text-decoration: none;
            flex: 1;
            height: 100%;
            transition: all 0.2s;
            font-size: 12px;
            font-weight: 500;
        }

        .nav-item:hover {
            color: var(--text-primary);
        }

        .nav-item.active {
            color: var(--accent-blue);
        }

        .nav-icon {
            font-size: 22px;
        }

        @media (max-width: 768px) {
            .balance-cards {
                grid-template-columns: 1fr;
            }

            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .wallet-balance-cards {
                grid-template-columns: 1fr;
            }
        }