* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

:root {
    --primary: #7367F0;
    --secondary: #82868B;
    --success: #28C76F;
    --info: #00CFE8;
    --warning: #FF9F43;
    --danger: #EA5455;
    --dark: #4B4B4B;
    --light: #F8F8F8;
    --body-bg: #F8F8F8;
}

body {
    background-color: var(--body-bg);
    color: var(--dark);
    min-height: 100vh;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    background-color: white;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
}

/* Header Styles */
header {
    padding: 1rem 1.5rem;
    background-color: white;
    border-bottom: 1px solid #ebe9f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.header-icons {
    display: flex;
    gap: 0rem;
}

.header-icons button {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.15s ease;
}

.header-icons button:hover {
    color: var(--primary);
    background-color: rgba(115, 103, 240, 0.12);
}

/* Profile Section */
.profile-section {
    margin: 1.5rem;
    padding: 1.2rem;
    background-color: white;
    border-radius: 0.428rem;
    box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
}

.profile-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    padding: 2px;
}

.user-details {
    display: flex;
    flex-direction: column;
	 gap: 10px;
}

.user-container {
    display: flex;
    align-items: center;
    gap: 10px; /* فاصله بین عکس و نام کاربری */
}

.username {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1rem;
}

.user-id {
    color: var(--secondary);
    font-size: 0.857rem;
}

/* Balance Cards */
.balances-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

.balance-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.428rem;
    box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.balance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.2);
}

.balance-label {
    color: var(--secondary);
    font-size: 0.857rem;
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
}

.balance-amount {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.currency {
    color: var(--primary);
}

.decimals {
    font-size: 1rem;
    color: var(--secondary);
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border: 1px solid #ebe9f1;
    border-radius: 0.428rem;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--primary);
}

.action-btn:hover {
    background: rgba(115, 103, 240, 0.12);
    transform: translateY(-3px);
}

.action-btn .icon {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

/* Level Section */
.level-section {
    margin: 1.5rem;
    padding: 1.2rem;
    background: white;
    border-radius: 0.428rem;
    box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
}

.level-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.level {
    font-weight: 600;
    color: var(--dark);
}

.upgrade-text {
    color: var(--secondary);
    font-size: 0.857rem;
}

.percentage {
    color: var(--success);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.3rem 0.8rem;
    background: rgba(40, 199, 111, 0.12);
    border-radius: 0.358rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 0.357rem;
    background: #ebe9f1;
    border-radius: 0.358rem;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 0.358rem;
    width: 25%;
    transition: width 0.3s ease;
}

/* Ads Section */
.ads-section {
    padding: 1.5rem;
}

.ads-btn {
    width: 100%;
    padding: 1rem;
    background: white;
    border: 1px solid #ebe9f1;
    border-radius: 0.428rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--dark);
}

.ads-btn:hover {
    transform: translateX(5px);
    background: rgba(115, 103, 240, 0.04);
}

.ads-btn .icon {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: space-around;
    padding: 0.8rem;
    background: white;
    border-top: 1px solid #ebe9f1;
    box-shadow: 0 -4px 24px 0 rgba(34, 41, 47, 0.1);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.857rem;
    color: var(--secondary);
    transition: all 0.15s ease;
    padding: 0.5rem;
    border-radius: 0.358rem;
}

.nav-btn:hover {
    color: var(--primary);
    background: rgba(115, 103, 240, 0.12);
}

.nav-btn.active {
    color: var(--primary);
    font-weight: 500;
}

.nav-btn .icon {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

footer {
    text-align: center;
    padding: 1.2rem;
    margin-bottom: 5rem;
    color: var(--secondary);
    font-size: 0.857rem;
}

/* Page Styles */
.page {
    display: none;
    padding-bottom: 70px; /* Space for bottom nav */
}

.page-header {
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid #ebe9f1;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

/* Tasks Page Styles */
.tasks-list {
    padding: 1rem;
}

.task-item {
    background: white;
    border-radius: 0.428rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
}

.task-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.task-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.task-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--dark);
}

.task-details p {
    font-size: 0.857rem;
    color: var(--secondary);
    margin: 0.3rem 0 0;
}

.claim-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.358rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.claim-btn:hover {
    background: #6355dd;
    transform: translateY(-2px);
}

/* Video Ads Page Styles */
.video-ads-list {
    padding: 1rem;
}

.video-item {
    background: white;
    border-radius: 0.428rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
}

.video-thumbnail {
    width: 80px;
    height: 80px;
    background: #f8f8f8;
    border-radius: 0.358rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail i {
    font-size: 2rem;
    color: var(--primary);
}

.video-info {
    flex: 1;
}

.video-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--dark);
}

.video-info p {
    font-size: 0.857rem;
    color: var(--secondary);
    margin: 0.3rem 0 0;
}

.watch-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.358rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.watch-btn:hover {
    background: #6355dd;
    transform: translateY(-2px);
}

/* Surfing Page Styles */
.surfing-content {
    padding: 1rem;
}

.surf-item {
    background: white;
    border-radius: 0.428rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
}

.surf-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.surf-icon {
    font-size: 2rem;
    color: var(--primary);
}

.surf-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--dark);
}

.surf-details p {
    font-size: 0.857rem;
    color: var(--secondary);
    margin: 0.3rem 0 0;
}

.surf-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 0.358rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.surf-btn:hover {
    background: #6355dd;
    transform: translateY(-2px);
}

/* Referrals Page Styles */
.referral-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.stat-card {
    background: white;
    border-radius: 0.428rem;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
}

.stat-card h3 {
    font-size: 0.857rem;
    color: var(--secondary);
    margin: 0 0 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

.referral-link {
    padding: 1rem;
    margin-top: 1rem;
}

.referral-link h3 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 0.8rem;
}

.link-container {
    display: flex;
    gap: 0.5rem;
    background: white;
    border-radius: 0.428rem;
    padding: 0.8rem;
    box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
}

.link-container input {
    flex: 1;
    border: none;
    background: none;
    font-size: 0.857rem;
    color: var(--dark);
    outline: none;
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 0.358rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.copy-btn:hover {
    background: #6355dd;
    transform: translateY(-2px);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    transform: scale(0);
    animation: ripple 0.6s linear;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .balances-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .balance-amount {
        font-size: 1.3rem;
    }
    
    .decimals {
        font-size: 0.9rem;
    }
}