/* এখানে সম্পূর্ণ CSS কোড দেওয়া হলো */
/* General Body Styles */
:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --background-color: #f4f7f6;
    --card-bg-color: #ffffff;
    --text-color: #333;
    --light-text-color: #777;
    --white-color: #fff;
    --border-color: #eee;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overscroll-behavior: none;
    -webkit-user-select: none;
    user-select: none;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 500px;
    margin: 0 auto;
    background: var(--background-color);
}

/* Header */
.app-header {
    padding: 15px;
    background: var(--white-color);
    border-bottom: 1px solid var(--border-color);
}

.profile-info {
    display: flex;
    align-items: center;
}

.profile-info img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
}

.profile-info div {
    display: flex;
    flex-direction: column;
}

.profile-info span {
    font-weight: 600;
}

.profile-info small {
    color: var(--primary-color);
    font-weight: bold;
}

/* Main Content & Pages */
#main-content {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Common Card Styles */
.welcome-card, .stats-grid, .progress-card, .referral-card, .withdraw-form, .profile-summary, .profile-details {
    background: var(--card-bg-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
}

/* Home Page */
.welcome-card {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    text-align: center;
}

.welcome-card h2 {
    margin: 0 0 5px 0;
}

.welcome-card p {
    opacity: 0.9;
    margin: 0 0 15px 0;
}

.start-earning-btn {
    background: var(--white-color);
    color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
}

.stat-card {
    flex: 1 1 calc(50% - 8px);
    background: var(--card-bg-color);
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    min-width: 120px;
}

.stat-card.full-width {
    flex-basis: 100%;
}

.stat-card p {
    margin: 0 0 5px 0;
    color: var(--light-text-color);
    font-size: 14px;
}

.stat-card h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 20px;
}

/* Earn Page */
h3 {
    font-size: 20px;
    margin-bottom: 15px;
}
.progress-card span {
    font-size: 14px;
    color: var(--light-text-color);
    display: block;
    margin-top: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.action-btn {
    display: block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

.action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#ad-container {
    text-align: center;
    margin-top: 20px;
}

#monetag-ad-spot {
    margin: 15px 0;
    min-height: 50px; /* Placeholder height */
}

/* Refer Page */
.referral-card .link-box {
    display: flex;
    margin: 15px 0;
}

.link-box input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px 0 0 8px;
    background: var(--background-color);
    font-size: 14px;
}

.link-box button {
    padding: 10px 15px;
    border: none;
    background: var(--secondary-color);
    color: var(--white-color);
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

/* Withdraw Page */
.available-balance {
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
}
.available-balance span {
    color: var(--primary-color);
    font-weight: bold;
}
.form-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

/* Profile Page */
.profile-summary {
    text-align: center;
}
.profile-summary img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
}
.profile-summary h4 {
    margin: 0;
    font-size: 20px;
}
.profile-summary span {
    color: var(--light-text-color);
}
.profile-details {
    list-style: none;
    padding: 0;
    margin: 0;
}
.profile-details li {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}
.profile-details li:last-child {
    border-bottom: none;
}
.profile-details li span {
    color: var(--light-text-color);
}

/* Footer Navigation */
.app-footer {
    background: var(--card-bg-color);
    border-top: 1px solid var(--border-color);
    padding: 5px 0;
}

.app-footer nav {
    display: flex;
    justify-content: space-around;
}

.nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    font-size: 12px;
    color: var(--light-text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: color 0.2s;
}
.nav-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}