/* General Body and Form Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.form-container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

h2 {
    color: #333;
    margin-bottom: 1.5rem;
}

input[type="text"],
input[type="tel"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1rem;
}

button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(90deg, #8E2DE2, #4A00E0);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

button:hover {
    opacity: 0.9;
}

p {
    margin-top: 1rem;
    color: #666;
}

a {
    color: #4A00E0;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.message {
    padding: 10px;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.message.success {
    background-color: #e2f0d9;
    color: #4f8a10;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Mobile Container Styles */
.mobile-container {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background-color: #f9f9f9;
    margin: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    position: relative;
    padding-bottom: 70px; /* Space for bottom nav */
}

/* Dashboard Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(90deg, #8E2DE2, #4A00E0);
    color: white;
}

.user-info span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.profile-icon {
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.profile-icon a {
    color: white;
    text-decoration: none;
}

/* Balance Card */
.balance-card {
    background: white;
    margin: -20px 1rem 1rem 1rem;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    position: relative;
}

.balance-card p {
    margin: 0;
    color: #666;
}

.balance-card h2 {
    margin: 0.5rem 0;
    font-size: 2.5rem;
    color: #4A00E0;
}

.refresh-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #4A00E0;
    cursor: pointer;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 0 1rem;
    text-align: center;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.service-item .icon-bg {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.service-item span {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Transactions Section */
.transactions-section {
    padding: 1rem;
    margin-top: 1rem;
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.transactions-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.transactions-header a {
    font-size: 0.9rem;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 0.8rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.transaction-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.transaction-details h5 {
    margin: 0;
    font-size: 1rem;
}

.transaction-details span {
    font-size: 0.8rem;
    color: #777;
}

.transaction-amount {
    font-weight: bold;
}

.transaction-amount.gain {
    color: green;
}

.transaction-amount.loss {
    color: red;
}

/* Bottom Navigation */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    height: 65px;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
}

.nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 0.7rem;
}

.nav-item.active {
    color: #4A00E0;
}

/* Inner Page Header */
.page-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.page-header h3 {
    margin: 0;
    flex-grow: 1;
    text-align: center;
    transform: translateX(-12px);
}

.back-arrow {
    font-size: 1.2rem;
    color: #333;
}

.content-body {
    padding: 1.5rem 1rem;
}

.recharge-form label,
.request-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: bold;
}

.recharge-form input,
.request-form input {
    width: 100%;
    padding: 14px;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #8E2DE2, #4A00E0);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 350px;
    text-align: center;
    transform: translateY(-20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 1.5rem;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-bottom: 1.5rem;
}

.cancel-link {
    display: block;
    margin-top: 1rem;
    color: #777;
    font-size: 0.9rem;
}

.content-body .message {
    padding: 12px;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

/* Add Money Styles */
.instructions-box {
    background-color: #eef7ff;
    border: 1px solid #b3d7ff;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.instructions-box h4 {
    margin-top: 0;
    color: #0056b3;
}

.instructions-box ol {
    padding-left: 1.2rem;
    color: #333;
}

.instructions-box li {
    margin-bottom: 0.5rem;
}

.instructions-box p {
    margin: 0.5rem 0 0 0;
    font-weight: bold;
}

.request-form h4 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

/* Cash Out Styles */
.balance-info {
    text-align: center;
    font-size: 1.1rem;
    color: #333;
    font-weight: bold;
    background-color: #eef7ff;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.method-selector {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
}

.method-selector input[type="radio"] {
    display: none;
}

.method-selector label {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.method-selector input[type="radio"]:checked+label {
    background-color: #4A00E0;
    color: white;
    border-color: #4A00E0;
}