* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #000000);
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 16px;
}

.user-profile {
    background: var(--tg-theme-secondary-bg-color, #f0f0f0);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-details h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.user-details span {
    font-size: 12px;
    opacity: 0.7;
}

.balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 20px;
    border-radius: 12px;
    text-align: center;
}

.balance-label {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.9);
}

.balance-amount {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.tasks-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card {
    background: var(--tg-theme-secondary-bg-color, #f5f5f5);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.task-icon img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
}

.task-details {
    flex: 1;
}

.task-details h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.reward {
    color: #f59e0b;
    font-weight: bold;
    font-size: 14px;
}

.task-link {
    font-size: 11px;
    opacity: 0.6;
    word-break: break-all;
}

.task-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.go-btn {
    background: var(--tg-theme-button-color, #0088cc);
    color: var(--tg-theme-button-text-color, #ffffff);
}

.verify-btn {
    background: #10b981;
    color: white;
}

.countdown {
    font-size: 14px;
    font-weight: bold;
    color: #6b7280;
}

.loading, .no-tasks {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}

@media (max-width: 480px) {
    .user-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .task-card {
        flex-wrap: wrap;
    }
    
    .task-action {
        width: 100%;
        text-align: center;
    }
}