* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #000000;
    padding-bottom: 100px;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #000000;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.back-btn {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #f5f5f5;
    transform: scale(1.1);
}

.page-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
}

.nav-spacer {
    width: 50px;
}

/* Main Content */
.topup-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Currency Toggle */
.currency-toggle {
    display: flex;
    background: #f0f0f0;
    border-radius: 15px;
    padding: 4px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.currency-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666666;
}

.currency-btn.active {
    background: #000000;
    color: #ffffff;
    transform: scale(1.02);
}

.currency-btn:hover:not(.active) {
    background: #e0e0e0;
    color: #000000;
}

/* Current Balance */
.current-balance {
    background: #000000;
    color: #ffffff;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.current-balance h3 {
    font-size: 16px;
    color: #cccccc;
    margin-bottom: 10px;
}

.current-balance .amount {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* Top Up Amount */
.topup-amount {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.topup-amount h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #000000;
}

.amount-input {
    width: 100%;
    padding: 15px 50px 15px 15px;
    border: 2px solid #000000;
    border-radius: 10px;
    font-size: 24px;
    font-family: 'Courier New', monospace;
    text-align: center;
    background: #ffffff;
    color: #000000;
    outline: none;
    transition: all 0.3s ease;
}

.amount-input:focus {
    border-color: #333333;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.currency-symbol {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #666666;
    font-weight: bold;
}

.input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

/* Quick Amount Buttons */
.quick-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.quick-amount-btn {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quick-amount-btn:hover {
    background: #000000;
    color: #ffffff;
    transform: translateY(-2px);
}

.quick-amount-btn.selected {
    background: #000000;
    color: #ffffff;
}

/* Payment Methods */
.payment-methods {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.payment-methods h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #000000;
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover {
    border-color: #000000;
    background: #f9f9f9;
}

.payment-method.selected {
    border-color: #000000;
    background: #000000;
    color: #ffffff;
}

.payment-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 18px;
}

.payment-method.selected .payment-icon {
    background: #ffffff;
    color: #000000;
}

.payment-info {
    flex: 1;
}

.payment-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.payment-details {
    font-size: 14px;
    color: #666666;
}

.payment-method.selected .payment-details {
    color: #cccccc;
}

.radio-check {
    width: 20px;
    height: 20px;
    border: 2px solid #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-method.selected .radio-check {
    border-color: #ffffff;
}

.radio-check::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #000000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-method.selected .radio-check::after {
    opacity: 1;
    background: #ffffff;
}

/* Summary */
.summary {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
}

.summary h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #000000;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
}

.summary-row.total {
    border-top: 2px solid #000000;
    padding-top: 15px;
    margin-top: 15px;
    font-weight: bold;
    font-size: 18px;
}

/* Top Up Button */
.topup-btn {
    width: 100%;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 15px;
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.topup-btn:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.topup-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        padding: 15px 20px;
    }

    .topup-container {
        padding: 0 15px;
    }

    .current-balance .amount {
        font-size: 2rem;
    }

    .amount-input {
        font-size: 20px;
    }

    .quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Success Message */
.success-message {
    background: #000000;
    color: #ffffff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

.success-message.show {
    display: block;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
