:root {
    /* Wallet Style Theme Variables */
    --wallet-bg: #0B0C16;
    --wallet-surface: #14152A;
    --wallet-card: #1B1C36;
    --wallet-card-alt: #20223F;
    --wallet-border: #2C2D52;
    --wallet-violet: #7C5CFC;
    --wallet-violet-deep: #4B2EDB;
    --wallet-teal: #2EE6C5;
    --wallet-pink: #FF5DA2;
    --wallet-muted: #8C8DAE;
    
    /* Semantic Colors */
    --success: #00C853;
    --error: #D50000;
    --white: #FFFFFF;

    /* Gradients */
    --wallet-bg-gradient: linear-gradient(180deg, #0B0C16 0%, #15142A 100%);
    --wallet-balance-gradient: linear-gradient(135deg, #6A3DF2 0%, #3D1FCB 100%);
    
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--wallet-bg-gradient);
    color: var(--white);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--wallet-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Header */
.header {
    background: var(--wallet-balance-gradient);
    padding: 24px 20px 32px;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    box-shadow: 0 4px 20px rgba(106, 61, 242, 0.4);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content {
    text-align: center;
}

.currency-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
    backdrop-filter: blur(4px);
}

.total-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.total-amount {
    font-size: 36px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Main Content */
.content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    padding-bottom: 80px; /* Space for sticky ad */
}

/* Denominations List */
.denominations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.denomination-card {
    background: var(--wallet-card);
    border: 1px solid var(--wallet-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.denomination-card:hover {
    border-color: var(--wallet-violet);
    box-shadow: 0 4px 12px rgba(124, 92, 252, 0.15);
    transform: translateY(-2px);
}

.denom-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.denom-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--wallet-teal);
}

.denom-subtotal {
    font-size: 12px;
    color: var(--wallet-muted);
    margin-top: 4px;
}

.denom-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: none;
    background: var(--wallet-card-alt);
    color: var(--white);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--wallet-violet);
    box-shadow: 0 0 10px rgba(124, 92, 252, 0.4);
}

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

.qty-input {
    width: 50px;
    height: 36px;
    background: var(--wallet-surface);
    border: 1px solid var(--wallet-border);
    border-radius: 8px;
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.qty-input:focus {
    outline: none;
    border-color: var(--wallet-teal);
    box-shadow: 0 0 8px rgba(46, 230, 197, 0.3);
}

/* Hide arrows on number input */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Actions */
.actions-container {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--wallet-violet);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--wallet-violet-deep);
    box-shadow: 0 4px 15px rgba(124, 92, 252, 0.4);
}

.btn-secondary {
    background: var(--wallet-card-alt);
    color: var(--wallet-muted);
}

.btn-secondary:hover {
    color: var(--white);
    background: var(--wallet-border);
}

/* Ads Placeholders */
.ad-banner {
    background: #111;
    border: 1px dashed #444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
}

.ad-banner-top {
    height: 60px;
    margin-bottom: 16px;
    border-radius: 12px;
}

.ad-banner-sticky {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 10;
    border-top: 1px solid #333;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

/* Modal for Interstitial Ad */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 12, 22, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--wallet-surface);
    border: 1px solid var(--wallet-border);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

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

.modal-header h2 {
    font-size: 16px;
    color: var(--wallet-muted);
    font-weight: 500;
}

.close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
    display: flex;
    justify-content: center;
}

.ad-placeholder-large {
    width: 100%;
    height: 250px;
    background: #111;
    border: 1px dashed #444;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: 600;
    letter-spacing: 2px;
}
