:root {
    --bg-color: #0d1117;
    --text-color: #e6edf3;
    --text-muted: #8b949e;
    --primary-gradient: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
    --secondary-gradient: linear-gradient(135deg, #ff7b00 0%, #ff4500 100%);
    --glass-bg: rgba(22, 27, 34, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --input-bg: rgba(255, 255, 255, 0.05);

    --primary: #11998e;
    --primary-light: #38ef7d;
    --error: #ff4500;
    --success: #38ef7d;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Blobs */
.blob-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.shape1 {
    width: 400px;
    height: 400px;
    background: #11998e;
    top: -100px;
    left: -100px;
}

.shape2 {
    width: 300px;
    height: 300px;
    background: #ff4500;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.shape3 {
    width: 250px;
    height: 250px;
    background: #1e3c72;
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.2);
    }
}

/* App Container (TMA Style) */
.app-container {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    background: transparent;
}

@media (min-width: 480px) {
    .app-container {
        height: 85vh;
        border-radius: 30px;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        box-shadow: var(--card-shadow);
        overflow: hidden;
    }
}

/* Header */
.top-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 10;
}

.top-toolbar h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.user-profile img {
    border-radius: 50%;
    border: 2px solid var(--glass-border);
}

/* Pages */
.page {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 90px;
}

.page.active {
    display: block;
    animation: fadeSlide 0.3s ease-out;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.page-title {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-color);
}

/* Balance Card */
.balance-card {
    background: var(--primary-gradient);
    border-radius: 24px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(17, 153, 142, 0.3);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0.5;
    pointer-events: none;
}

.balance-card .subtitle {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 0.9;
    color: white;
}

.balance-amount {
    font-size: 42px;
    font-weight: 700;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.balance-amount .currency {
    font-size: 20px;
    font-weight: 500;
    opacity: 0.8;
}

/* Sections / Cards (Glassmorphism) */
.section-container,
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
}

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

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary-light);
    font-weight: 500;
    cursor: pointer;
}

/* Transactions */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.txn-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 12px;
    background: var(--input-bg);
    transition: background 0.2s;
}

.txn-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

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

.txn-deposit .txn-icon {
    background: rgba(56, 239, 125, 0.2);
    color: var(--success);
}

.txn-withdraw .txn-icon {
    background: rgba(255, 69, 0, 0.2);
    color: var(--error);
}

.txn-details {
    flex: 1;
}

.txn-details h4 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: capitalize;
}

.txn-details p {
    font-size: 12px;
    color: var(--text-muted);
}

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

.txn-deposit .txn-amount {
    color: var(--success);
}

.txn-withdraw .txn-amount {
    color: var(--text-color);
}

/* Forms & Inputs */
.input-group {
    margin-bottom: 16px;
}

.label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.inputbox {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    font-size: 15px;
    outline: none;
    transition: border 0.2s;
}

.inputbox:focus {
    border-color: var(--primary-light);
}

.inputbox[readonly] {
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.2);
}

.inputbox option {
    background: #1f2937;
    color: white;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

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

/* Messages */
.form-msg {
    margin-top: -8px;
    margin-bottom: 12px;
    font-size: 13px;
    text-align: center;
    min-height: 18px;
}

.form-msg.success {
    color: var(--success);
}

.form-msg.error {
    color: var(--error);
}

/* Bottom Nav (Glassmorphism) */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 10;
}

@media (min-width: 480px) {
    .bottom-nav {
        border-radius: 0 0 30px 30px;
    }
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    height: 100%;
    transition: color 0.3s;
}

.nav-item svg {
    margin-bottom: 4px;
    transition: transform 0.2s;
}

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

.nav-item.active svg {
    transform: translateY(-2px);
}

/* Loader */
.loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--primary-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}